Skip to content

New signal: credential/token-file targeting (what a worm is actually after)Β #1173

Open

Description

@squid-protocol

Part of epic #1171.

πŸ›‘ Problem Statement

The GlassWorm-style detector (#1150/PR #1169) only looks at how a worm spreads
(self_propagation) and how it hides its payload (unicode_steganography). It has no signal for
what the worm is after β€” real campaigns like GlassWorm steal specific, well-known credential
files to fund propagation and exfiltrate value: npm publish tokens, SSH private keys, saved git
logins, cloud credentials, browser crypto-wallet extension data.

This is a distinct behavior from the engine's existing sec_hardcoded_secrets signal, which finds
secrets typed directly into source code (api_key = "..."). Code that opens
~/.ssh/id_rsa or ~/.npmrc off disk is a different and rarer thing β€” legitimate application
code essentially never reads these paths directly (that's the SSH/npm binary's job), so it's a
higher-precision, higher-severity signal when it does happen.

🎯 Objective

Add a new signal that fires when source code opens one of a well-known, bounded list of
credential/token file paths:

  • ~/.npmrc (npm publish token)
  • ~/.ssh/id_rsa, ~/.ssh/id_ed25519 (SSH private keys)
  • ~/.git-credentials (saved git login)
  • ~/.aws/credentials, ~/.config/gcloud/* (cloud credentials)
  • Common browser wallet-extension local-storage paths (e.g. MetaMask's known extension ID path)

Then correlate it with the taint-tracking mechanism security_lens.py already uses elsewhere
(the O(H) offset mapper that tracks a value from a read/assignment to a downstream sink within a
bounded line window) β€” the same read landing in a network call (sec_io) a few lines later is a
much stronger signal ("credential theft in progress") than the bare file-read alone ("might be
legitimate credential-manager tooling").

πŸ› οΈ Proposed Implementation

  • New THREAT_SIGNATURES entry (working name: credential_targeting) matching the bounded path
    list above, following the same os.path.expanduser/path.join(os.homedir(), ...) idiom
    variations real code actually uses (not just the bare literal path string).
  • Reuse the existing line-indexed taint-tracking scaffolding (see how sec_hardcoded_secrets +
    telemetry/debug_prints sinks are correlated in galaxyscope.py's "Active Hemorrhage" step)
    to add a credential_targeting + sec_io correlation, distinguishing "read + sent over network"
    from "read only."
  • Wire the new key through the same plumbing PR feat(security): build a narrow GlassWorm-style detector for obfuscation_flagΒ #1169 established (SIGNAL_SCHEMA append-only
    position, FRIENDLY_MAP, audit_recorder.py's sec_hit_mapping).

βœ… Acceptance Criteria

  • Synthetic tests prove detection across at least JS/Python for each credential-path category
  • False-positive guard tests: legitimate SSH/git tooling, credential-manager libraries, and
    test fixtures referencing these paths in comments/strings (not actual read calls) must not
    fire
  • The read+network-sink correlation is demonstrably distinguishable from a bare read in test
    output
  • Verified against the full language-crucible corpus: zero unintended hits before the
    golden-master rebless

Activity

  1. added
    enhancement
    appsec
    supply-chain
    on Aug 9, 2026
  2. added
    scope:frontier
    needs:corpus
    needs:crucible
    on Oct 16, 2026
  3. squid-protocol commented on Nov 18, 2026

    @squid-protocol
    OwnerAuthor

    Frozen 2026-11-18 (owner): Worms Armageddon is closed and its open work moved to Gap Atlas, mapped but not built. These signals need a malware corpus and a crucible that do not exist, and regex worm signals are a space where GitGalaxy has no measured edge yet. They may return as inputs to a release-vs-own-history study if that study pans out.

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

    appsecenhancementneeds:corpusneeds:cruciblepriority: mediumscope:frontiersupply-chain

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions