microsoft / microsoft/DevSkim

Review Devskim: Finding DS104456(DS104456) for appropriate severity level

Open
#265 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

rule
Dominant language
C#
Stars
1k
Forks
131
Avg merge
1m
Merged PRs (30d)
1

Description

Hi, my name is klawrawkz. I'm fine. How are you?

In VS Code, I'm plugging away at a Powershell IAC automation routine. I need to invoke commands on various VM resources I'm working with. Thus I write a function, e.g.

Invoke-Command -ComputerName $compName, - ScriptBlock {
       mySwellScript.vbs /reallyAwesomeSwitch
       net accounts /maxpwage:unlimited
       Restart-Computer -Force
      ... continue on with 
      ... this terrific secret sauce of awesomeness 
} -Credential $mySpiffyCredential

VS Code's UI gets all squiggly with it and DevSkim reports the following problem:

Use of restricted functions.
Severity: [Important]
Use of restricted functions.
More Info:
https://github.com/Microsoft/DevSkim/blob/main/guidance/DS104456.md
Devskim: Finding DS104456(DS104456)

When I take a look at the intellisense link that redirects me to the DevSkim repo, the DS104456.md topic document is for all intents and purposes "empty." No guidance. Since there is no other way that I know of to run such commands on remote systems, I have permanently suppressed the "problem." That DevSkim reports a "problem," and has no other information to add, does not seem like super awesome behavior to me. It seems unnecessary. When I read the Invoke-Command guidance I don't find any supporting evidence that DevSkim should report this call as a "problem."

What's your take on this? Is this behavior a bug or something else?

Cheers,

klaw

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with guidance/DS104456.md and reproduce the DS104456 finding against the PowerShell Invoke-Command example in VS Code. Compare the rule’s behavior with the linked Invoke-Command guidance; done means the finding’s status or severity is clarified and the rule documentation provides a meaningful rationale.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, vscode
Domain
security, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.