Skip to content

Risk/security signal noise on C/C++: SARIF on GPL lines/assert, obfuscation on data arrays, threat from macro headers, saturated safety score, mtime-based stability #4548

Closed

Description

@squid-protocol

Problem

On a 14-repo C/C++/Rust corpus, several risk and security signals are dominated by artifacts rather than risk. A reader cannot use them to rank real hotspots.

Evidence

  1. SARIF: 2,423 findings. About 698 are GG-SAST-DEAD_CODE on the GPL boilerplate line // along with this program…, 108 on // http… comment URLs, and 713 are GG-SAST-HIGH_RISK_EXECUTION (level error) on assert(. HARDCODED_SECRETS fires on "acs" in a changelog, SHADOW_IMPORTS on MAPINFO include, and every finding has startColumn 1.
  2. has_credentials is set on a public GPG key (odamex llvm-snapshot.gpg.key) and on a changelog.
  3. threat_obfuscated scores 32,987 hits on embedded graphics data (doomretro src/v_data.c, 1,529 LOC), so Doom Retro looks 60× more obfuscated than any other port.
  4. fam_threat is driven by macro-only headers: glext.h = 5,090, MSVC _sal.h = 945, with every named threat_* column at 0.
  5. The "memory" family is 91.8–98.5% state_pointers, i.e. pointer-dereference counting, not a memory-corruption signal.
  6. risk_safety_score saturates: 3.8–23% of files score ≥99, and shell scripts and a 57-LOC header with cognitive load 0 score 99.99–100.
  7. risk_stability / churn come from filesystem mtime, not git history, so on fresh clones they encode checkout order: 99.88 for gzdoom, 0.0 for 11 repos.

Acceptance criteria

Split into sub-issues as needed. For each item: fix the cause, or document why the signal behaves this way and stop it from being presented as risk. Add a regression test on a small fixture. Priority order: (1) SARIF false errors, (3)+(4) threat inflation, (7) mtime-based stability (use git history, or mark it unavailable on shallow clones), (6) saturation, (5) rename or re-weight the memory family.

Evidence: /srv/storage_16tb/projects/gitgalaxy/doom-study/ (gitgalaxy_issues.md; scans at engine a8510fc). Found by the Doom source-port study (2026-10-06): https://claude.ai/code/artifact/bc877518-b326-4889-9d15-d99287f4f3fc

🤖 Generated with Claude Code

Activity

  1. added
    bug
    threat: false-positive
    security
    on Oct 6, 2026
  2. squid-protocol commented on Oct 12, 2026

    @squid-protocol
    OwnerAuthor

    Siblings: #4987 (class sweep from PR #4983)

  3. added
    scope:frontier
    on Oct 16, 2026
  4. 13 remaining items

  5. removed
    scope:frontier
    on Oct 25, 2026
  6. squid-protocol commented on Oct 25, 2026

    @squid-protocol
    OwnerAuthor

    Churn run 4548-20261025T1829Z (host nyx) ended without a PR. no-op: all #4548 items merged; only corpus re-scan left, issue stays open

  7. squid-protocol commented on Oct 26, 2026

    @squid-protocol
    OwnerAuthor

    Re-scan of DOOM ports on origin/main (engine 534a67c, 2026-10-26). Three ports scanned: doomretro (203 files), odamex (727), chocolate-doom (641). gzdoom and the other ports were not re-scanned. Compared against the issue's round-1 numbers (engine a8510fc).

    # Item Still reproduces? Numbers now
    1 SARIF false errors Mostly fixed; small residue Findings: doomretro 21, odamex 188, chocolate-doom 17 (issue: 2,423 across the corpus). No assert( errors, no GPL-line DEAD_CODE. All HIGH_RISK_EXECUTION errors left (1/2/3) are real system( calls. Real startColumn on source findings (workflow-YAML findings carry none). Residue: exactly 1 DEAD_CODE per repo, all false positives: backticked eval in a // prose comment (doomretro nano_bsp.c:307), // inside a string literal on a code line (odamex cl_download.cpp:151), eval() in a # comment (chocolate-doom man/simplecpp:87).
    2 has_credentials No 0 files in all three (odamex GPG key no longer flagged)
    3 threat_obfuscated on data arrays No doomretro v_data.c: 8 (was 32,987), top file in all three
    4 fam_threat on macro headers No max fam_threat 8 (v_data.c) in doomretro, 0 in odamex and chocolate-doom
    5 memory family = pointers No fam_memory = alloc + casts exactly (doomretro 1567 = 975 + 592); pointers (28,451) no longer in it
    6 risk_safety_score saturation No 0% of files >= 99; max 88.7 / 98.9 / 92.4
    7 mtime-based stability/churn No (mtime no longer used) All three clones are shallow, 1 commit: risk_churn = 0 everywhere, risk_stability = 50.0 (neutral) for most files and 0.0 for a handful (7/203, 54/727), not mtime-ordered. Caveat: unavailable is reported as the neutral 50.0, not null; not checked on a repo with real history.

    No fix attempted. The only residue is the single DEAD_CODE finding per repo from item 1, which falls in 3 unrelated shapes (code in comment prose, // in a string, a non-C comment style). Fixing each is a separate mechanism for 1 finding per repo, not worth a slice. Issue can close once the owner agrees; the second round's 39-port rescan would confirm the corpus-wide numbers.

  8. squid-protocol commented on Oct 26, 2026

    @squid-protocol
    OwnerAuthor

    Churn run 4548-20261026T1536Z (host nyx) ended without a PR. Re-scan: items 2-7 no longer reproduce; item 1 residue is 3 DEAD_CODE shapes (1 finding/port). Left open for owner acceptance.

  9. added a commit that references this issue on Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdata-qualityneeds:doom-corpuspriority: mediumscope:coresecuritythreat: false-positive

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions