.fooguard.yml — repository policy-as-code
Define scan paths and repository security policy in Git source control.
Overview
The .fooguard.yml file at your repository root is repository policy-as-code (legacy .agentguard.yml is still supported). It tells Foo Guard which paths to scan and declares repository-level security policy thresholds that GitHub scanning and CI consume at the scanned commit SHA.
This is distinct from organization policy, which is configured in the Foo Guard Team UI and acts as a mandatory floor that cannot be weakened by repository settings.
Supported schema (version 1)
version: 1
scan:
paths:
- agents/
include:
- "**/*.yaml"
- "**/*.json"
exclude:
- "**/fixtures/**"
policy:
failOn: high # critical | high | medium
minGrade: B # optional: A | B | C | D | F
limits:
maxFiles: 50
maxFileBytes: 524288
maxTotalBytes: 10485760Scan paths
| Field | Purpose |
|-------|---------|
| `scan.paths` | Directories to scan (default: repository root) |
| `scan.include` | Glob patterns for files to include |
| `scan.exclude` | Glob patterns to exclude |
Repository policy
| Field | Purpose |
|-------|---------|
| `policy.failOn` | Fail when findings at or above this severity exist |
| `policy.minGrade` | Fail when grade is below this letter grade |
These are the only policy controls supported in .fooguard.yml today. Allowlists, blocklists, and rule suppressions are not supported in this phase.
Effective policy precedence
When Foo Guard evaluates policy, it merges sources and applies the strictest threshold:
| Source | Scope | Configured via |
|--------|-------|----------------|
| Organization policy | Team-wide mandatory floor | Foo Guard Team UI / API |
| Repository policy | Single repository | `.fooguard.yml` in Git |
| CLI overrides | Single CI/local run | `--fail-on`, `--min-grade` flags |
| Default | Fallback | `failOn: high` |
Example: if organization policy sets failOn: high and repository policy sets failOn: medium, the effective threshold is medium (stricter).
Organization policy cannot be weakened by repository settings.
Who reads this file
- Team GitHub App — reads
.fooguard.yml(or legacy.agentguard.yml) at the scanned commit SHA during PR and push scans - CLI / GitHub Action — reads
.fooguard.yml(or legacy.agentguard.yml) from the working tree (when present) and merges with CLI flags
What this is not
- Not organization policy-as-code — org policy is managed in the Foo Guard SaaS UI, versioned with audit history
- Not runtime enforcement —
.fooguard.ymlgoverns pre-deployment scanning and CI gates, not live agent execution - Not a full rules engine config — individual rule enable/disable and allow/block server lists are not supported