Guard — catch AI risk before it ships
Guard is authoring-time protection: catch AI-written and AI-adjacent risk in the editor, PR, and CI before it reaches production. Runtime agent governance lives in Govern — same Monitor Mode discipline, different control point.
Added value
| Without Guard | With Guard |
|---|---|
| LLM-speed code merges unreviewed | Deterministic findings on secrets, insecure patterns, IaC, typosquats |
| CI fails on whole-file noise | Diff-aware scan judges added lines only |
| Separate local vs CI tools | One detector floor: CLI = IDE = Action = API |
| Day-one break-the-build | Monitor Mode → enforce when signal is trusted |
What it catches
| Category | Examples |
|---|---|
| Secrets & PII | AWS keys, tokens, private keys, Luhn-valid credit cards |
| Insecure code (LLM-typical) | eval/exec, command injection, disabled TLS, weak crypto, dangerouslySetInnerHTML, broad CORS, unsafe deserialization |
| IaC exposure | public S3, iam:*, 0.0.0.0/0, public databases, broad AI IAM (bedrock:*) |
| Hallucinated / typosquatted deps | packages an LLM invented, or a near-miss of a popular one |
| Agent / MCP risk at commit | Unregistered agents, risky configs, new tool permissions (feeds Govern) |
Full reference with examples: What Unveilr detects.
Local scan (developer)
unveilr scan # observe: reports, exits 0
unveilr scan --json # IDE / scripts
VS Code / Cursor extension: Problems panel from the same --json output —
Developer experience.
Console path: /findings
Capture: list sorted by risk score / blast-radius; open one finding with path
and severity.
Story it tells: “AppSec triages AI-SDLC risk the way they triage other vulns.”
Console path: /remediation and the Findings drawer
On a connected GitHub repo with App contents + pull_requests write accepted
on the installation, Open fix PR opens a remediation branch/PR. Ticket
actions remain available without write.
CI gate — Monitor Mode → Enforce
unveilr scan --mode enforce --fail-on high
Exit codes: observe → always 0; enforce → 1 when a finding is at or above
--fail-on (info | low | medium | high | critical, default high).
GitHub Action (recommended):
- uses: unveilr/scan-action@v1
with:
mode: observe
fail-on: high
Where: GitHub PR checks + inline annotation on an added line.
Story it tells: “We block (or advise on) the risk this PR introduced.”
PR checks — judge only what a change introduces
git diff origin/main...HEAD > /tmp/pr.diff
unveilr scan --diff /tmp/pr.diff --mode enforce --fail-on high
The diff scanner keeps only findings on added lines. See Integrations for the GitHub PR-check API and Actions setup.
Authoring-time ↔ runtime
Authoring-time Guard secures the code assistants write; Govern secures the actions agents take. Unregistered agents discovered at scan time become high-severity findings that can fail the PR that would ship them — then Govern owns the live credential and tool scope.
Where to next
- Govern — Gateway, scopes, approvals, sessions.
- Prove — triage, blast-radius, evidence, compliance.
- Integrations — wire Guard into CI and tickets.