Skip to content

Consume panic-attack patch-bridge registry as a fact source #358

@hyperpolymath

Description

@hyperpolymath

Current state

Hypatia reads CVE alerts from GitHub APIs:

  • DA001-DA004 — Dependabot alerts
  • CSA001-CSA004 — CodeQL security alerts

It does not read panic-attack's local .machine_readable/patch-bridge/registry.json.

Gap

panic-attack establishes a per-CVE reach classification from local code analysis:

  • phantom-declared — listed in Cargo.toml but no use site
  • phantom-transitive — not declared, pulled transitively
  • reachable — declared and used
  • unreachable — declared, used, but not reachable from any entry point

Hypatia is currently blind to this richer classification and cannot reason over reach when scoring findings.

Proposed

Add a new fact source / rule module that reads .machine_readable/patch-bridge/registry.json from the repo under analysis.

Track E findings (motivation)

Today's Track E security sweep across 29 repos revealed that 26/29 repos contained transitive-dep misclassifications that Dependabot alone could not have surfaced. panic-attack catches these locally; hypatia is the natural aggregator.

Acceptance criteria

  • Locate registry file at <repo>/.machine_readable/patch-bridge/registry.json
  • Deserialize BridgeReport matching panic-attack's schema_version (post-chore(deps): bump trufflesecurity/trufflehog from 3.92.4 to 3.92.5 #16)
  • Emit findings as hypatia facts (one per CVE entry; carry reach + classification + severity)
  • Smoke test against panic-attack's own registry
  • Document the rule family identifier (suggest PA001-PA004 to mirror DA/CSA)

References

  • panic-attack#16 — in-flight PR introducing split reach values
  • Track E sweep summary (in-session, 26/29 repos affected)

Metadata

Metadata

Assignees

No one assigned

    Labels

    cicdCI/CD pipeline, GitHub Actions, workflows, rulesets, releasesenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions