Commit 999a0b5
security(cli): suppress false-positive path-traversal Semgrep findings on the path-containment guard (APS-19008)
semgrep/ci blocked #1141 on 4 path-join-resolve-traversal findings, all on the
new path-CONTAINMENT code itself: isPathInsideBase() (securityValidation.js:61-62)
and validateBstackJson's resolve (utils.js:42). The path.resolve() calls ARE the
anti-traversal guard — each is immediately followed by a containment check
(startsWith(base+sep) / isPathInsideBase + .json-extension). Semgrep flags
resolve(userInput) without seeing the guard, so these are false positives.
Added // nosemgrep on the exact lines with justification (per Security Ops book #68).
No behaviour change.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent e578fad commit 999a0b5
2 files changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
| 63 | + | |
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
0 commit comments