Skip to content
Foo GuardDocs
DOCUMENTATION

.fooguard.yml — repository policy-as-code

Define scan paths and repository security policy in Git source control.

Page text and source link for your AI assistant. Nothing is sent automatically.

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: 10485760

Scan paths

FieldPurpose
scan.pathsDirectories to scan (default: repository root)
scan.includeGlob patterns for files to include
scan.excludeGlob patterns to exclude

Repository policy

FieldPurpose
policy.failOnFail when findings at or above this severity exist
policy.minGradeFail 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:

SourceScopeConfigured via
Organization policyTeam-wide mandatory floorFoo Guard Team UI / API
Repository policySingle repository.fooguard.yml in Git
CLI overridesSingle CI/local run--fail-on, --min-grade flags
DefaultFallbackfailOn: 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.yml governs 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

Related pages

Build confidently. Keep your agents accountable.Get help ↗
Search Foo Guard Docs