Review Devskim: Finding DS104456(DS104456) for appropriate severity level
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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