4 Commits
Author SHA1 Message Date
Gabor KörberandClaude Opus 4.6 a0345e5f12 Merge origin/main: resolve fermata botignore→botsecrets conflicts
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-11 14:08:56 +02:00
Gabor KörberandClaude Opus 4.6 7b660b3da0 📝 fermata: purge botignore.toml from all docs
Update crate README, CLAUDE.md, configuration.md, commands.md,
threat-model.md, security-philosophy.md, and tools/fermata.md to
reflect the unified .botsecrets [policy] config. No more three-file
story — it's .botignore + .botsecrets everywhere.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-26 14:12:44 +02:00
Gabor KörberandClaude Opus 4.6 ac11512f62 ♻️ fermata: unify botignore.toml into .botsecrets [policy] sections
Delete botignore.toml as a config file entirely. Per-operation policy
rules (read/write/bash) now live in .botsecrets under [policy.read],
[policy.write], and [policy.bash]. This reduces fermata's config story
to two files: .botignore (gitignore syntax) and .botsecrets (TOML).

Changes:
- Add PolicyConfig, OpRules, BashRules to secrets/config.rs with
  layer merge support
- Rewrite policy.rs to load from SecretsConfig instead of BotignoreToml
- Remove toml_config.rs module entirely
- Remove botignore.toml from project root strong markers
- Update all tests to use .botsecrets [policy.*] sections
- Update error messages to reference .botsecrets

All 194 tests pass.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-26 12:54:23 +02:00
Gabor KörberandClaude Opus 4.6 087429d275 ✨ feat(fermata): add secret filtering engine — the security brain
Implement Goals 1–3 and 5 from the reveal-layer security brain goal.
fermata now detects, redacts, and scans for secrets in AI agent tool
output, filling the ecosystem gap where no coding agent filters secrets
post-read.

New core/secrets/ module:
- config.rs: .botsecrets TOML format with hierarchical merge and ~40
  built-in key patterns
- parser.rs: multi-format secret file parser (.env, TOML, YAML, JSON,
  Python assignments, Java properties)
- manifest.rs: file discovery + parsing → known-secrets set
- redactor.rs: Aho-Corasick multi-pattern replacement with 4 styles
- scanner.rs: RegexSet heuristic detection with 35 gitleaks-derived
  patterns (MIT) and Shannon entropy filtering
- patterns.rs: curated rules for AWS, GitHub, Stripe, Slack, JWT, etc.

Hook integration:
- fermata hook --event post-tool-use reads tool output, runs redactor +
  scanner, returns updatedToolOutput for Claude Code
- Backward compatible: --event pre-tool-use (default) unchanged
- Fail-open: errors produce {} and exit 0

Library API:
- Redactor::new(manifest, style).redact(text) → RedactedText
- Scanner::new(config).scan(text) → Vec<Finding>
- Compiles without CLI feature for embedding in other crates

195 tests (130 new), all passing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-25 17:29:07 +02:00