Skip to content

security lens skips inert data formats — a secret in a YAML/JSON config is invisible #2978

Closed

Description

@squid-protocol

galaxyscope.py:422 classifies plaintext, markdown, json, yaml, csv as inert and Phase 5.5 (if not is_inert:) skips the SecurityLens entirely for them. SecurityLens.scan_content itself detects the secret fine — the keyword-rosetta corpus planted api_key = "R0SETTA-PLANT-SECRET-2026" in all 46 languages and the lens reads exactly 1 hit on the markdown and yaml files when driven directly — but the pipeline never runs it, so sec_hardcoded_secrets and risk_secrets_risk read 0 for those languages while the other 44 read a uniform 25.0.

The design tension: inert formats carry no code to SAST, but credentials in YAML/JSON config files are arguably the single most common real-world leak shape (docker-compose, k8s manifests, CI config). The blanket CRITICAL-LEAK shunt covers credential-named files (.env, .pem); an ordinary config.yaml with a token inside gets nothing.

Options: run the security lens (only) on inert formats; or keep the skip and document it as the deliberate boundary. Either way the corpus ledgers the two cells as engine-semantic until decided (keyword-rosetta secrets-lens-inert-formats).

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

    scope:infra

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions