fix(security): avoid SKY-D212 RegExp literal false positives - #805
Open
mcdigman wants to merge 5 commits into
Open
fix(security): avoid SKY-D212 RegExp literal false positives#805mcdigman wants to merge 5 commits into
mcdigman wants to merge 5 commits into
Conversation
mcdigman
marked this pull request as ready for review
September 6, 2026 14:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Closes #803
Hi @duriantaco, I see you already self-assigned the new issue #803; however, I happen to already have a fix built for it, because this is one of the two remaining false positives when scanning skylos on
liveness_primeritself. I think I made it before I had made any other PRs and I guess I forgot to PR it or actually open an issue before; feel free to close this if you don't want this solution/already wrote a better one.Summary
.execcall is actually a regular expression regardless of the name of the variableWhy?
SKY-D212 currently reports ordinary RegExp calls when the binding has an application-specific name:
explorer/src/lib/permalink.js:34 SKY-D212 child_process.exec() can lead to command injectionThe old suppression was based on names such as regex and pattern, so it both missed this safe GITHUB_PATTERN.exec(url) call and could be evaded by assigning a dangerous receiver to a safe-looking name.
With this change, the same file produces no SKY-D212 finding while unsafe lookalikes remain reported.
Precision Impact
I think it strictly improves precision.
Checklist
python3 -m pytest test/)python3 scripts/corpus_ci.py --manifest corpus/manifest.json) if analysis logic changed