version: "1.1.0"
name: AI Agent
description: Security rules optimized for AI coding assistants
guards:
forbidden_path:
patterns:
- "**/.ssh/**"
- "**/id_rsa*"
- "**/id_ed25519*"
- "**/.aws/**"
- "**/.env"
- "**/.env.local"
- "**/.env.production"
- "**/.git-credentials"
- "**/.gnupg/**"
- "**/.kube/**"
- "**/.docker/**"
- "**/.npmrc"
- "/etc/shadow"
- "/etc/passwd"
- "**/AppData/Roaming/Microsoft/Credentials/**"
- "**/AppData/Local/Microsoft/Credentials/**"
- "**/AppData/Roaming/Microsoft/Vault/**"
- "**/NTUSER.DAT"
- "**/Windows/System32/config/SAM"
- "**/Windows/System32/config/SECURITY"
- "**/Windows/System32/config/SYSTEM"
exceptions:
- "**/.env.example"
- "**/.env.template"
egress_allowlist:
allow:
- "*.openai.com"
- "*.anthropic.com"
- "api.together.xyz"
- "*.fireworks.ai"
- "api.github.com"
- "github.com"
- "*.githubusercontent.com"
- "gitlab.com"
- "api.gitlab.com"
- "bitbucket.org"
- "api.bitbucket.org"
- "*.npmjs.org"
- "registry.npmjs.org"
- "registry.yarnpkg.com"
- "pypi.org"
- "files.pythonhosted.org"
- "crates.io"
- "static.crates.io"
- "rubygems.org"
- "packagist.org"
- "docs.rs"
- "*.readthedocs.io"
- "*.readthedocs.org"
- "developer.mozilla.org"
block: []
default_action: block
secret_leak:
patterns:
- name: aws_access_key
pattern: "AKIA[0-9A-Z]{16}"
severity: critical
- name: github_token
pattern: "gh[ps]_[A-Za-z0-9]{36}"
severity: critical
- name: openai_key
pattern: "sk-[A-Za-z0-9]{48}"
severity: critical
- name: anthropic_key
pattern: "sk-ant-[A-Za-z0-9\\-]{95}"
severity: critical
- name: private_key
pattern: "-----BEGIN\\s+(RSA\\s+)?PRIVATE\\s+KEY-----"
severity: critical
skip_paths:
- "**/test/**"
- "**/tests/**"
- "**/__tests__/**"
- "**/*.test.*"
- "**/*.spec.*"
- "**/fixtures/**"
- "**/mocks/**"
patch_integrity:
max_additions: 2000
max_deletions: 1000
require_balance: false
max_imbalance_ratio: 20.0
forbidden_patterns:
- "(?i)disable[\\s_\\-]?(security|auth|ssl|tls)"
- "(?i)rm\\s+-rf\\s+/"
- "(?i)chmod\\s+777"
- "(?i)reverse[_\\-]?shell"
shell_command:
enabled: true
enforce_forbidden_paths: true
mcp_tool:
allow: []
block:
- shell_exec
- run_command
require_confirmation:
- git_push
- deploy
- publish
default_action: allow
max_args_size: 2097152
prompt_injection:
enabled: true
warn_at_or_above: suspicious
block_at_or_above: high
max_scan_bytes: 200000
jailbreak:
enabled: true
detector:
block_threshold: 70
warn_threshold: 30
max_input_bytes: 200000
session_aggregation: true
settings:
fail_fast: false
verbose_logging: false
session_timeout_secs: 7200