Concepts
Trust Model
The trust model combines cryptographic signing, local-first secrets, policy-gated agent operations, and machine-verifiable attestation.
Threat Model Summary
| Threat | Mitigation |
|---|---|
| Unauthorized code execution on the workstation | Signed commits, shellcheck gates, no curl | sh in install path |
| Secret leakage into Git history | Age/SOPS encryption, gitleaks in CI, detect-secrets baseline |
| Tampered upstream tool | SHA256-pinned chezmoi installer, SBOM + Grype CVE scan |
| Malicious agent behavior | MCP policy enforcement, agent profile allowlists, attestation logs |
| Compromised fleet host | Per-host signing keys, attestation comparison, dot chaos self-tests |
| Downgrade attacks | Version-sync enforcement, signed release tags |
Identity and Signing
SSH ED25519 for Git
Every commit on main is signed with SSH ED25519:
# Good "git" signature for [email protected] with ED25519 key SHA256:...
The trust anchor is the signer's public key published in ~/.ssh/allowed_signers. CI enforces signature verification on every PR.
Verified Chezmoi Installer
The install.sh script prefers tools/ci/install-chezmoi-verified.sh, which:
- Downloads chezmoi from the upstream release URL
- Verifies the SHA256 checksum against a hardcoded, version-pinned value
- Falls back to
get.chezmoi.ioonly if the verified path is unavailable
No unverified binary is ever executed.
Secrets
Three Layers
- Repository-managed config (
dot_config/**/*.tmpl) — checked into Git, no secrets - Local-only config (
~/.config/*.local) — gitignored, user-edited - Encrypted secrets (Age-encrypted
private_*files, SOPS YAML) — checked in, decrypted on apply
Example encrypted file:
dot_config/api-keys.yaml.sops.yaml # SOPS-encrypted, safe to commit
Decryption uses the user's Age private key at ~/.config/age/keys.txt. Chezmoi invokes age or sops automatically during apply.
Secret Scanning
CI runs three independent scanners:
| Scanner | Purpose | Threshold |
|---|---|---|
gitleaks | Pattern-based secret detection | Zero leaks on main |
detect-secrets | Baseline-comparing scanner | Zero new secrets vs .secrets.baseline |
trufflehog | Verified-secret scanner (API-tested) | Zero verified secrets |
All three must pass for a commit to be merged.
Agent Policy Enforcement
AI agent operations (Claude Code, Codex, Copilot, Antigravity CLI, etc.) are governed by the Model Context Protocol (MCP) policy in dot_config/dotfiles/mcp.json and validated by dot mcp.
Policy Structure
Enforcement Points
- On agent start —
dot mcp --strictvalidates the registry matches the policy hash - Per-tool call — MCP-aware agents check the policy before invoking a tool
- On commit —
dot attestrecords the active policy hash in the attestation log
Violations are logged to ~/.local/state/dotfiles/mcp-violations.log and reported by dot doctor.
Attestation
dot attest generates a signed JSON document containing:
The document is:
- Signed with the user's SSH ED25519 key
- Stored at
~/.local/state/dotfiles/attestation/YYYY-MM-DD-HHMMSS.json - Optionally published to
~/.dotfiles/docs/attestations/for team review
Verifying Someone Else's Attestation
# ✓ Signature valid (ED25519)
# ✓ Policy hash matches repository
# ✓ Tool versions within supported range
Fleet Trust Propagation
Across multiple hosts, trust is established by:
- Each host generates its own SSH key pair
- Each host's public key is added to
~/.ssh/allowed_signerson every other host - Attestations from any host can be verified by any other host
dot fleetcompares attestations across the fleet and flags drift
See Fleet Architecture for the full model.
CI-Level Gates
| Gate | Workflow | Blocks Merge |
|---|---|---|
| Signed commits | ci-enforced.yml | Yes |
| Shellcheck zero-warnings | ci.yml | Yes |
| Gitleaks scan | ci.yml | Yes |
| Copyright headers | ci-enforced.yml | Yes |
| 100% executable module mapping | ci-enforced.yml | Yes |
| Measured Bash line coverage | coverage.yml | Ratcheted floor; see docs/operations/COVERAGE.md |
| Reliability (macOS + Linux) | ci-enforced.yml | Yes |
| Checkov infrastructure scan | ci-enforced.yml | On severity MEDIUM+ |
| SBOM (CycloneDX) | ci.yml | No (informational) |
| Grype CVE scan | ci.yml | On severity CRITICAL |
| Lychee link check | ci.yml (nightly) | No |
Principles
- Local-first — nothing leaves the workstation unless the user opts in
- Zero trust in transit — every network-fetched artifact is checksum-verified
- Machine-readable evidence — human-readable summaries are backed by signed JSON
- Reversible —
dot rollbackundoes any change with a single command