Skip to content

obfuscation_flag / GlassWorm-style detector: needs a real design decision, not a code fix #1150

Closed

Description

@squid-protocol

🛑 Problem Statement

Found via #1144 (population-scale validation against 718 real repos). file_data.obfuscation_flag
is hardcoded to 0 in record_keeper.py (per #369/#381), with an explicit code comment stating
no self-propagation/worm-pattern ("GlassWorm-style") detector exists anywhere in the engine to
back it, and that building one is "a real detector effort, not a dead-key fix." That decision was
correct and honest at the time — but it leaves a SQLite column that will silently read 0 forever
unless someone actually revisits whether it's worth building.

This issue exists to make that revisit an explicit, tracked decision rather than an indefinitely
deferred one.

🎯 Objective

Not a code fix — a design decision. Two legitimate outcomes, and either is fine as long as it's
a deliberate choice:

  1. Scope a real detector. What would self-propagation/worm-pattern detection even look like
    within this engine's constraints (regex-based, AST-free, no cross-file semantic execution
    model)? Candidate lexical signals worth discussing: repeated self-referential file-write/copy
    patterns, package-manifest self-modification, dependency-install-then-modify-self sequences
    spanning multiple files. Given the engine's structural-signature approach already handles
    cross-file import graphs (network_risk_sensor.py), a lexical proxy for propagation
    behavior may be more tractable than it first looks — worth a real design pass before assuming
    it's infeasible like Remove ai_tools, ai_memory, ai_logic_loop from SIGNAL_SCHEMA -- not realistically detectable via regex #323's ai_tools/ai_memory/ai_logic_loop.
  2. Formally deprecate. If no lexical proxy is credible, treat this the same as #ISSUE_A/B/C:
    remove the column rather than leave a permanent placeholder, and document in
    how_to_add_a_language.md or the security README why this category is out of scope for a
    regex-only engine (useful context for future contributors who'll otherwise reinvent this
    question).

🛠️ Proposed Implementation

Start as a design discussion (this issue / a short RFC comment thread), not a PR. Bring in whoever
has context on security_lens.py's existing binary/supply-chain scanning to judge feasibility
before committing to either path.

✅ Acceptance Criteria

  • Explicit decision recorded: build a real (even if narrow/conservative) detector, or
    formally deprecate the column.
  • If deprecated: removed from schema per #ISSUE_A/#ISSUE_C precedent, with the reasoning
    documented for future contributors.
  • If built: real test proves a synthetic self-propagation pattern produces
    obfuscation_flag = 1.

Activity

  1. added
    help wanted
    question
    appsec
    priority: low
    on Aug 7, 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

    appsechelp wantedpriority: lowquestion

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions