LLMs are good at explaining code, but raw source code is a poor contract between a scanner and a model. The same behavior can be written many ways, spread across framework helpers, hidden behind generated code, or buried in agent-created wrappers.

Circle-IR gives the verification pipeline a smaller interpretive language for facts the system can inspect: calls, data flow, authorization boundaries, sanitizers, sinks, dependency changes, agent actions, and policy effects. Instead of asking an AI reviewer to infer everything from a diff, Cognium gives it an auditable semantic substrate.

What Circle-IR represents

  • Control and data-flow facts extracted from the changed program.
  • Framework-aware sources, sinks, sanitizers, validators, and encoders.
  • Agent provenance: which model, skill, tool, MCP server, or workflow produced the change.
  • Policy facts such as privilege changes, new external calls, dependency updates, and secrets exposure.
  • Evidence links back to source lines, commits, SARIF results, and review comments.

Why an interpretive layer matters

An interpretive IR lets the verifier execute policy over meaning, not formatting. That matters because AI-generated code often looks plausible even when the actual behavior is unsafe. Circle-IR lets the system ask sharper questions: did untrusted input reach SQL? Did a generated route bypass authorization? Did an agent add a tool with excessive scope?

circle-ir sketch
source request.query.user_id
call UserRepository.findByRawSql
sink database.sql_query cwe=CWE-89
missing sanitizer prepared_statement
policy ai_generated_pr.requires_verification = true

How it works with AI verification

The AI verifier should not be a free-form reviewer guessing from a patch. It should read Circle-IR facts, inspect the source evidence, compare the behavior against policy, and produce a bounded decision. That keeps the review explainable and repeatable.

ParseSource code to semantic facts
InterpretRun guardrails over Circle-IR
VerifyGenerate evidence-backed review decisions

Developer impact

For developers, Circle-IR should make findings less noisy. A result can explain the exact path, the missing guardrail, the framework assumption, and the remediation. For security teams, it gives a common representation for SAST, AI trust, agent governance, and audit evidence.

Explore semantic SASTDeveloper workflow

References