Skip to content

General Bots Security Policy 🟑 BETA

State the security policy in terms of the controls that exist in code and the evidence an operator can collect; keep aspirational clauses out.

Admin guide Β· policy evidence runbook

When to use Before you start Steps Verify Roll back
Answering a policy questionnaire, reviewing a control Source checkout, deployment access Map clause to enforcement, collect evidence Every clause has an authority Restore prior config if a clause was applied

When to use

Use this runbook when a policy statement must be backed by an implementation. A clause with no authority is removed rather than softened.

Before you start

  • The repository AGENTS.md is the authority for production rules: no panics, SafeCommand, log_and_sanitize, sql_guard, CSRF, IMP-07 rate limits, IMP-09 headers and IMP-10 dependency policy.
  • Component versions come from botserver/3rdparty.toml; the product version from the root Cargo.toml.
  • Passwords and MFA belong to the directory service (Zitadel); credentials live in Vault; token and unseal key files are under /tmp.
  • Use hostnames and environment variables; never record an internal IP address.

Policy areas

Area Enforcement Evidence
Access control RBAC tables and route gates resolve_user_role consumers and probe
Password and MFA directory service directory configuration
Data protection Vault, scoped storage keys Vault paths and bucket prefixes
Encryption in transit Caddy and service TLS caddy validate and header probe
Incident response incident response dated record
Backup and recovery restore runbook snapshot list and drill
Change management deploy runbook CI run and deploy marker
Vulnerability management cargo audit and advisory feeds audit output
Vendor security pinned versions in 3rdparty.toml manifest and checksums

Steps

# 1. Map each clause to a file before accepting it into the policy.
grep -RIn "log_and_sanitize\|sql_guard\|SafeCommand\|governor" \
  botserver/src botserver/crates --include='*.rs' | head -30

# 2. Collect the deployment evidence into /tmp.
curl -sI http://localhost:8080/health > /tmp/policy-headers.txt
sudo incus snapshot list tables > /tmp/policy-snapshots.txt
cargo audit > /tmp/policy-audit.txt

# 3. Check that the advisory publication authority is documented.
grep -n "<GBSA-ID>" scripts/published_advisories.txt

Verify

Check Command / surface Pass condition
Clause authority source grep every clause has a file or command
Headers /tmp/policy-headers.txt six IMP-09 headers present
Snapshots /tmp/policy-snapshots.txt pre-change snapshot exists
Audit /tmp/policy-audit.txt no unpatched critical advisory
Secrets repository search no credential or internal address

Roll back

πŸ”΄ A policy document change is reverted through version control. If a policy clause was applied as a configuration change, restore the prior value from Vault or snapshot and re-run the table.