Skip to content

security lens: stop SARIF false errors from comments/prose; real line+column; public keys are not leaks (Part of #4548) - #4983

Merged
squid-protocol merged 6 commits into
mainfrom
churn/4548-sast-noise
Oct 12, 2026
Merged

squid-protocol merged 6 commits into
mainfrom
churn/4548-sast-noise

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #4548 (item 1: SARIF false errors; item 2's SARIF-adjacent has_credentials on a public key). Not closing: items 3-7 remain.

Cause (one mechanism)

SecurityLens.scan_content ran every regex over the raw buffer: comments, prose and data files included, no language, no column. Each reported member is that, plus signature looseness:

Member Cause Fix
DEAD_CODE on GPL line / // http… bare http alternative matched every comment URL http only right after a quote/paren (a commented-out call); bash/curl/eval… unchanged
HIGH_RISK_EXECUTION (error) on assert( assert listed as an RCE verb for all languages only PHP-shaped assert("…") / assert($x)
HARDCODED_SECRETS on "acs" in changelog COBOL alt (KEY stem + VALUE "…") matched English "keyword value" COBOL alt needs a level number
SHADOW_IMPORTS on MAPINFO include code signal run on a plaintext data file prose files (plaintext/markdown/csv) skip code-behaviour signals
comments counted as execution/imports/sinks one raw stream behaviour signals (exec, shadow_imports, state_mutation, db_hooks, io, bitwise, self_propagation) read prism's comment-blanked code_stream; dead_code / secrets / hidden unicode / entropy stay on raw text on purpose
every startColumn 1 hardcoded; also dead_code/shadow_imports had no positions at all (line fell back to the file's start) scan_content returns sites = (line, col) aligned 1:1 with each snippet; SARIF uses it, omits startColumn when unknown
wrong lines 250-char armor removed long lines, shifting every later line number; SARIF paired idx-th snippet with idx-th hit armor empties instead of removing; sites aligned with snippets
has_credentials on llvm-snapshot.gpg.key aperture's extension-only secrets shunt (.key/.crt/.pub/.asc…) one bounded read (64 KB): PEM/PGP public armor with no PRIVATE marker is not a leak; SECRETS_EXACT names and anything ambiguous stay leaks

The changelog's has_credentials follows from the secrets fix (it reads sec_hardcoded_secrets).

Evidence

Tiny git repo (GPL/URL/assert C file, changelog, MAPINFO txt, public key, plus positive controls system(c) in C and include "payload.png" in PHP), SARIF from origin/main vs this branch:

  • main: 7 findings (SECRETS, SHADOW_IMPORTS x2, HIGH_RISK_EXECUTION on assert + system, DEAD_CODE x2), all startColumn: 1, src/c.php reported at line 1.
  • branch: 2 findings, both real: system(c) at 3:5, PHP include "payload.png" at 2:1.
  • tests/security_auditing/test_sast_prose_noise_4548.py: one fixture per member, plus the positive controls and a public/private key matrix.

Golden drift (re-blessed both legs via golden-lock.sh crucible_check.py --update --yes)

Only lens-derived channels moved (commented-out logic, dynamic code execution, network I/O hooks, env mutation, bitwise, DB sinks, api_near_db_sink, sarif/gpu/graph snapshots, repo threat totals). The big mover is Dynamic Code Execution falling to 0 in assert-heavy C/zig files (cpython dictobject.c 232 -> 0). No structure/language keys changed; no files excluded by timeouts.

Gates: pr_gates --fast 5/5, --ratchets 7/7 (0 skipped).

Cross-repo: none; no companion PRs. Does not touch the typosquat radar (#4981); expect a golden re-bless on whichever of the two merges second.

🤖 Generated with Claude Code

@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 12, 2026 13:14
@squid-protocol
squid-protocol enabled auto-merge (squash) October 12, 2026 13:14
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol

Copy link
Copy Markdown
Owner Author

This PR conflicts with main, so no checks ran. Merge origin/main into it and regenerate generated files with their tools (never hand-merge them), then push.

@squid-protocol squid-protocol added shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md labels Oct 12, 2026
@squid-protocol squid-protocol removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md labels Oct 12, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

CI shepherd: the head of this PR (57c50d7) is not the one a maintainer labelled shepherd:merge on (new commits, or never approved), so the label was removed and nothing merges unreviewed code. Re-add the label when the new head is ready (shepherd:reapprove marks this PR until then).

@squid-protocol squid-protocol added shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md labels Oct 12, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol merged commit 100b8a2 into main Oct 12, 2026
42 checks passed
@squid-protocol squid-protocol removed the shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md label Oct 12, 2026
@squid-protocol
squid-protocol deleted the churn/4548-sast-noise branch October 12, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant