Most coding agents generate code and push it to version control. ORA blocks its own commits if a security scan fails. This is the first public example of an agent that enforces pre-commit security gates by vetoing its own output based on runtime feedback.
The shift matters because it moves security enforcement from post-commit detection (where vulnerable code already exists in history) to pre-commit agent self-governance. The agent becomes the gatekeeper, not the developer.
How the Agent Hooks Into the Commit Pipeline
ORA sits between code generation and version control. The orchestration flow looks like this:
- Agent generates code changes
- Agent triggers security scan (static analysis, dependency check, or custom rules)
- Scan returns pass/fail + findings
- Agent evaluates scan result
- If pass: commit proceeds
- If fail: commit is blocked, agent logs findings
The agent does not require manual developer intervention to enforce the block. The commit never reaches Git if the scan fails.
State Management Between Generation and Approval
The agent maintains state across three phases:
- Generation phase: Code is written to a staging area (likely a temporary branch or working directory)
- Scan phase: Security tooling runs against the staged code, agent polls or receives a webhook callback
- Decision phase: Agent evaluates scan output and either commits or discards
The state object likely includes:
- Scan request ID
- Timeout threshold
- Failure mode (fail open or closed)
- Retry count if scan is inconclusive
If the scan times out or returns ambiguous results, the agent must decide whether to fail open (allow commit) or fail closed (block commit). ORA appears to fail closed based on the “blocks its own commits” framing, but the timeout behavior is not documented.
Security Scan Integration Points
The agent needs a structured way to interpret scan results. Three common patterns:
| Pattern | How It Works | Trade-off |
|---|---|---|
| Exit code | Scan tool returns 0 (pass) or 1 (fail) | Simple but loses granularity |
| SARIF output | Scan emits Static Analysis Results Interchange Format JSON | Structured but requires parsing logic |
| Webhook callback | Scan service POSTs results to agent endpoint | Async but adds network dependency |
ORA likely uses exit codes or SARIF. Webhook callbacks introduce latency and failure modes (what if the callback never arrives?).
Failure Modes and Observability Gaps
Pre-commit blocking creates new failure surfaces:
- Scan service downtime: If the security scanner is unavailable, does the agent block all commits indefinitely?
- False positives: If the scan flags a benign pattern, the agent blocks valid code unless a human overrides
- Scan drift: If the scan rules change between agent runs, previously acceptable code may suddenly fail
- Audit trail: Who can see why a commit was blocked? Is there a log of vetoed changes?
The agent needs observability hooks to surface blocked commits. Without them, developers see “commit failed” with no context.
Code Example: Agent Decision Loop
Here’s how the agent might evaluate scan results before committing:
def should_commit(scan_result, timeout_seconds=300):
if scan_result.status == "timeout":
# Fail closed: block commit if scan times out
log_blocked_commit(reason="scan_timeout")
return False
if scan_result.status == "error":
# Fail closed: block commit if scan errors
log_blocked_commit(reason="scan_error", details=scan_result.error)
return False
if scan_result.findings:
# Block if any high or critical findings
critical = [f for f in scan_result.findings if f.severity in ["high", "critical"]]
if critical:
log_blocked_commit(reason="security_findings", findings=critical)
return False
# Pass: allow commit
return True
The agent must handle three failure cases: timeout, scan error, and security findings. Each requires a different logging strategy for post-mortem analysis.
When the Agent Should Override Itself
Some scenarios require human override:
- Emergency hotfix: Security gate blocks a critical bug fix
- False positive: Scan flags a known-safe pattern
- Scan misconfiguration: New scan rule breaks existing workflows
The agent needs an escape hatch. Options include:
--force-commitflag that bypasses the scan- Allowlist of file paths or patterns that skip scanning
- Manual approval workflow where a human reviews blocked commits
Without an override mechanism, the agent becomes a single point of failure.
Deployment Shape and Tool Call Boundaries
ORA runs as a service, not a local CLI. This means:
- Agent state persists across multiple commits
- Security scan is likely a remote API call (not a local binary)
- Commit blocking happens server-side, not in the developer’s Git hooks
The tool call boundary is between the agent and the scan service. If the scan service is slow or unreliable, the agent’s commit latency increases.
Technical Verdict
Use ORA’s self-blocking pattern when:
- You want security enforcement before code reaches version control
- Your team already uses automated security scans in CI/CD
- You can tolerate occasional false positives blocking valid commits
- You have observability to debug why commits were blocked
Avoid this pattern when:
- Your security scans are slow or unreliable (agent will block all commits)
- You need rapid iteration without gate delays
- Your team lacks tooling to override false positives
- You cannot afford a single point of failure in the commit path
The self-blocking agent is a forcing function for security hygiene, but it trades velocity for safety. If your scan service goes down, your agent stops committing code.