Skip to content

AIAppSecSensor reads from a phantom 'telemetry' namespace -- all 3 detection rules have never fired #324

Closed

Description

@squid-protocol

Problem

AIAppSecSensor.hunt_threats() reads 8 inputs entirely from a telemetry
dict. 7 of the 8 are dead:

  • ai_orchestrator -- schema name is llm_orchestrator; ai_orchestrator
    never existed anywhere.
  • llm_api, ai_tools -- real signals, but they live in hit_vector
    (indexed via SIGNAL_SCHEMA), not telemetry. Nothing copies them across.
  • arch_api, arch_io, safety_density -- don't exist anywhere in the
    codebase under any name.
  • sec_secrets -- real key is sec_hardcoded_secrets, and it lives in
    equations, not telemetry.
  • sec_high_risk_execution -- real signal, but lives in equations
    (confirmed: every read of this key elsewhere in the codebase reads
    raw_signals/equations, never telemetry).

Only max_db_complexity (read directly off file_data, not telemetry)
is real and connected.

Impact

Every one of AIAppSecSensor's three rules requires at least one of the
broken inputs:

  1. "Autonomous Execution Vector" (prompt-injection -> RCE)
  2. "Over-Permissioned Agent" (autonomous data corruption)
  3. "Agentic Exfiltration Vector" (SSRF / key exfiltration)

All three have been permanently unreachable since this module was written --
not degraded, never fired once, for any file, ever.

Note: NOT fixed by #313

#313 (and its language_standards.py follow-up) fixes the producer side
(getting real hits into hit_vector/equations). That alone does not fix this
module, because this module never reads hit_vector/equations at all -- it
reads a telemetry namespace that nothing populates. This needs its own fix
regardless of #313's outcome.

Fix

Point all 7 broken reads at their real locations:

  • llm_api, ai_tools, llm_orchestrator -> hit_vector[SIGNAL_SCHEMA.index(...)]
  • sec_hardcoded_secrets, sec_high_risk_execution -> equations.get(...)
  • arch_api, arch_io, safety_density -> either locate their intended
    real source (possibly the api/io/safety bridge-mapped short keys
    used elsewhere in signal_processor.py's mp_map system) or, if no such
    signal actually exists yet, treat as a genuine gap and decide whether to
    build it or drop that condition from the rule.

Workflow note (for the record)

Per maintainer recollection, this module was likely produced during a
Gemini 3.1-assisted coding session. Flagging this as a specific, dated
instance of a recurring workflow pattern: a consumer gets written against
an imagined data layout that the producer side never actually implements,
and it looks plausible enough (correct-looking key names, sensible-looking
logic) to pass casual review. Documenting this here as input to the
process-fix epic (see companion issue) rather than treating it as an
isolated one-off.

Activity

  1. added
    bug
    appsec
    threat: false-negative
    priority: high
    on Jul 23, 2026
  2. added a commit that references this issue on Aug 4, 2026
    4ddef6e
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

    appsecbugpriority: highthreat: false-negative

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions