Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/scripts/sigilix_sarif_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ def _sanitize_run_results(run):
_RULE_CLASS_PATTERNS = {
"semgrep": [
(re.compile(r"dangerous-exec|command[-_.]?inj|os[-_.]?command|dangerous-subprocess|spawn.*shell"), "command-injection"),
(re.compile(r"detect-eval|eval-with-expression|(?<![a-z])eval"), "code-injection"),
(re.compile(r"nosql[-_.]?inj"), "nosql-injection"),
(re.compile(r"(?<![a-z])sql[-_.]?inj"), "sql-injection"),
(re.compile(r"path[-_.]?travers|directory[-_.]?travers|zip[-_.]?slip"), "path-traversal"),
Expand Down
3 changes: 3 additions & 0 deletions .github/scripts/sigilix_sarif_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -977,6 +977,9 @@ def test_collision_safe_unset_when_two_classes_match(self):
# A contrived ruleId hitting two patterns → exactly-one guard leaves it unset.
self.assertIsNone(self._run("sql-injection-and-ssrf-combo"))

def test_stamps_eval_code_injection(self):
self.assertEqual(self._run("javascript.lang.security.detect-eval-with-expression"), "code-injection")

def test_secret_scanners_map_to_hardcoded_secret(self):
for tool in ("gitleaks", "trufflehog"):
run = {"tool": {"driver": {}}, "results": [{"ruleId": "aws-access-token", "properties": {}}]}
Expand Down
Loading