DevSkim
DevSkim copied to clipboard
skip DS440000 for shell scripts
we do not benefits from issues like this

I came to an idea how to test it. let me test (I'll convert after that)
@scovetta is the rule intended to catch this in shell scripts?
After additional review, I don't think that the correct solution here would be to not surface this at all in shell scripts. DevSkim provides levers to ignore specific instances of rule matches you believe are not relevant to you - for example suppression comments.
DevSkim doesn't do AST parsing, so we cannot know where the variable here flowed from - it might be hardcoded at some point or it may be flowing from an argument to the script. For a solution with data flow that can automatically make such a distinction I can recommend CodeQL.
I believe devskim already has a mechanism to ignore a specific rule by ID, but in this case you only want to ignore certain file types, so I'll add an issue to track adding this for DevSkim 0.7. #406