Skip to content

Safety Model

Tier Meaning Example
SAFE Easily recreated or fully reversible dangling Docker image, __pycache__
REVIEW May affect your workflow old download, browser cache
MANUAL High risk, explicit opt-in branch on an active project
  • Read-only by default — audit and plan never modify anything.
  • Dry-run by default — clean needs --apply.
  • Hard exclusions — system directories, /, $HOME itself and any folder that contains one of your protected paths, sensitive dotfiles, symlinks that leave $HOME, active virtualenvs and .git are never touched.
  • bekas’s own data directory is excluded, so quarantine contents are never cleaned by accident.
  • Non-local filesystems (NFS, SMB, FUSE) and symlinks leaving $HOME are skipped.
  • Recently modified files (within min_quiet_hours, default 6) are skipped.
  • MANUAL is opt-in twice — plans containing MANUAL-tier candidates are refused unless --allow-manual is passed (or allow_manual: true in the profile); the typed high-risk token confirmation is still required on top, and --yes-all alone can never bypass it.
  • Credential shield — .env*, .npmrc, .pypirc, id_rsa/id_ed25519/id_ecdsa, ~/.password-store, gh CLI config, Docker config, OS keychains and browser Login Data/Cookies are protected at every depth, regardless of tier.
  • Typed confirmation for high-risk operations.
  • Signed plans detect tampering.

The full list of exclusion rules is in docs/SAFETY.md.

exclude:
- ~/code/keep-me
- "*/important/*"
- node_modules/keep

Patterns use gitignore-style matching: * stays inside one path segment, ** crosses segments, a pattern without a leading / or ~/ matches at any depth, and excluding a directory also excludes everything inside it. Exclusions are checked again when a saved plan is applied, so adding one after bekas plan --save still protects that path.