Skip to content

Feature: Built-in static security scanner #234

Closed

Description

@ajianaz

Feature: Built-in Static Security Scanner

Problem

Cora relies entirely on LLM for security review. LLMs can miss deterministic patterns (hardcoded secrets, weak crypto, known CVE patterns) that static scanners catch reliably.

Proposed Solution

Add a deterministic pre-scan phase before LLM review. Static scanner catches what's guaranteed to be a finding; LLM handles nuance and context.

Two-Phase Architecture

Phase 1: Static Scan (deterministic, <1s)
├── Secret detection (API keys, tokens, passwords)
├── Weak crypto (MD5, SHA1 for passwords)
├── Known anti-patterns (eval(), exec(), SQL string concat)
├── Dependency vulnerability patterns
└── Output: List of guaranteed findings

Phase 2: LLM Review (semantic, context-aware)
├── Receives static scan results as additional context
├── Can reference and expand on static findings
├── Handles logic bugs, architecture issues, performance
└── Output: Combined findings (static + LLM)

Final: Merged SARIF with both sources

Detection Rules

Category Pattern Severity
Secrets api_key = "sk-...", password = "..." Critical
Crypto md5(), sha1() for passwords High
Injection string concat in SQL, eval() High
Auth missing auth check, hardcoded roles High
Config debug = true in production Medium

Why v0.5

Acceptance Criteria

  • Pre-scan detects hardcoded secrets with <1% false positive
  • Pre-scan catches weak crypto usage (MD5, SHA1, DES)
  • Pre-scan catches injection patterns (SQL concat, eval)
  • Static findings merged into LLM review context
  • SARIF output marks source: "static" vs "llm"
  • Config toggle: scanner.enabled = true (default)
  • Each scan adds <500ms overhead

Activity

  1. reopened this on Jun 9, 2026
  2. added
    v0.5Polish + stability
    next-pickNext issue to work on in the backlog
    on Jun 9, 2026
  3. added a commit that references this issue on Jun 10, 2026
  4. ajianaz commented on Jun 10, 2026

    @ajianaz
    CollaboratorAuthor

    ✅ Implemented in PR #240. 11 security patterns, integrated into review pipeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions