@sebastienrousseau/dotfiles 0.2.520 → 0.2.522

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (323) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/LICENSE-APACHE +190 -0
  3. package/LICENSE-MIT +21 -0
  4. package/README.md +43 -37
  5. package/install.sh +76 -10
  6. package/package.json +7 -7
  7. package/tools/README.md +49 -0
  8. package/tools/ci/install-chezmoi-verified.sh +68 -0
  9. package/docs/.vitepress/reports/localization-readability-audit.md +0 -73
  10. package/docs/AI.md +0 -179
  11. package/docs/ARCHITECTURE.md +0 -117
  12. package/docs/CNAME +0 -1
  13. package/docs/CONFIG_STRATEGY.md +0 -124
  14. package/docs/COPYRIGHT +0 -7
  15. package/docs/ECOSYSTEM.md +0 -220
  16. package/docs/GOLD-STANDARD-AUDIT.md +0 -352
  17. package/docs/GOVERNANCE.md +0 -98
  18. package/docs/MAINTAINERS.md +0 -41
  19. package/docs/MINIMUM-TOOLCHAIN.md +0 -100
  20. package/docs/NAMING_CONVENTIONS.md +0 -102
  21. package/docs/OPENCODE.md +0 -127
  22. package/docs/README.md +0 -84
  23. package/docs/STRUCTURE.md +0 -102
  24. package/docs/adr/ADR-001-ci-cd-pipeline.md +0 -118
  25. package/docs/adr/ADR-002-shell-performance.md +0 -130
  26. package/docs/adr/ADR-003-security-first.md +0 -158
  27. package/docs/adr/ADR-004-cli-architecture.md +0 -171
  28. package/docs/adr/ADR-005-chezmoi-choice.md +0 -99
  29. package/docs/adr/ADR-006-shell-selection.md +0 -124
  30. package/docs/adr/ADR-007-multi-shell-parity.md +0 -62
  31. package/docs/adr/ADR-008-alias-system-architecture.md +0 -95
  32. package/docs/adr/ADR-009-wallpaper-driven-theming.md +0 -131
  33. package/docs/adr/ADR-010-starship-transient-prompt.md +0 -144
  34. package/docs/adr/ADR-011-nushell-tier3-keep.md +0 -144
  35. package/docs/adr/ADR-012-ai-fleet-local-proxy.md +0 -79
  36. package/docs/adr/README.md +0 -40
  37. package/docs/architecture/AI_COST_OPTIMIZATION.md +0 -144
  38. package/docs/architecture/ARCHITECTURE.md +0 -20
  39. package/docs/architecture/INTEROP.md +0 -44
  40. package/docs/architecture/REPO_LAYOUT.md +0 -241
  41. package/docs/architecture/WALKTHROUGH.md +0 -86
  42. package/docs/architecture/fleet-deployment.md +0 -77
  43. package/docs/archive/EUXIS_2026_REVIEW.md +0 -127
  44. package/docs/archive/LEGACY_ROADMAP.md +0 -6
  45. package/docs/archive/MILESTONE_v0.2.493.md +0 -47
  46. package/docs/archive/PLAN.md +0 -199
  47. package/docs/archive/REPO_AUDIT.md +0 -31
  48. package/docs/articles/.pages +0 -6
  49. package/docs/articles/2026-07-05-custom-mkdocs-material-dark-theme.md +0 -216
  50. package/docs/articles/2026-07-05-fish-startup-abbr.md +0 -153
  51. package/docs/articles/2026-07-05-master-to-main-rename-runbook.md +0 -128
  52. package/docs/articles/index.md +0 -36
  53. package/docs/guides/INSTALL.md +0 -144
  54. package/docs/guides/MACOS_ICLOUD_SYMLINKS.md +0 -121
  55. package/docs/guides/NEOVIM_IDE_GUIDE.md +0 -61
  56. package/docs/guides/THEMING.md +0 -230
  57. package/docs/guides/TROUBLESHOOTING.md +0 -176
  58. package/docs/guides/WSL2_NIX_TROUBLESHOOTING.md +0 -792
  59. package/docs/index.md +0 -132
  60. package/docs/interop/A2A.md +0 -39
  61. package/docs/interop/POWERSHELL.md +0 -102
  62. package/docs/manual/00-introduction.md +0 -89
  63. package/docs/manual/01-concepts/01-architecture.md +0 -138
  64. package/docs/manual/01-concepts/02-trust-model.md +0 -183
  65. package/docs/manual/01-concepts/03-theme-engine.md +0 -186
  66. package/docs/manual/01-concepts/04-fleet.md +0 -148
  67. package/docs/manual/01-concepts/05-self-healing.md +0 -204
  68. package/docs/manual/02-tutorials/01-first-install.md +0 -197
  69. package/docs/manual/02-tutorials/02-add-wallpaper.md +0 -216
  70. package/docs/manual/02-tutorials/03-create-profile.md +0 -244
  71. package/docs/manual/02-tutorials/04-encrypt-secret.md +0 -281
  72. package/docs/manual/02-tutorials/05-deploy-fleet.md +0 -283
  73. package/docs/manual/03-reference/01-dot-cli.md +0 -475
  74. package/docs/manual/03-reference/02-config-files.md +0 -265
  75. package/docs/manual/03-reference/03-environment.md +0 -124
  76. package/docs/manual/03-reference/04-templates.md +0 -190
  77. package/docs/manual/03-reference/05-feature-flags.md +0 -187
  78. package/docs/manual/04-cookbook/01-recipes.md +0 -285
  79. package/docs/manual/04-cookbook/02-troubleshooting.md +0 -351
  80. package/docs/manual/04-cookbook/03-faq.md +0 -175
  81. package/docs/manual/05-appendices/A-platform-matrix.md +0 -101
  82. package/docs/manual/05-appendices/B-security-checklist.md +0 -85
  83. package/docs/manual/05-appendices/C-glossary.md +0 -40
  84. package/docs/manual/05-appendices/D-bibliography.md +0 -58
  85. package/docs/manual/05-appendices/E-license.md +0 -38
  86. package/docs/manual/_toc.yml +0 -58
  87. package/docs/manual/command-index.md +0 -175
  88. package/docs/manual/concept-index.md +0 -170
  89. package/docs/manual/index.md +0 -66
  90. package/docs/migration/README.md +0 -81
  91. package/docs/migration/from-bare-git-repo.md +0 -156
  92. package/docs/migration/from-gnu-stow.md +0 -165
  93. package/docs/migration/from-plain-chezmoi.md +0 -148
  94. package/docs/migration/from-yadm.md +0 -187
  95. package/docs/operations/ARCHITECTURE_ROADMAP.md +0 -7
  96. package/docs/operations/ATTESTATION.md +0 -44
  97. package/docs/operations/CI_CADENCE.md +0 -107
  98. package/docs/operations/CI_COMPOSITES.md +0 -156
  99. package/docs/operations/COMPLETIONS.md +0 -123
  100. package/docs/operations/COVERAGE.md +0 -204
  101. package/docs/operations/DRIFT.md +0 -107
  102. package/docs/operations/HARD_AUDIT_2026.md +0 -631
  103. package/docs/operations/MAINTENANCE.md +0 -63
  104. package/docs/operations/MANIFEST.md +0 -127
  105. package/docs/operations/MIGRATION.md +0 -109
  106. package/docs/operations/OPERATIONS.md +0 -188
  107. package/docs/operations/PERFORMANCE.md +0 -133
  108. package/docs/operations/PERFORMANCE_BUDGETS.md +0 -196
  109. package/docs/operations/REGISTRY.md +0 -90
  110. package/docs/operations/RELEASE_PIPELINE.md +0 -128
  111. package/docs/operations/RELIABILITY.md +0 -122
  112. package/docs/operations/RFC_v0_2_503_reorganization.md +0 -280
  113. package/docs/operations/ROADMAP.md +0 -10
  114. package/docs/operations/ROADMAP_2026.md +0 -7
  115. package/docs/operations/ROADMAP_V0_2_503.md +0 -10
  116. package/docs/operations/TESTING.md +0 -216
  117. package/docs/operations/TRACEABILITY.md +0 -44
  118. package/docs/operations/TRUSTED_AGENT_WORKSTATION.md +0 -65
  119. package/docs/operations/VERSION_SYNC.md +0 -393
  120. package/docs/packaging.md +0 -222
  121. package/docs/reference/ALIASES.md +0 -131
  122. package/docs/reference/ALIASES_CHEATSHEET.md +0 -32
  123. package/docs/reference/ALIASES_DEPRECATIONS.md +0 -13
  124. package/docs/reference/FEATURE-MATRIX.md +0 -646
  125. package/docs/reference/FEATURES.md +0 -66
  126. package/docs/reference/FONTS.md +0 -112
  127. package/docs/reference/POWERSHELL_PARITY.md +0 -82
  128. package/docs/reference/PROFILES.md +0 -69
  129. package/docs/reference/SCREENSHOTS.md +0 -121
  130. package/docs/reference/SCRIPTS.md +0 -71
  131. package/docs/reference/SUPPORT_MATRIX.md +0 -80
  132. package/docs/reference/THEMES.md +0 -117
  133. package/docs/reference/TOOLS.md +0 -110
  134. package/docs/reference/UTILS.md +0 -243
  135. package/docs/registry.json +0 -6
  136. package/docs/schema/dot-env-v1.json +0 -110
  137. package/docs/schema/dot-registry-v1.json +0 -33
  138. package/docs/security/AI_ACT_COMPLIANCE.md +0 -94
  139. package/docs/security/AUDIT_BYPASS.md +0 -103
  140. package/docs/security/AUTOMATION_SECRETS.md +0 -26
  141. package/docs/security/CI_EGRESS_ALLOWLIST.md +0 -127
  142. package/docs/security/CI_PINNING.md +0 -129
  143. package/docs/security/COMMIT_SIGNING.md +0 -138
  144. package/docs/security/COMPLIANCE.md +0 -458
  145. package/docs/security/DEPS_DEV_EXCEPTIONS.md +0 -86
  146. package/docs/security/DISCLOSURE.md +0 -130
  147. package/docs/security/ENCRYPTION.md +0 -57
  148. package/docs/security/FMEA.md +0 -159
  149. package/docs/security/FUZZING.md +0 -209
  150. package/docs/security/HISTORY_FILTERING.md +0 -132
  151. package/docs/security/INCIDENT_RESPONSE.md +0 -579
  152. package/docs/security/INSTALL_VERIFICATION.md +0 -122
  153. package/docs/security/KEYS.md +0 -49
  154. package/docs/security/KEY_ROTATION.md +0 -303
  155. package/docs/security/MCP_POLICY.md +0 -78
  156. package/docs/security/POLICY_RELEASES.md +0 -37
  157. package/docs/security/README.md +0 -28
  158. package/docs/security/SCORECARD.md +0 -195
  159. package/docs/security/SECRETS.md +0 -158
  160. package/docs/security/SECURITY.md +0 -45
  161. package/docs/security/SECURITY_CHECKLIST.md +0 -55
  162. package/docs/security/SHELL_EXEMPTIONS.md +0 -145
  163. package/docs/security/SOUP_REGISTER.md +0 -36
  164. package/docs/security/THREAT_MODEL.md +0 -130
  165. package/docs/security/VERIFICATION_VALIDATION.md +0 -228
  166. package/docs/security/VERIFY_RELEASE.md +0 -201
  167. package/docs/security/security-pubkey.asc +0 -15
  168. package/docs/stylesheets/extra.css +0 -444
  169. package/docs/themes/README.md +0 -10
  170. package/docs/themes/VISUAL_INTEGRITY_REPORT.md +0 -30
  171. package/docs/themes/hero-shot.svg +0 -78
  172. package/scripts/README.md +0 -123
  173. package/scripts/ci/check-copyright-headers.sh +0 -8
  174. package/scripts/ci/check-shell-preamble.sh +0 -8
  175. package/scripts/ci/guard-gitleaks-checkout.sh +0 -8
  176. package/scripts/demo/record.sh +0 -43
  177. package/scripts/diagnostics/a2a-conformance.sh +0 -163
  178. package/scripts/diagnostics/alias-governance.sh +0 -165
  179. package/scripts/diagnostics/aliases-cheatsheet.sh +0 -74
  180. package/scripts/diagnostics/aliases-manifest.sh +0 -77
  181. package/scripts/diagnostics/attest-verify.sh +0 -147
  182. package/scripts/diagnostics/benchmark.sh +0 -408
  183. package/scripts/diagnostics/conflicts.sh +0 -73
  184. package/scripts/diagnostics/doctor-unified.sh +0 -43
  185. package/scripts/diagnostics/doctor.sh +0 -797
  186. package/scripts/diagnostics/drift-dashboard.sh +0 -203
  187. package/scripts/diagnostics/health.sh +0 -656
  188. package/scripts/diagnostics/history-analysis.sh +0 -86
  189. package/scripts/diagnostics/mcp-doctor.sh +0 -582
  190. package/scripts/diagnostics/perf.sh +0 -453
  191. package/scripts/diagnostics/scorecard.sh +0 -120
  192. package/scripts/diagnostics/secret-governance.sh +0 -65
  193. package/scripts/diagnostics/security-score.sh +0 -467
  194. package/scripts/diagnostics/smoke-test.sh +0 -88
  195. package/scripts/diagnostics/snapshot.sh +0 -90
  196. package/scripts/diagnostics/verify.sh +0 -108
  197. package/scripts/diagnostics/verify_state.sh +0 -73
  198. package/scripts/diagnostics/version-locks.sh +0 -94
  199. package/scripts/diagnostics/workstation-attestation.sh +0 -212
  200. package/scripts/dot/commands/agent.sh +0 -535
  201. package/scripts/dot/commands/agents.sh +0 -352
  202. package/scripts/dot/commands/ai.sh +0 -600
  203. package/scripts/dot/commands/aliases.sh +0 -277
  204. package/scripts/dot/commands/appearance.sh +0 -110
  205. package/scripts/dot/commands/completion.sh +0 -171
  206. package/scripts/dot/commands/core.sh +0 -217
  207. package/scripts/dot/commands/diagnostics.sh +0 -265
  208. package/scripts/dot/commands/env-emit.sh +0 -203
  209. package/scripts/dot/commands/fleet.sh +0 -711
  210. package/scripts/dot/commands/init.sh +0 -185
  211. package/scripts/dot/commands/lint.sh +0 -208
  212. package/scripts/dot/commands/manual.sh +0 -169
  213. package/scripts/dot/commands/meta.sh +0 -438
  214. package/scripts/dot/commands/patterns.sh +0 -55
  215. package/scripts/dot/commands/registry.sh +0 -455
  216. package/scripts/dot/commands/restore.sh +0 -232
  217. package/scripts/dot/commands/secrets.sh +0 -296
  218. package/scripts/dot/commands/security.sh +0 -102
  219. package/scripts/dot/commands/tools.sh +0 -570
  220. package/scripts/dot/data/alias-deprecations.tsv +0 -2
  221. package/scripts/dot/powershell/Dot.psm1 +0 -319
  222. package/scripts/fonts/install-nerd-fonts.sh +0 -75
  223. package/scripts/fonts/patch-fonts.sh +0 -36
  224. package/scripts/git-hooks/install.sh +0 -12
  225. package/scripts/git-hooks/pre-commit +0 -12
  226. package/scripts/git-hooks/pre-commit-audit.sh +0 -146
  227. package/scripts/git-hooks/pre-push +0 -105
  228. package/scripts/git-hooks/prepare-commit-msg +0 -29
  229. package/scripts/lib/secrets_provider.sh +0 -200
  230. package/scripts/nvim/headless-upgrade.lua +0 -81
  231. package/scripts/ops/ai-setup.sh +0 -71
  232. package/scripts/ops/bundle.sh +0 -104
  233. package/scripts/ops/chaos.sh +0 -50
  234. package/scripts/ops/chezmoi-apply.sh +0 -333
  235. package/scripts/ops/chezmoi-diff.sh +0 -16
  236. package/scripts/ops/chezmoi-remove.sh +0 -46
  237. package/scripts/ops/chezmoi-update.sh +0 -67
  238. package/scripts/ops/heal-chezmoi.sh +0 -87
  239. package/scripts/ops/heal-system.sh +0 -129
  240. package/scripts/ops/heal-tools.sh +0 -297
  241. package/scripts/ops/heal.sh +0 -223
  242. package/scripts/ops/post-apply-repair.sh +0 -107
  243. package/scripts/ops/prewarm.sh +0 -128
  244. package/scripts/ops/release.sh +0 -262
  245. package/scripts/ops/rollback.sh +0 -613
  246. package/scripts/ops/setup.sh +0 -138
  247. package/scripts/ops/teleport.sh +0 -34
  248. package/scripts/qa/check-feature-matrix.sh +0 -296
  249. package/scripts/qa/check-version-consistency.sh +0 -12
  250. package/scripts/qa/coverage-baseline.sh +0 -61
  251. package/scripts/qa/docs-coverage.sh +0 -118
  252. package/scripts/qa/examples-coverage.sh +0 -94
  253. package/scripts/qa/powershell-contract.ps1 +0 -95
  254. package/scripts/qa/reliability-audit.sh +0 -139
  255. package/scripts/qa/scorecard-snapshot.sh +0 -128
  256. package/scripts/qa/traceability-coverage.sh +0 -124
  257. package/scripts/qa/validate-examples.sh +0 -90
  258. package/scripts/qa/wsl-contract.sh +0 -12
  259. package/scripts/secrets/age-init.sh +0 -82
  260. package/scripts/secrets/create-secrets-file.sh +0 -46
  261. package/scripts/secrets/encrypt-ssh-key.sh +0 -44
  262. package/scripts/security/backup.sh +0 -58
  263. package/scripts/security/check-disclosure-key-expiry.sh +0 -111
  264. package/scripts/security/dns-doh.sh +0 -52
  265. package/scripts/security/encryption-check.sh +0 -55
  266. package/scripts/security/enforce-policies.sh +0 -552
  267. package/scripts/security/firewall.sh +0 -91
  268. package/scripts/security/lock-configs.sh +0 -67
  269. package/scripts/security/lock-screen.sh +0 -56
  270. package/scripts/security/manage-secrets.sh +0 -429
  271. package/scripts/security/ssh-cert.sh +0 -204
  272. package/scripts/security/telemetry-kill.sh +0 -51
  273. package/scripts/security/usb-safety.sh +0 -52
  274. package/scripts/theme/apply-gnome-theme.sh +0 -333
  275. package/scripts/theme/extract-heic-frames.sh +0 -115
  276. package/scripts/theme/extract-theme.py +0 -1020
  277. package/scripts/theme/install-boot-logo.sh +0 -63
  278. package/scripts/theme/install-catppuccin-themes.sh +0 -371
  279. package/scripts/theme/install-cursors.sh +0 -26
  280. package/scripts/theme/install-file-icons.sh +0 -27
  281. package/scripts/theme/install-grub-theme.sh +0 -62
  282. package/scripts/theme/install-lock-icon.sh +0 -31
  283. package/scripts/theme/merge-wallpaper.sh +0 -146
  284. package/scripts/theme/rebuild-themes.sh +0 -603
  285. package/scripts/theme/switch.sh +0 -476
  286. package/scripts/theme/wallpaper-rotate.sh +0 -137
  287. package/scripts/theme/wallpaper-sync.sh +0 -690
  288. package/scripts/tools/cmatrix.sh +0 -22
  289. package/scripts/tools/detect-collisions.py +0 -103
  290. package/scripts/tools/emoji-picker.sh +0 -49
  291. package/scripts/tools/figlet-banner.sh +0 -19
  292. package/scripts/tools/log-rotate.sh +0 -31
  293. package/scripts/tools/lolcat-wrap.sh +0 -20
  294. package/scripts/tools/pipes.sh +0 -49
  295. package/scripts/tuning/linux.sh +0 -186
  296. package/scripts/tuning/macos.sh +0 -56
  297. package/scripts/uninstall.sh +0 -86
  298. package/scripts/verify-release-versions +0 -156
  299. package/scripts/version-sync.sh +0 -714
  300. package/templates/chezmoi-data/geekom-a9.toml.example +0 -21
  301. package/templates/chezmoi-data/mac-m1.toml.example +0 -16
  302. package/templates/chezmoi-data/mac-t2-linux.toml.example +0 -21
  303. package/templates/chezmoi-data/surface-pro-7p.toml.example +0 -21
  304. package/templates/projects/go/.github/workflows/ci.yml +0 -31
  305. package/templates/projects/go/README.md +0 -7
  306. package/templates/projects/go/cmd/__PROJECT_NAME__/main.go +0 -8
  307. package/templates/projects/go/go.mod +0 -3
  308. package/templates/projects/go/go.sum +0 -0
  309. package/templates/projects/molecule/README.md +0 -7
  310. package/templates/projects/molecule/converge.yml +0 -7
  311. package/templates/projects/molecule/molecule.yml +0 -16
  312. package/templates/projects/node/.github/workflows/ci.yml +0 -30
  313. package/templates/projects/node/README.md +0 -7
  314. package/templates/projects/node/package-lock.json +0 -12
  315. package/templates/projects/node/package.json +0 -10
  316. package/templates/projects/node/src/index.js +0 -3
  317. package/templates/projects/packer/README.md +0 -15
  318. package/templates/projects/packer/main.pkr.hcl +0 -15
  319. package/templates/projects/python/.github/workflows/ci.yml +0 -34
  320. package/templates/projects/python/README.md +0 -7
  321. package/templates/projects/python/pyproject.toml +0 -25
  322. package/templates/projects/python/src/__PROJECT_NAME__/__init__.py +0 -2
  323. package/templates/projects/python/tests/test_basic.py +0 -3
@@ -1,57 +0,0 @@
1
- ---
2
- render_with_liquid: false
3
- ---
4
-
5
- # Secrets Encryption with SOPS and age
6
-
7
- ## Quick Start
8
-
9
- ```bash
10
- # 1. Generate an age key (one-time)
11
- mkdir -p ~/.config/sops/age
12
- age-keygen -o ~/.config/sops/age/keys.txt
13
-
14
- # 2. Get your public key
15
- age-keygen -y ~/.config/sops/age/keys.txt
16
- # Output: age1abc123...
17
-
18
- # 3. Update .sops.yaml with your public key
19
- # Replace the placeholder key in .sops.yaml with your actual public key
20
-
21
- # 4. Encrypt a file
22
- sops --encrypt --age $(age-keygen -y ~/.config/sops/age/keys.txt) secrets.yaml > secrets.sops.yaml
23
-
24
- # 5. Edit encrypted files
25
- sops secrets.sops.yaml
26
- ```
27
-
28
- ## Key Management
29
-
30
- - **Private key**: `~/.config/sops/age/keys.txt` — never commit this file.
31
- - **Public key**: Safe to share. It lives in `.sops.yaml`.
32
- - **Backup**: Keep your private key in a password manager or a hardware security module.
33
-
34
- ## Recovery
35
-
36
- If you lose your age private key, follow these steps:
37
-
38
- 1. Create a new key: `age-keygen -o ~/.config/sops/age/keys.txt`
39
- 2. Re-encrypt all secrets with the new public key.
40
- 3. Update `.sops.yaml` with the new public key.
41
-
42
- ## Integration with Chezmoi
43
-
44
- Chezmoi has built-in support for age encryption.
45
-
46
- ```bash
47
- chezmoi add --encrypt ~/.ssh/config
48
- ```
49
-
50
- This encrypts the file in the source state. It uses the age key set in `~/.config/chezmoi/chezmoi.toml`:
51
-
52
- ```toml
53
- encryption = "age"
54
- [age]
55
- identity = "~/.config/sops/age/keys.txt"
56
- recipient = "age1abc123..."
57
- ```
@@ -1,159 +0,0 @@
1
- ---
2
- render_with_liquid: false
3
- ---
4
-
5
- # Failure Mode and Effects Analysis (FMEA)
6
-
7
- Systematic risk assessment of the chezmoi-managed dotfiles repository per IEC 60812 methodology. Identifies failure modes, quantifies risk priority, and documents mitigations across all configuration management subsystems.
8
-
9
- ## Purpose
10
-
11
- This document applies Failure Mode and Effects Analysis (FMEA) to a chezmoi-managed dotfiles repository. Each failure mode is evaluated by Severity, Occurrence, and Detection ratings to produce a Risk Priority Number (RPN). The RPN drives mitigation priority and review cadence.
12
-
13
- Methodology: IEC 60812:2018 — Analysis techniques for system reliability.
14
-
15
- ## Scope
16
-
17
- | Domain | Coverage |
18
- |--------|----------|
19
- | Shell configuration | Zsh, Fish, Nushell startup, aliases, functions, `rc.d` modules |
20
- | Tool management | mise, Homebrew, Nix flakes, Zinit plugins, Neovim plugins |
21
- | Secrets management | Age encryption, gitleaks, 1Password integration, Atuin history |
22
- | CI/CD pipeline | GitHub Actions workflows, pre-commit hooks, compliance guards |
23
- | Cross-platform deployment | macOS (BSD), Linux (GNU), WSL, chezmoi templating |
24
- | Git integrity | Signed commits, branch protection, CODEOWNERS |
25
-
26
- ---
27
-
28
- ## Rating Scales
29
-
30
- ### Severity (S)
31
-
32
- | Rating | Level | Definition |
33
- |--------|-------|------------|
34
- | 1 | None | No effect on system operation |
35
- | 2 | Very Minor | Cosmetic defect noticed only by maintainer |
36
- | 3 | Minor | Minor degradation, workaround available |
37
- | 4 | Very Low | Subsystem partially impaired, user notices |
38
- | 5 | Low | Subsystem degraded, reduced functionality |
39
- | 6 | Moderate | System operates with degraded performance |
40
- | 7 | High | System operates but critical function impaired |
41
- | 8 | Very High | System inoperable, data at risk |
42
- | 9 | Hazardous with Warning | Potential security breach, credentials exposed |
43
- | 10 | Hazardous without Warning | Secret exfiltration, supply chain compromise, silent data loss |
44
-
45
- ### Occurrence (O)
46
-
47
- | Rating | Level | Definition |
48
- |--------|-------|------------|
49
- | 1 | Nearly Impossible | < 1 in 1,000,000 operations |
50
- | 2 | Remote | 1 in 100,000 operations |
51
- | 3 | Very Low | 1 in 10,000 operations |
52
- | 4 | Low | 1 in 1,000 operations |
53
- | 5 | Moderate | 1 in 200 operations |
54
- | 6 | Moderately High | 1 in 50 operations |
55
- | 7 | High | 1 in 20 operations |
56
- | 8 | Very High | 1 in 10 operations |
57
- | 9 | Extremely High | 1 in 3 operations |
58
- | 10 | Certain | Every operation |
59
-
60
- ### Detection (D)
61
-
62
- | Rating | Level | Definition |
63
- |--------|-------|------------|
64
- | 1 | Almost Certain | Automated control detects failure every time |
65
- | 2 | Very High | Automated control with >99% detection rate |
66
- | 3 | High | Automated test catches most occurrences |
67
- | 4 | Moderately High | CI pipeline detects on PR merge |
68
- | 5 | Moderate | Detected during routine manual review |
69
- | 6 | Low | Detected only by targeted audit |
70
- | 7 | Very Low | Requires manual inspection to discover |
71
- | 8 | Remote | Detected only after user reports failure |
72
- | 9 | Very Remote | Detected only after external incident |
73
- | 10 | Undetectable | No mechanism exists to detect the failure |
74
-
75
- ---
76
-
77
- ## FMEA Table
78
-
79
- | ID | Component | Failure Mode | Effect | S | O | D | RPN | Mitigation | Status |
80
- |----|-----------|-------------|--------|---|---|---|-----|------------|--------|
81
- | FM-01 | Secrets Management | Secrets committed to git (gitleaks bypass) | API keys, tokens, or passwords exposed in public git history | 10 | 3 | 2 | 60 | Gitleaks pre-commit hook, TruffleHog CI scan, detect-secrets baseline, `.gitignore` excludes `key.txt`/`.env` | Mitigated |
82
- | FM-02 | Shell Configuration | `chezmoi apply` corrupts shell config | Login shell fails to start, user locked out of interactive session | 9 | 3 | 3 | 81 | `chezmoi apply --dry-run` in CI, `chezmoi diff` pre-check, version-controlled rollback via `git checkout` | Mitigated |
83
- | FM-03 | Git Integrity | Unsigned commit pushed (GPG/SSH bypass) | Commit attribution unverifiable, compliance violation (SOC 2 CC6.8) | 7 | 4 | 2 | 56 | Pre-push hook verifies signatures, `compliance-guard.yml` CI check, `commit.gpgsign = true` default | Mitigated |
84
- | FM-04 | Tool Management | mise tool update introduces vulnerability | Compromised binary executes with user privileges on every shell start | 10 | 2 | 6 | 120 | Pinned tool versions in `.tool-versions`, Nix flake lock reproducibility, manual version audit | Monitoring |
85
- | FM-05 | Shell Performance | Shell startup exceeds 500ms | Degraded developer experience, productivity loss, user disables safety features | 5 | 5 | 3 | 75 | `_cached_eval` mtime-based caching, `DOTFILES_ULTRA_FAST=1` bypass, `dot health` startup benchmark | Mitigated |
86
- | FM-06 | Cross-Platform | BSD vs GNU incompatibility | Script fails silently or produces incorrect output on macOS or Linux | 6 | 5 | 3 | 90 | `cross-platform-test.yml` CI on macOS + Linux, `$OSTYPE` guards, portable alternatives documented in COMPLIANCE.md | Mitigated |
87
- | FM-07 | CI/CD Pipeline | CI workflow tampered (Actions injection) | Attacker executes arbitrary code in CI, exfiltrates secrets, modifies artifacts | 10 | 2 | 4 | 80 | Actions pinned to SHA, `permissions: contents: read` default, concurrency control, explicit job timeouts | Mitigated |
88
- | FM-08 | Secrets Management | Age encryption key lost | Encrypted dotfiles unrecoverable, secrets permanently inaccessible | 9 | 2 | 8 | 144 | Key backup in 1Password vault, documented recovery procedure in KEYS.md, periodic backup verification | Monitoring |
89
- | FM-09 | Shell Configuration | Alias conflict breaks existing command | User command produces unexpected behavior, data loss in destructive operations | 7 | 4 | 5 | 140 | Alias naming conventions (`chezmoi_` prefix for internal), unit tests for all 99 alias files, `type` command verification | Monitoring |
90
- | FM-10 | Tool Management | Nix flake lock stale (>30 days) | Outdated dependencies with known vulnerabilities, reproducibility drift | 6 | 6 | 4 | 144 | `nightly.yml` dependency version checks, `nix flake update` in maintenance schedule, `dot health` staleness check | Monitoring |
91
- | FM-11 | Git Integrity | Pre-commit hook bypassed (`--no-verify`) | Secrets, lint failures, and insecure patterns reach the repository | 8 | 4 | 7 | 224 | CI re-runs all pre-commit checks (`compliance-guard.yml`), branch protection requires CI pass, audit log review | Mitigated |
92
- | FM-12 | Cross-Platform | Config drift between machines | Inconsistent behavior across workstations, unreproducible environments | 5 | 5 | 6 | 150 | Chezmoi state management, `chezmoi status` diff check, feature flags in `.chezmoidata.toml`, CI dry-run on both platforms | Monitoring |
93
- | FM-13 | Network Security | TLS certificate validation disabled | Man-in-the-middle interception of downloads, credential theft | 10 | 2 | 2 | 40 | `curl -k` and `wget --no-check-certificate` blocked by pre-commit and CI, pattern scanning in `compliance-guard.yml` | Mitigated |
94
- | FM-14 | File Permissions | World-writable file permissions (chmod 777) | Any local user or process can modify configs, privilege escalation vector | 9 | 2 | 2 | 36 | `chmod 777/666` blocked by pre-commit and CI, chezmoi `private_` prefix enforces 0600, `umask 022` default | Mitigated |
95
- | FM-15 | Template Engine | Template rendering failure (`.tmpl` syntax error) | Chezmoi apply fails, partial deployment leaves inconsistent state | 7 | 4 | 2 | 56 | `chezmoi apply --dry-run` in CI on Linux + macOS, template syntax validated before merge, `chezmoi execute-template` for local testing | Mitigated |
96
-
97
- ---
98
-
99
- ## Risk Priority Summary
100
-
101
- ### Critical (RPN > 200)
102
-
103
- | ID | Component | Failure Mode | RPN | Action Required |
104
- |----|-----------|-------------|-----|-----------------|
105
- | FM-11 | Git Integrity | Pre-commit hook bypassed (`--no-verify`) | 224 | CI enforcement layer catches all bypassed checks; add GitHub branch protection rule requiring status checks to pass |
106
-
107
- ### High (RPN 100-200)
108
-
109
- | ID | Component | Failure Mode | RPN | Action Required |
110
- |----|-----------|-------------|-----|-----------------|
111
- | FM-12 | Cross-Platform | Config drift between machines | 150 | Implement `chezmoi status` in `dot health` dashboard; alert on drift >24 hours |
112
- | FM-10 | Tool Management | Nix flake lock stale (>30 days) | 144 | Enforce flake freshness check in nightly CI; auto-create PR on staleness |
113
- | FM-08 | Secrets Management | Age encryption key lost | 144 | Quarterly key backup verification; document recovery runbook |
114
- | FM-09 | Shell Configuration | Alias conflict breaks existing command | 140 | Expand alias unit tests with conflict detection; `type` validation in CI |
115
- | FM-04 | Tool Management | mise tool update introduces vulnerability | 120 | Pin versions, audit changelogs before updates, monitor CVE databases |
116
-
117
- ### Medium (RPN 50-100)
118
-
119
- | ID | Component | Failure Mode | RPN | Action Required |
120
- |----|-----------|-------------|-----|-----------------|
121
- | FM-06 | Cross-Platform | BSD vs GNU incompatibility | 90 | Maintain cross-platform CI matrix; document portable alternatives |
122
- | FM-02 | Shell Configuration | `chezmoi apply` corrupts shell config | 81 | CI dry-run enforcement; rollback documentation |
123
- | FM-07 | CI/CD Pipeline | CI workflow tampered (Actions injection) | 80 | SHA-pinned actions; minimal permissions; periodic audit |
124
- | FM-05 | Shell Performance | Shell startup exceeds 500ms | 75 | Performance regression tests in CI; cache warming |
125
- | FM-01 | Secrets Management | Secrets committed to git (gitleaks bypass) | 60 | Multi-layered scanning (pre-commit + CI + detect-secrets) |
126
- | FM-03 | Git Integrity | Unsigned commit pushed (GPG/SSH bypass) | 56 | Pre-push hook + CI verification |
127
- | FM-15 | Template Engine | Template rendering failure (`.tmpl` syntax error) | 56 | CI dry-run on both platforms |
128
-
129
- ### Low (RPN < 50)
130
-
131
- | ID | Component | Failure Mode | RPN | Action Required |
132
- |----|-----------|-------------|-----|-----------------|
133
- | FM-13 | Network Security | TLS certificate validation disabled | 40 | Automated pattern blocking; no further action |
134
- | FM-14 | File Permissions | World-writable file permissions (chmod 777) | 36 | Automated pattern blocking; no further action |
135
-
136
- ---
137
-
138
- ## Review Schedule
139
-
140
- | Activity | Cadence | Owner | Deliverable |
141
- |----------|---------|-------|-------------|
142
- | FMEA full review | Quarterly | Repository maintainer | Updated FMEA table, revised RPNs |
143
- | RPN recalculation | After each mitigation change | Repository maintainer | Updated RPN values, status changes |
144
- | Critical item review | Monthly | Repository maintainer | Action items for RPN > 200 |
145
- | New failure mode triage | Per incident | Repository maintainer | New FMEA row, initial RPN assignment |
146
- | Detection control audit | Quarterly | Repository maintainer | Verify automated controls function correctly |
147
- | Mitigation effectiveness | Semi-annually | Repository maintainer | Compare actual vs predicted occurrence rates |
148
-
149
- **Next scheduled review:** 2026-06-20
150
-
151
- ---
152
-
153
- ## References
154
-
155
- - [IEC 60812:2018](https://www.iso.org/standard/64076.html) — Analysis techniques for system reliability
156
- - [AIAG FMEA Handbook](https://www.aiag.org/quality/automotive-core-tools/fmea) — Automotive Industry Action Group FMEA methodology
157
- - [COMPLIANCE.md](COMPLIANCE.md) — Regulatory mapping and security controls
158
- - [THREAT_MODEL.md](THREAT_MODEL.md) — Trust boundaries and attack surface analysis
159
- - [SECURITY.md](SECURITY.md) — Vulnerability reporting and response SLAs
@@ -1,209 +0,0 @@
1
- ---
2
- title: "Fuzzing"
3
- date: 2026-05-17
4
- ---
5
-
6
- # Fuzzing
7
-
8
- The project ships native-Go fuzz harnesses for every user-input
9
- parsing surface in the framework. The harnesses run locally via
10
- `go test -fuzz`, in CI on every PR via `.github/workflows/fuzz.yml`,
11
- and (pending upstream submission) continuously on Google's OSS-Fuzz
12
- infrastructure.
13
-
14
- ## Why Go fuzzing
15
-
16
- The framework is bash. Bash has no first-class fuzzing framework
17
- that OpenSSF Scorecard recognises (Scorecard scores `Fuzzing` 0
18
- unless the project ships an integration with one of: OSS-Fuzz,
19
- ClusterFuzzLite, native Go fuzz, libFuzzer, Atheris). The
20
- pragmatic path is to **port each user-input parsing surface
21
- into a small Go function**, run the fuzzer against the Go port,
22
- and keep the Go port in lockstep with the shell original via
23
- identical regex / control-flow.
24
-
25
- Drift between the shell and Go port IS the bug class the
26
- fuzzer is designed to surface — if the Go port accepts a string
27
- the shell rejects (or vice-versa), one of them has a hole.
28
-
29
- ## Where the harnesses live
30
-
31
- The framework ships three Go binaries as well as the shell, so
32
- harnesses live in four modules:
33
-
34
- | Module | Harnesses | Runs against |
35
- |--------|-----------|--------------|
36
- | `fuzz` | 11 | ports of the shell helpers **and** of the two binaries' parsers — this is the package OSS-Fuzz and ClusterFuzzLite compile |
37
- | `defaults/dot_local/share/dot-ui` | 8 | the real dot-ui implementation, in-module |
38
- | `defaults/dot_local/share/dot-ai-tui` | 11 | the real dot-ai-tui implementation, in-module |
39
- | `defaults/dot_local/share/dot-mcp` | 5 | the real MCP server, in-module — everything a peer can put on the wire |
40
-
41
- `dot-ui` and `dot-ai-tui` are `package main` in their own modules,
42
- which OSS-Fuzz's `compile_native_go_fuzzer` cannot import — it needs a
43
- library package. Their parsers are therefore **ported** into
44
- `fuzz` alongside the shell ports, and fuzzed
45
- in-module as well. The in-module targets are the ones that catch real
46
- bugs on every push; the ports are what runs continuously at scale.
47
- The same lockstep rule applies: drift between a port and its original
48
- is a bug in one of them.
49
-
50
- ## Harnesses today
51
-
52
- ### Ports (built by OSS-Fuzz / ClusterFuzzLite)
53
-
54
- | Harness | Mirrors | What it proves |
55
- |---------|---------|----------------|
56
- | `FuzzValidateName` | `scripts/dot/lib/utils.sh:101` (`validate_name`) | Every accepted name contains only `[a-zA-Z0-9._-]`; no shell metacharacter slips through; empty input refused. |
57
- | `FuzzInitURLResolver` | `scripts/dot/commands/init.sh` (URL construction in `dot init <user\|owner/repo\|url>`) | Accepted URLs use `https://` / `git@` / `ssh://` only; plain HTTP refused; no shell metacharacters in constructed URLs; one input shape per acceptable form. |
58
- | `FuzzUIEventLine` | dot-ui `run.go` (`parseEvent`, `renderBar`) | A line either decodes to valid JSON or is refused; an accepted event round-trips; the derived progress width is always a legal repeat count. |
59
- | `FuzzUIHexColor` | dot-ui `theme.go` (`parseColor`) | An accepted `DOT_UI_*` value is a literal `#rgb`/`#rrggbb` with no metacharacter or escape sequence — these are interpolated into terminal escapes. |
60
- | `FuzzUIPickFilter` | dot-ui `pick.go` (`fuzzyMatch`, `readItems`) | No blank candidate survives; every candidate matches itself in any script; a query longer than the candidate never matches. |
61
- | `FuzzUIPickArgs` | dot-ui `main.go` (`parsePickArgs`) | The parser never invents a value; every prefix of the argument list is safe. |
62
- | `FuzzUITableRows` | dot-ui `table.go` (`runTable` input) | The `\x1f` split is reversible, so no cell can merge into or leak across a neighbouring column. |
63
- | `FuzzAISessionFile` | dot-ai-tui `main.go` (`parseSession`) | A malformed session file decodes to nothing, never to a partial or mutated transcript; a valid one round-trips. |
64
- | `FuzzAISqliteOutput` | dot-ai-tui `main.go` (`filterSqliteOutput`) | No `~/.sqliterc` meta line (`.timer`, `Run Time:`) survives into the cost/run data the cockpit renders. |
65
- | `FuzzAIFenceTag` | dot-ai-tui `main.go` (`langRe`, `highlight`) | Every fence info string taken from model output is refused or a short identifier, so an unbounded chroma lexer lookup cannot stall rendering; prose segments survive segmentation. |
66
- | `FuzzAIGatewayURL` | dot-ai-tui `main.go` (`gatewayURL`) | The health-check URL always keeps the `http` scheme and the configured host and port verbatim. |
67
-
68
- ### In-module (against the real implementation)
69
-
70
- | Module | Harnesses |
71
- |--------|-----------|
72
- | dot-ui | `FuzzParseEvent`, `FuzzStepApply`, `FuzzParseColor`, `FuzzFuzzyMatch`, `FuzzPickKeys`, `FuzzRunTable`, `FuzzReadItems`, `FuzzParsePickArgs` |
73
- | dot-ai-tui | `FuzzHighlight`, `FuzzBuildPrompt`, `FuzzHandleSlash`, `FuzzPalette`, `FuzzWindowRows`, `FuzzRenderTranscript`, `FuzzParseSession`, `FuzzFilterSqliteOutput`, `FuzzGatewayURL`, `FuzzModelKeys`, `FuzzModelCycle` |
74
- | dot-mcp | `FuzzReadFrames`, `FuzzDecodeRequest`, `FuzzValidateArgs`, `FuzzServeSession`, `FuzzBuildCallResult` |
75
-
76
- Each module's `FEATURES.md` maps every harness to the feature it
77
- covers, and a matrix test fails if a harness is missing from it.
78
-
79
- ### Findings so far
80
-
81
- | Harness | Bug | Fix |
82
- |---------|-----|-----|
83
- | `FuzzStepApply` | `{"t":"progress","cur":-1,"total":1}` produced a negative `strings.Repeat` count and panicked the run view mid-apply. | Clamp the bar width to `[0, w]`. |
84
- | `FuzzFuzzyMatch` | The picker compared a query **byte** against a candidate **rune**, so no non-ASCII query could match — not even the identical string. | Compare both sides as runes. |
85
- | `FuzzHighlight` | A 5 000-character fenced-block language tag stalled every render for 13s (chroma's unknown-lexer lookup is linear in the tag length). | Validate fence tags against a short-identifier pattern and memoise the lookup. |
86
- | `FuzzRenderTranscript` | An empty transcript on a 12-row terminal with the palette open asked the splash for a negative height and panicked on a slice bound. | Drop the "recent runs" block when it does not fit; clamp the splash height. |
87
-
88
- ### Harness files must be self-contained
89
-
90
- `compile_native_go_fuzzer` rewrites **one** `*_test.go` file into a
91
- regular `.go` file and builds it **without** the package's other test
92
- files. A harness that references a symbol declared in a sibling
93
- `_test.go` therefore passes `go test` everywhere and fails only inside
94
- the OSS-Fuzz / ClusterFuzzLite container:
95
-
96
- ```
97
- ./dot_ui_parsers_test.go_fuzz.go:117:21: undefined: dangerousChars
98
- 2026/09/07 01:14:42 failed to build packages:exit status 1
99
- ```
100
-
101
- So a shared constant is deliberately **duplicated** per harness file
102
- rather than factored out. If sharing is genuinely warranted, put the
103
- symbol in a non-test `.go` file in the package — those the builder keeps.
104
-
105
- `tools/ci/check-fuzz-harness-self-contained.sh` enforces this by
106
- type-checking each harness alone in a scratch module; it runs in the
107
- `Fuzz / Harness self-containment` job on every relevant PR.
108
-
109
- Add a harness when:
110
-
111
- - a new `dot <subcommand>` accepts user input via `$1` / `--flag`,
112
- - a new regex appears in `scripts/dot/lib/utils.sh`,
113
- - a new "construct a URL / path / shell-eval string" code path lands,
114
- - a new function in `dot-ui`, `dot-ai-tui` or `dot-mcp` parses or transforms
115
- stdin, an environment variable, a key stream or model output —
116
- add it in-module *and* port it to `fuzz`.
117
-
118
- ## Running locally
119
-
120
- ```sh
121
- # Ports (also what OSS-Fuzz builds)
122
- cd fuzz
123
- go test -run '^$' -fuzz=FuzzValidateName -fuzztime=30s ./...
124
- go test -run '^$' -fuzz=FuzzUIEventLine -fuzztime=30s ./...
125
-
126
- # In-module, against the real implementation
127
- cd defaults/dot_local/share/dot-ui
128
- go test -run '^$' -fuzz=FuzzStepApply -fuzztime=30s ./...
129
-
130
- cd defaults/dot_local/share/dot-ai-tui
131
- go test -run '^$' -fuzz=FuzzHighlight -fuzztime=30s ./...
132
-
133
- # Replay every committed corpus in a module (no fuzzing, no flakes)
134
- go test -run '^Fuzz' -v ./...
135
- ```
136
-
137
- Each module's README lists every harness with a copy-pasteable
138
- command.
139
-
140
- Failures land in `testdata/fuzz/Fuzz<Name>/` as auto-saved
141
- reproducers. Commit them — they become permanent regression
142
- guards, replayed by `go test ./...` and by the `replay` job in
143
- `.github/workflows/fuzz.yml`.
144
-
145
- ## OSS-Fuzz integration (pending)
146
-
147
- The `fuzz/oss-fuzz/` directory contains everything OSS-Fuzz
148
- needs to onboard this project:
149
-
150
- ```
151
- fuzz/oss-fuzz/
152
- ├── project.yaml # OSS-Fuzz project metadata
153
- ├── Dockerfile # build environment
154
- ├── build.sh # compiles every harness in fuzz/
155
- └── fuzz/ # the harnesses themselves
156
- ├── go.mod
157
- ├── validate_name_test.go
158
- ├── init_url_resolver_test.go
159
- ├── dot_ui_parsers_test.go # ports of the dot-ui parsers
160
- └── dot_ai_tui_parsers_test.go # ports of the dot-ai-tui parsers
161
- ```
162
-
163
- To onboard:
164
-
165
- 1. Fork `github.com/google/oss-fuzz`.
166
- 2. Copy `fuzz/oss-fuzz/` contents to `projects/dotfiles/` in the fork.
167
- 3. Verify locally per <https://google.github.io/oss-fuzz/getting-started/new-project-guide/#testing-locally>:
168
-
169
- ```sh
170
- python infra/helper.py build_image dotfiles
171
- python infra/helper.py build_fuzzers --sanitizer address dotfiles
172
- python infra/helper.py check_build dotfiles
173
- python infra/helper.py run_fuzzer dotfiles fuzz_validate_name
174
- ```
175
-
176
- 4. Open a PR to `google/oss-fuzz` per <https://google.github.io/oss-fuzz/getting-started/accepting-new-projects/>.
177
- 5. Once merged, OSS-Fuzz schedules continuous runs on GCP; findings land as private issues in the OSS-Fuzz tracker and are mirrored to the maintainer email in `project.yaml`.
178
- 6. Update `docs/security/SCORECARD.md` — Scorecard's `Fuzzing` check recognises OSS-Fuzz projects automatically (0 → 10).
179
-
180
- The upstream PR opens the door to the **CIFuzz** GitHub Action,
181
- which runs OSS-Fuzz-style fuzzing on every PR in this repo
182
- (separate from the local-go-fuzz CI job).
183
-
184
- ## CI workflow
185
-
186
- `.github/workflows/fuzz.yml` has two gates:
187
-
188
- - **replay** — on every push and PR, every committed corpus (seed
189
- entries plus the minimized crashers of previously-fixed findings) is
190
- replayed in all three modules with `go test -run '^Fuzz'`. No
191
- fuzzing, so no flakes: a fixed crash cannot silently come back.
192
- - **fuzz** — a 60-second window per harness (configurable via
193
- `workflow_dispatch`) on PRs touching an input-parsing surface:
194
- `scripts/dot/lib/utils.sh`, `scripts/dot/commands/init.sh`,
195
- `fuzz/**`, `.clusterfuzzlite/**` or either Go
196
- module.
197
-
198
- This is the local equivalent of CIFuzz and catches the
199
- "shell-regex-change without Go-port update" drift class before
200
- PR merge. The per-module test workflows (`dot-ui-test.yml`,
201
- `cockpit-test.yml`) replay their own corpus too, so the guard holds
202
- even when only one module changes.
203
-
204
- ## See also
205
-
206
- - `docs/security/SCORECARD.md` — `Fuzzing` check tracking.
207
- - [Go native fuzzing tutorial](https://go.dev/doc/tutorial/fuzz).
208
- - [OSS-Fuzz new project guide](https://google.github.io/oss-fuzz/getting-started/new-project-guide/).
209
- - [CIFuzz GitHub Action](https://google.github.io/oss-fuzz/getting-started/continuous-integration/).
@@ -1,132 +0,0 @@
1
- ---
2
- render_with_liquid: false
3
- ---
4
-
5
- # Atuin History Filtering
6
-
7
- This page documents how high-risk command patterns are excluded from
8
- Atuin shell history, how to extend the list for your machine, and the
9
- trade-offs of filter design.
10
-
11
- ## Why
12
-
13
- Atuin syncs shell history across machines and exposes a fuzzy-search UI
14
- (`Ctrl-R`). Without a filter, every command — including ones that
15
- contain secrets passed inline (`AWS_SECRET_ACCESS_KEY=...`, `op run`,
16
- `vault read`, `curl -H 'Authorization: Bearer ...'`) — is captured,
17
- synced to a remote service, and made grep-able.
18
-
19
- The `history_filter` array in `~/.config/atuin/config.toml` lists
20
- regular expressions that, if matched, prevent Atuin from recording the
21
- command at all (it never enters the local DB, and therefore never
22
- syncs).
23
-
24
- ## How it ships
25
-
26
- Patterns are sourced from `.chezmoidata/secrets-patterns.toml` and
27
- materialised into `~/.config/atuin/config.toml` by the chezmoi template
28
- at `dot_config/atuin/config.toml.tmpl`.
29
-
30
- ```
31
- .chezmoidata/secrets-patterns.toml
32
- └── [atuin.history_filter]
33
- defaults = [...] # audited baseline (this repo)
34
- extra = [...] # empty by default; populated per machine
35
-
36
- dot_config/atuin/config.toml.tmpl
37
- └── chezmoi apply ─────► ~/.config/atuin/config.toml
38
- ```
39
-
40
- Run `chezmoi apply ~/.config/atuin/config.toml` after editing the
41
- defaults; `dot doctor` reports the count of deployed patterns and
42
- fails loud if the block is missing.
43
-
44
- ## What's filtered by default
45
-
46
- The audited baseline covers:
47
-
48
- - Generic env-var exports: `^export (SECRET|TOKEN|PASSWORD|API_KEY|AWS_)`,
49
- `^PASSWORD=`, `^[A-Z_]+_TOKEN=`, `^[A-Z_]+_KEY=`.
50
- - Cloud provider auth: `aws ... configure|auth|login`, `gcloud auth ...`,
51
- `az login`, `kubectl ... --kubeconfig`.
52
- - AI provider keys: Anthropic, OpenAI, Gemini, Mistral.
53
- - SaaS secrets: Stripe, GitHub PAT (`GH_TOKEN`, `GITHUB_TOKEN`), `NPM_TOKEN`,
54
- `CARGO_REGISTRY_TOKEN`.
55
- - Authorization headers (`curl -H 'Authorization: ...'`).
56
- - Embedded creds in git URLs (`git clone https://user:pass@...`).
57
- - Secret managers: `vault`, `op` (1Password), `chamber`.
58
- - Key material: `ssh-keygen`, `ssh-add`, `gpg --import|--export-secret`,
59
- `age -d|-e --passphrase`.
60
- - DB connection strings with inline creds
61
- (`postgres|mysql|mongodb|redis://user:pass@host`).
62
-
63
- See `.chezmoidata/secrets-patterns.toml` for the canonical list.
64
-
65
- ## Adding per-host patterns
66
-
67
- Each contributor or machine can extend the list without editing the
68
- shared template. In `~/.config/chezmoi/chezmoi.toml`:
69
-
70
- ```toml
71
- [data.atuin.history_filter]
72
- extra = [
73
- "^my-private-tool ",
74
- "^OUR_CORP_API_KEY=",
75
- "tailscale up --auth-key=",
76
- ]
77
- ```
78
-
79
- Then re-apply:
80
-
81
- ```bash
82
- chezmoi apply ~/.config/atuin/config.toml
83
- ```
84
-
85
- The `extra` patterns are appended to the defaults in the deployed
86
- config.
87
-
88
- ## Adding a pattern to the project defaults
89
-
90
- Edit `.chezmoidata/secrets-patterns.toml` and add a regex to
91
- `[atuin.history_filter].defaults`. Then:
92
-
93
- 1. Add a fixture command to `tests/unit/secrets/test_atuin_history_filter.sh`
94
- under `LEAKED_FIXTURES` — your new pattern must catch at least one
95
- real-shape command.
96
- 2. Run the test: `bash tests/unit/secrets/test_atuin_history_filter.sh`.
97
- 3. Add a benign-fixture if your regex is broad enough to risk false
98
- positives.
99
- 4. Open a PR; CI runs the same test.
100
-
101
- ## Trade-offs
102
-
103
- `history_filter` is a deny-list. Two classes of failure to design
104
- around:
105
-
106
- - **False positives**: an overly broad regex hides commands the user
107
- needs to recall. Mitigation: every new pattern must include a
108
- fixture under `BENIGN_FIXTURES` that the regex correctly does *not*
109
- match.
110
- - **False negatives**: a new secret format ships, no pattern matches,
111
- the secret lands in history. Mitigation: the OpenSSF Scorecard
112
- workflow (issue #869) and the nightly drift detector (#875) will
113
- surface new exposure surfaces; review them quarterly.
114
-
115
- `history_filter` does not replace:
116
-
117
- - A real secret manager (`age`/`sops`, 1Password, Vault) — see
118
- `docs/security/ENCRYPTION.md`.
119
- - Pre-commit `gitleaks` / `detect-secrets` scans — see
120
- `config/pre-commit-config.yaml`.
121
- - Server-side audit logging — see `docs/security/COMPLIANCE.md`.
122
-
123
- It's the last line of defence against accidental command-line capture,
124
- not the first.
125
-
126
- ## References
127
-
128
- - Atuin config schema: <https://atuin.sh/docs/config>
129
- - Chezmoi template data: <https://www.chezmoi.io/reference/templates/>
130
- - Issue #872 (this hardening)
131
- - `tests/unit/secrets/test_atuin_history_filter.sh` (pattern-coverage test)
132
- - `scripts/diagnostics/doctor.sh` — "Atuin History Filter" section