Commit 1a1b6cc
authored
fix(security): suppress prototype-pollution-loop false positive in check-types-sync.ts (#298)
The scheduled `mise run security` suite is RED on main because semgrep's
`prototype-pollution-loop` rule flags scripts/check-types-sync.ts:286:
value = (value as Record<string, unknown>)[seg];
This is a false positive. resolveConstantsReference walks a property
chain *down* SHARED_CONSTANTS (the build-time-trusted contracts/constants.json):
it reads value[seg] and reassigns the local `value`, and never assigns to
any object property, so there is no prototype-pollution sink. The `seg`
keys come from this script's own TypeScript AST, not external input.
Suppress inline with a justified nosemgrep, matching the repo convention
(cli/src/commands/submit.ts:232, agent/src/config.py:165). Keeping it
inline leaves every other prototype-pollution site gated.
Verified: `semgrep scan --config auto scripts/check-types-sync.ts` now
reports 0 findings (0 blocking).
Closes #283
Refs #2971 parent 5d28f14 commit 1a1b6cc
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
| 286 | + | |
286 | 287 | | |
287 | 288 | | |
288 | 289 | | |
| |||
0 commit comments