Skip to content

SecurityLens high_risk_execution is not language-gated: C/C++ require( expr ) assert macros are level-error RCE findings (85 of 158) #5463

Closed

Description

@squid-protocol

Problem

high_risk_execution in gitgalaxy/security/security_lens.py:322-340 carries \brequire\s*\(\s*(?!['\"])[a-zA-Z_$] (Node dynamic require(variable)). It runs on every language, so blargg's require( expr ) assert macro (#define require( expr ) assert( expr ), game-music-emu / snes_spc) and asio::require(...) produce GG-SAST-HIGH_RISK_EXECUTION at level error: 85 of the 158 error-level results in 39 DOOM ports (psydoom 37, zandronum 23, vizdoom 23, eternity 2). The other 73 are real system() / os.system() calls (true positives). #4983 fixed assert( by narrowing it to PHP shapes; the class is the whole signature list lacking a language gate.

Class: execution verbs whose meaning is language-specific

member languages where it executes code status
require(var) JavaScript/Node fires everywhere (C/C++ macro, Ruby, Lua require modules)
assert("...") PHP narrowed by shape in #4983, still not language-gated
eval( JS, PHP, Python, Perl, shell fires in C/C++ on any eval( function name (verify)
importlib.import_module(, __import__ Python shape-specific, low risk
Assembly.Load( C# shape-specific, low risk
system( / popen / exec* C, PHP, Perl, Python real; keep

Acceptance

  • Each high_risk_execution alternative declares the languages it applies to; scan_content receives the file language and skips non-applicable alternatives (unknown language: keep current behaviour).
  • Fixture: C/C++ require( x ), asio::require(e, ...), Lua require("mod") -> no finding; Node require(userInput) -> finding.
  • Rescan the corpus: zero require( error-level results in C/C++.

Part of #5457 (milestone DOOM Port Speedrun).

Evidence: /srv/storage_16tb/projects/gitgalaxy/doom-study/ — round2_findings.md, clean_check.csv, clean_check_details.json; scans in scans_r2/<port>/ at engine 585c243e9; corpus variants_r2.csv (39 ports, pinned SHAs); scorer scripts/clean_check.py.

🤖 Generated with Claude Code

Activity

  1. added
    bug
    appsec
    threat: false-positive
    needs:doom-corpus
    scope:core
    on Oct 18, 2026
  2. squid-protocol commented on Oct 18, 2026

    @squid-protocol
    OwnerAuthor

    PR #5508 merged: language scope table, scan_content(language=), fixtures for C/C++ require, asio::require, Lua require, Node require(userInput). Leaving open: the acceptance's corpus rescan (zero C/C++ require( error-level results) has not been run yet.

  3. squid-protocol commented on Oct 19, 2026

    @squid-protocol
    OwnerAuthor

    Claimed by promoter-bot host nyx, lease renewed 2026-10-19T05:25Z. It lapses after 6 h without a renewal. To take it back, assign someone or remove the claim:nyx label.

  4. squid-protocol commented on Oct 19, 2026

    @squid-protocol
    OwnerAuthor

    Corpus rescan for the last open acceptance item, on current main (8d066b2, after #5508).

    Result: zero require( GG-SAST-HIGH_RISK_EXECUTION error-level results in C/C++ files. The string require( appears in no SARIF result in any port.

    Method: all 39 ports in doom-study variants_r2.csv scanned with galaxyscope from this worktree (fresh output dir, all rc=0). I counted SARIF results with ruleId HIGH_RISK_EXECUTION and level error, filtered to C/C++ extensions (.c .h .cc .cpp .cxx .hpp .hh .hxx .inl).

    Port HRE errors C/C++ HRE require( in C/C++
    chocolate-doom 3 3 0
    crispy-doom 3 3 0
    doom-ascii 1 1 0
    doom-ios 1 1 0
    doom-wasm 2 2 0
    doomgeneric 1 1 0
    doomretro 1 1 0
    doomsday 7 6 0
    eternity 2 2 0
    fastdoom 3 3 0
    gzdoom 2 2 0
    inter-doom 3 3 0
    nugget-doom 3 3 0
    odamex 2 2 0
    prboom-plus 2 1 0
    psydoom 1 1 0
    srb2 1 1 0
    vizdoom 3 2 0
    woof 3 3 0
    zandronum 3 3 0
    doom64ex, dsda-doom, freedoom, helion 1 / 1 / 2 / 1 0 0 (non-C/C++ files)
    all other ports (doom3-bfg, doom3do, doom64-re, doom-nano, edge-classic, gbadoom, gore, linuxdoom, managed-doom, mochadoom, psxdoom-re, puredoom, room4doom, rust-doom, sdl-doom) 0 0 0

    The C/C++ errors that remain are system( signatures (and System( on system.h/system.cpp/fmod_wrap.h, which is case-folded). That is a different question from this issue. Across all ports the signatures seen are system(, .execute(, fetch(, gethostbyname(, eval( and similar. None is require(.

    No code PR needed: the acceptance is met by #5508. Closing.

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

    appsecbugclaim:nyxneeds:doom-corpuspriority: mediumscope:corethreat: false-positive

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions