Skip to content

feat(scan): --rules-only deterministic pass (no LLM) — rules survive batch failures, zero-token CI checks #722

Closed

Description

@ajianaz

What

Expose the deterministic rule set (12 built-in rules, 13 security patterns, 15 secret patterns) as a standalone pass: cora scan --rules-only (plus the same pass always executed first inside a normal scan). Zero LLM calls, zero API key needed, results stored and gate-able like scan findings.

Why

Today the deterministic rules are embedded inside the LLM batch pipeline: when an LLM batch fails or is skipped (documented coverage hole: 504 auto-skip; GLM invalid-severity skipping batches), the rule findings are lost with it. Alibaba open-code-review (Apache-2.0) runs template-engine rule matching completely outside the agent for exactly this reason. Side benefit: CI can run secret/SQLi/hardcoded-credential checks with zero token cost, and #713-style bounded usage stays trivially predictable.

Testing

  • --rules-only on a fixture repo with planted issues returns all of them; runs with no provider/API key configured.
  • Normal scan with a forced 504 batch failure: rule findings still present in output/DB.
  • Assert zero network calls in rules-only mode.
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

    enhancementpriority:mediumscope:core

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions