@sebastienrousseau/dotfiles 0.2.519 → 0.2.521

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 (306) hide show
  1. package/CHANGELOG.md +200 -0
  2. package/LICENSE-APACHE +190 -0
  3. package/{LICENSE → LICENSE-MIT} +1 -1
  4. package/README.md +1172 -166
  5. package/install.sh +77 -11
  6. package/package.json +8 -8
  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/CNAME +0 -1
  12. package/docs/CONFIG_STRATEGY.md +0 -124
  13. package/docs/COPYRIGHT +0 -7
  14. package/docs/GOVERNANCE.md +0 -98
  15. package/docs/MAINTAINERS.md +0 -41
  16. package/docs/NAMING_CONVENTIONS.md +0 -102
  17. package/docs/OPENCODE.md +0 -127
  18. package/docs/README.md +0 -84
  19. package/docs/STRUCTURE.md +0 -102
  20. package/docs/adr/ADR-001-ci-cd-pipeline.md +0 -118
  21. package/docs/adr/ADR-002-shell-performance.md +0 -130
  22. package/docs/adr/ADR-003-security-first.md +0 -158
  23. package/docs/adr/ADR-004-cli-architecture.md +0 -171
  24. package/docs/adr/ADR-005-chezmoi-choice.md +0 -99
  25. package/docs/adr/ADR-006-shell-selection.md +0 -124
  26. package/docs/adr/ADR-007-multi-shell-parity.md +0 -62
  27. package/docs/adr/ADR-008-alias-system-architecture.md +0 -95
  28. package/docs/adr/ADR-009-wallpaper-driven-theming.md +0 -131
  29. package/docs/adr/ADR-010-starship-transient-prompt.md +0 -144
  30. package/docs/adr/ADR-011-nushell-tier3-keep.md +0 -144
  31. package/docs/adr/ADR-012-ai-fleet-local-proxy.md +0 -79
  32. package/docs/adr/README.md +0 -40
  33. package/docs/architecture/AI_COST_OPTIMIZATION.md +0 -144
  34. package/docs/architecture/ARCHITECTURE.md +0 -117
  35. package/docs/architecture/INTEROP.md +0 -44
  36. package/docs/architecture/REPO_LAYOUT.md +0 -241
  37. package/docs/architecture/WALKTHROUGH.md +0 -86
  38. package/docs/architecture/fleet-deployment.md +0 -77
  39. package/docs/archive/EUXIS_2026_REVIEW.md +0 -127
  40. package/docs/archive/LEGACY_ROADMAP.md +0 -6
  41. package/docs/archive/MILESTONE_v0.2.493.md +0 -47
  42. package/docs/archive/PLAN.md +0 -199
  43. package/docs/archive/REPO_AUDIT.md +0 -31
  44. package/docs/articles/.pages +0 -6
  45. package/docs/articles/2026-07-05-custom-mkdocs-material-dark-theme.md +0 -216
  46. package/docs/articles/2026-07-05-fish-startup-abbr.md +0 -153
  47. package/docs/articles/2026-07-05-master-to-main-rename-runbook.md +0 -128
  48. package/docs/articles/index.md +0 -36
  49. package/docs/guides/INSTALL.md +0 -144
  50. package/docs/guides/NEOVIM_IDE_GUIDE.md +0 -61
  51. package/docs/guides/THEMING.md +0 -230
  52. package/docs/guides/TROUBLESHOOTING.md +0 -176
  53. package/docs/guides/WSL2_NIX_TROUBLESHOOTING.md +0 -792
  54. package/docs/index.md +0 -132
  55. package/docs/interop/A2A.md +0 -39
  56. package/docs/interop/POWERSHELL.md +0 -102
  57. package/docs/manual/00-introduction.md +0 -89
  58. package/docs/manual/01-concepts/01-architecture.md +0 -138
  59. package/docs/manual/01-concepts/02-trust-model.md +0 -183
  60. package/docs/manual/01-concepts/03-theme-engine.md +0 -186
  61. package/docs/manual/01-concepts/04-fleet.md +0 -148
  62. package/docs/manual/01-concepts/05-self-healing.md +0 -204
  63. package/docs/manual/02-tutorials/01-first-install.md +0 -197
  64. package/docs/manual/02-tutorials/02-add-wallpaper.md +0 -216
  65. package/docs/manual/02-tutorials/03-create-profile.md +0 -244
  66. package/docs/manual/02-tutorials/04-encrypt-secret.md +0 -281
  67. package/docs/manual/02-tutorials/05-deploy-fleet.md +0 -283
  68. package/docs/manual/03-reference/01-dot-cli.md +0 -450
  69. package/docs/manual/03-reference/02-config-files.md +0 -265
  70. package/docs/manual/03-reference/03-environment.md +0 -124
  71. package/docs/manual/03-reference/04-templates.md +0 -190
  72. package/docs/manual/03-reference/05-feature-flags.md +0 -187
  73. package/docs/manual/04-cookbook/01-recipes.md +0 -285
  74. package/docs/manual/04-cookbook/02-troubleshooting.md +0 -351
  75. package/docs/manual/04-cookbook/03-faq.md +0 -175
  76. package/docs/manual/05-appendices/A-platform-matrix.md +0 -101
  77. package/docs/manual/05-appendices/B-security-checklist.md +0 -85
  78. package/docs/manual/05-appendices/C-glossary.md +0 -40
  79. package/docs/manual/05-appendices/D-bibliography.md +0 -58
  80. package/docs/manual/05-appendices/E-license.md +0 -38
  81. package/docs/manual/_toc.yml +0 -58
  82. package/docs/manual/command-index.md +0 -155
  83. package/docs/manual/concept-index.md +0 -168
  84. package/docs/manual/index.md +0 -66
  85. package/docs/operations/ARCHITECTURE_ROADMAP.md +0 -7
  86. package/docs/operations/ATTESTATION.md +0 -44
  87. package/docs/operations/CI_CADENCE.md +0 -107
  88. package/docs/operations/CI_COMPOSITES.md +0 -156
  89. package/docs/operations/COMPLETIONS.md +0 -123
  90. package/docs/operations/COVERAGE.md +0 -204
  91. package/docs/operations/DRIFT.md +0 -107
  92. package/docs/operations/HARD_AUDIT_2026.md +0 -631
  93. package/docs/operations/MAINTENANCE.md +0 -63
  94. package/docs/operations/MANIFEST.md +0 -127
  95. package/docs/operations/MIGRATION.md +0 -109
  96. package/docs/operations/OPERATIONS.md +0 -188
  97. package/docs/operations/PERFORMANCE.md +0 -133
  98. package/docs/operations/REGISTRY.md +0 -90
  99. package/docs/operations/RELEASE_PIPELINE.md +0 -128
  100. package/docs/operations/RELIABILITY.md +0 -122
  101. package/docs/operations/RFC_v0_2_503_reorganization.md +0 -280
  102. package/docs/operations/ROADMAP.md +0 -10
  103. package/docs/operations/ROADMAP_2026.md +0 -7
  104. package/docs/operations/ROADMAP_V0_2_503.md +0 -10
  105. package/docs/operations/TESTING.md +0 -216
  106. package/docs/operations/TRACEABILITY.md +0 -43
  107. package/docs/operations/TRUSTED_AGENT_WORKSTATION.md +0 -65
  108. package/docs/operations/VERSION_SYNC.md +0 -393
  109. package/docs/reference/ALIASES.md +0 -131
  110. package/docs/reference/ALIASES_CHEATSHEET.md +0 -32
  111. package/docs/reference/ALIASES_DEPRECATIONS.md +0 -13
  112. package/docs/reference/FEATURES.md +0 -66
  113. package/docs/reference/FONTS.md +0 -112
  114. package/docs/reference/POWERSHELL_PARITY.md +0 -82
  115. package/docs/reference/PROFILES.md +0 -69
  116. package/docs/reference/SCREENSHOTS.md +0 -121
  117. package/docs/reference/SCRIPTS.md +0 -71
  118. package/docs/reference/SUPPORT_MATRIX.md +0 -80
  119. package/docs/reference/THEMES.md +0 -117
  120. package/docs/reference/TOOLS.md +0 -110
  121. package/docs/reference/UTILS.md +0 -242
  122. package/docs/registry.json +0 -6
  123. package/docs/schema/dot-env-v1.json +0 -110
  124. package/docs/schema/dot-registry-v1.json +0 -33
  125. package/docs/security/AI_ACT_COMPLIANCE.md +0 -94
  126. package/docs/security/AUDIT_BYPASS.md +0 -103
  127. package/docs/security/AUTOMATION_SECRETS.md +0 -26
  128. package/docs/security/CI_EGRESS_ALLOWLIST.md +0 -127
  129. package/docs/security/CI_PINNING.md +0 -129
  130. package/docs/security/COMMIT_SIGNING.md +0 -138
  131. package/docs/security/COMPLIANCE.md +0 -458
  132. package/docs/security/DEPS_DEV_EXCEPTIONS.md +0 -86
  133. package/docs/security/DISCLOSURE.md +0 -130
  134. package/docs/security/ENCRYPTION.md +0 -57
  135. package/docs/security/FMEA.md +0 -159
  136. package/docs/security/FUZZING.md +0 -114
  137. package/docs/security/HISTORY_FILTERING.md +0 -132
  138. package/docs/security/INCIDENT_RESPONSE.md +0 -579
  139. package/docs/security/INSTALL_VERIFICATION.md +0 -122
  140. package/docs/security/KEYS.md +0 -49
  141. package/docs/security/KEY_ROTATION.md +0 -303
  142. package/docs/security/MCP_POLICY.md +0 -78
  143. package/docs/security/POLICY_RELEASES.md +0 -37
  144. package/docs/security/README.md +0 -28
  145. package/docs/security/SCORECARD.md +0 -195
  146. package/docs/security/SECRETS.md +0 -158
  147. package/docs/security/SECURITY.md +0 -45
  148. package/docs/security/SECURITY_CHECKLIST.md +0 -55
  149. package/docs/security/SHELL_EXEMPTIONS.md +0 -145
  150. package/docs/security/SOUP_REGISTER.md +0 -36
  151. package/docs/security/THREAT_MODEL.md +0 -130
  152. package/docs/security/VERIFICATION_VALIDATION.md +0 -228
  153. package/docs/security/VERIFY_RELEASE.md +0 -201
  154. package/docs/security/security-pubkey.asc +0 -15
  155. package/docs/stylesheets/extra.css +0 -444
  156. package/docs/themes/README.md +0 -10
  157. package/docs/themes/VISUAL_INTEGRITY_REPORT.md +0 -30
  158. package/docs/themes/hero-shot.svg +0 -78
  159. package/scripts/README.md +0 -123
  160. package/scripts/ci/check-copyright-headers.sh +0 -8
  161. package/scripts/ci/check-shell-preamble.sh +0 -8
  162. package/scripts/ci/guard-gitleaks-checkout.sh +0 -8
  163. package/scripts/demo/record.sh +0 -43
  164. package/scripts/diagnostics/a2a-conformance.sh +0 -163
  165. package/scripts/diagnostics/alias-governance.sh +0 -138
  166. package/scripts/diagnostics/aliases-cheatsheet.sh +0 -74
  167. package/scripts/diagnostics/aliases-manifest.sh +0 -77
  168. package/scripts/diagnostics/benchmark.sh +0 -408
  169. package/scripts/diagnostics/conflicts.sh +0 -73
  170. package/scripts/diagnostics/doctor-unified.sh +0 -39
  171. package/scripts/diagnostics/doctor.sh +0 -751
  172. package/scripts/diagnostics/drift-dashboard.sh +0 -202
  173. package/scripts/diagnostics/health.sh +0 -623
  174. package/scripts/diagnostics/history-analysis.sh +0 -86
  175. package/scripts/diagnostics/mcp-doctor.sh +0 -582
  176. package/scripts/diagnostics/perf.sh +0 -453
  177. package/scripts/diagnostics/scorecard.sh +0 -119
  178. package/scripts/diagnostics/secret-governance.sh +0 -65
  179. package/scripts/diagnostics/security-score.sh +0 -467
  180. package/scripts/diagnostics/smoke-test.sh +0 -88
  181. package/scripts/diagnostics/snapshot.sh +0 -90
  182. package/scripts/diagnostics/verify.sh +0 -108
  183. package/scripts/diagnostics/verify_state.sh +0 -73
  184. package/scripts/diagnostics/version-locks.sh +0 -94
  185. package/scripts/diagnostics/workstation-attestation.sh +0 -187
  186. package/scripts/dot/commands/agent.sh +0 -485
  187. package/scripts/dot/commands/agents.sh +0 -336
  188. package/scripts/dot/commands/ai.sh +0 -587
  189. package/scripts/dot/commands/aliases.sh +0 -277
  190. package/scripts/dot/commands/appearance.sh +0 -110
  191. package/scripts/dot/commands/completion.sh +0 -134
  192. package/scripts/dot/commands/core.sh +0 -217
  193. package/scripts/dot/commands/diagnostics.sh +0 -265
  194. package/scripts/dot/commands/env-emit.sh +0 -203
  195. package/scripts/dot/commands/fleet.sh +0 -688
  196. package/scripts/dot/commands/init.sh +0 -185
  197. package/scripts/dot/commands/lint.sh +0 -208
  198. package/scripts/dot/commands/manual.sh +0 -169
  199. package/scripts/dot/commands/meta.sh +0 -333
  200. package/scripts/dot/commands/patterns.sh +0 -55
  201. package/scripts/dot/commands/registry.sh +0 -419
  202. package/scripts/dot/commands/restore.sh +0 -232
  203. package/scripts/dot/commands/secrets.sh +0 -296
  204. package/scripts/dot/commands/security.sh +0 -102
  205. package/scripts/dot/commands/tools.sh +0 -556
  206. package/scripts/dot/data/alias-deprecations.tsv +0 -2
  207. package/scripts/dot/powershell/Dot.psm1 +0 -319
  208. package/scripts/fonts/install-nerd-fonts.sh +0 -75
  209. package/scripts/fonts/patch-fonts.sh +0 -36
  210. package/scripts/git-hooks/install.sh +0 -12
  211. package/scripts/git-hooks/pre-commit +0 -12
  212. package/scripts/git-hooks/pre-commit-audit.sh +0 -146
  213. package/scripts/git-hooks/pre-push +0 -105
  214. package/scripts/git-hooks/prepare-commit-msg +0 -29
  215. package/scripts/lib/secrets_provider.sh +0 -185
  216. package/scripts/ops/ai-setup.sh +0 -71
  217. package/scripts/ops/bundle.sh +0 -104
  218. package/scripts/ops/chaos.sh +0 -50
  219. package/scripts/ops/chezmoi-apply.sh +0 -333
  220. package/scripts/ops/chezmoi-diff.sh +0 -16
  221. package/scripts/ops/chezmoi-remove.sh +0 -46
  222. package/scripts/ops/chezmoi-update.sh +0 -63
  223. package/scripts/ops/heal-chezmoi.sh +0 -87
  224. package/scripts/ops/heal-system.sh +0 -129
  225. package/scripts/ops/heal-tools.sh +0 -297
  226. package/scripts/ops/heal.sh +0 -223
  227. package/scripts/ops/post-apply-repair.sh +0 -107
  228. package/scripts/ops/prewarm.sh +0 -128
  229. package/scripts/ops/release.sh +0 -262
  230. package/scripts/ops/rollback.sh +0 -604
  231. package/scripts/ops/setup.sh +0 -138
  232. package/scripts/ops/teleport.sh +0 -34
  233. package/scripts/qa/check-version-consistency.sh +0 -124
  234. package/scripts/qa/coverage-baseline.sh +0 -61
  235. package/scripts/qa/docs-coverage.sh +0 -112
  236. package/scripts/qa/examples-coverage.sh +0 -94
  237. package/scripts/qa/powershell-contract.ps1 +0 -95
  238. package/scripts/qa/reliability-audit.sh +0 -139
  239. package/scripts/qa/scorecard-snapshot.sh +0 -128
  240. package/scripts/qa/traceability-coverage.sh +0 -117
  241. package/scripts/qa/validate-examples.sh +0 -27
  242. package/scripts/qa/wsl-contract.sh +0 -12
  243. package/scripts/secrets/age-init.sh +0 -82
  244. package/scripts/secrets/create-secrets-file.sh +0 -46
  245. package/scripts/secrets/encrypt-ssh-key.sh +0 -44
  246. package/scripts/security/backup.sh +0 -58
  247. package/scripts/security/check-disclosure-key-expiry.sh +0 -111
  248. package/scripts/security/dns-doh.sh +0 -52
  249. package/scripts/security/encryption-check.sh +0 -55
  250. package/scripts/security/enforce-policies.sh +0 -335
  251. package/scripts/security/firewall.sh +0 -91
  252. package/scripts/security/lock-configs.sh +0 -67
  253. package/scripts/security/lock-screen.sh +0 -56
  254. package/scripts/security/manage-secrets.sh +0 -429
  255. package/scripts/security/ssh-cert.sh +0 -204
  256. package/scripts/security/telemetry-kill.sh +0 -51
  257. package/scripts/security/usb-safety.sh +0 -52
  258. package/scripts/theme/apply-gnome-theme.sh +0 -333
  259. package/scripts/theme/extract-heic-frames.sh +0 -115
  260. package/scripts/theme/extract-theme.py +0 -742
  261. package/scripts/theme/install-boot-logo.sh +0 -63
  262. package/scripts/theme/install-catppuccin-themes.sh +0 -371
  263. package/scripts/theme/install-cursors.sh +0 -26
  264. package/scripts/theme/install-file-icons.sh +0 -27
  265. package/scripts/theme/install-grub-theme.sh +0 -62
  266. package/scripts/theme/install-lock-icon.sh +0 -31
  267. package/scripts/theme/merge-wallpaper.sh +0 -146
  268. package/scripts/theme/rebuild-themes.sh +0 -544
  269. package/scripts/theme/switch.sh +0 -449
  270. package/scripts/theme/wallpaper-rotate.sh +0 -137
  271. package/scripts/theme/wallpaper-sync.sh +0 -690
  272. package/scripts/tools/cmatrix.sh +0 -22
  273. package/scripts/tools/detect-collisions.py +0 -103
  274. package/scripts/tools/emoji-picker.sh +0 -49
  275. package/scripts/tools/figlet-banner.sh +0 -19
  276. package/scripts/tools/log-rotate.sh +0 -31
  277. package/scripts/tools/lolcat-wrap.sh +0 -20
  278. package/scripts/tools/pipes.sh +0 -49
  279. package/scripts/tuning/linux.sh +0 -186
  280. package/scripts/tuning/macos.sh +0 -56
  281. package/scripts/uninstall.sh +0 -86
  282. package/scripts/version-sync.sh +0 -654
  283. package/templates/chezmoi-data/geekom-a9.toml.example +0 -21
  284. package/templates/chezmoi-data/mac-m1.toml.example +0 -16
  285. package/templates/chezmoi-data/mac-t2-linux.toml.example +0 -21
  286. package/templates/chezmoi-data/surface-pro-7p.toml.example +0 -21
  287. package/templates/projects/go/.github/workflows/ci.yml +0 -31
  288. package/templates/projects/go/README.md +0 -7
  289. package/templates/projects/go/cmd/__PROJECT_NAME__/main.go +0 -8
  290. package/templates/projects/go/go.mod +0 -3
  291. package/templates/projects/go/go.sum +0 -0
  292. package/templates/projects/molecule/README.md +0 -7
  293. package/templates/projects/molecule/converge.yml +0 -7
  294. package/templates/projects/molecule/molecule.yml +0 -16
  295. package/templates/projects/node/.github/workflows/ci.yml +0 -30
  296. package/templates/projects/node/README.md +0 -7
  297. package/templates/projects/node/package-lock.json +0 -12
  298. package/templates/projects/node/package.json +0 -10
  299. package/templates/projects/node/src/index.js +0 -3
  300. package/templates/projects/packer/README.md +0 -15
  301. package/templates/projects/packer/main.pkr.hcl +0 -15
  302. package/templates/projects/python/.github/workflows/ci.yml +0 -34
  303. package/templates/projects/python/README.md +0 -7
  304. package/templates/projects/python/pyproject.toml +0 -25
  305. package/templates/projects/python/src/__PROJECT_NAME__/__init__.py +0 -2
  306. package/templates/projects/python/tests/test_basic.py +0 -3
@@ -1,579 +0,0 @@
1
- ---
2
- render_with_liquid: false
3
- ---
4
-
5
- # Incident Response Plan
6
-
7
- Incident response procedures for the dotfiles repository. Covers supply chain compromise, secrets exposure, configuration drift, tool tampering, and CI pipeline attacks. Based on NIST SP 800-61 Rev. 2 (Computer Security Incident Handling Guide).
8
-
9
- ## Purpose and Scope
10
-
11
- This plan defines the detection, triage, containment, eradication, recovery, and post-mortem procedures for security incidents affecting the dotfiles distribution.
12
-
13
- ### In Scope
14
-
15
- | Domain | Description |
16
- |--------|-------------|
17
- | Supply chain | Dependency tampering in Homebrew, Nix, Zinit, Neovim plugins, npm, pip |
18
- | Secrets exposure | API keys, SSH keys, tokens leaked to git history, shell history, or logs |
19
- | Configuration drift | Unauthorized changes to deployed dotfiles, chezmoi apply failures |
20
- | Tool compromise | Malicious updates to mise, Nix, or Homebrew-managed binaries |
21
- | CI pipeline | GitHub Actions workflow tampering, compromised action dependencies |
22
-
23
- ### Out of Scope
24
-
25
- | Domain | Reason |
26
- |--------|--------|
27
- | Operating system vulnerabilities | Managed by OS vendor security updates |
28
- | Hardware compromise | Physical security is outside repository scope |
29
- | Third-party SaaS breaches | Upstream provider responsibility (1Password, GitHub) |
30
-
31
- ---
32
-
33
- ## Severity Classification Matrix
34
-
35
- Severity levels and response times align with the Vulnerability Response SLA defined in [COMPLIANCE.md](COMPLIANCE.md).
36
-
37
- | Severity | Definition | Examples | Initial Response | Resolution Target |
38
- |----------|------------|----------|------------------|-------------------|
39
- | **Critical** | Active exploitation or secrets exposed in public repository | Leaked API key in git history; compromised CI workflow pushing malicious code; active credential abuse | 24 hours | 48 hours |
40
- | **High** | Confirmed compromise with no evidence of active exploitation | Unsigned commits merged to main; supply chain dependency with known CVE; tampered binary in PATH | 72 hours | 7 days |
41
- | **Medium** | Policy violation or misconfiguration with limited blast radius | Chezmoi apply drift on non-sensitive config; TLS bypass pattern in script; stale Nix flake lock | 5 business days | 30 days |
42
- | **Low** | Informational finding, hardening opportunity, or cosmetic policy gap | Missing CODEOWNERS entry; advisory shellcheck warning; outdated pinned version | 10 business days | 90 days |
43
-
44
- ---
45
-
46
- ## Incident Response Phases
47
-
48
- ### Phase 1: Detection
49
-
50
- Identify the incident through automated or manual signals.
51
-
52
- **Automated detection sources:**
53
-
54
- | Source | Signal | Tool |
55
- |--------|--------|------|
56
- | Pre-commit hooks | Blocked secret, insecure pattern | Gitleaks, detect-secrets, compliance-guard |
57
- | CI pipeline | Failed security scan, unsigned commit | `security-enhanced.yml`, `compliance-guard.yml` |
58
- | Nightly checks | Dependency version drift, CVE match | `nightly.yml` |
59
- | CodeQL | Static analysis finding | `codeql.yml` |
60
- | Audit log | Unexpected operation | `dot audit` (`~/.local/share/dotfiles.log`) |
61
-
62
- **Manual detection signals:**
63
-
64
- - Unexpected `chezmoi diff` output on a clean system
65
- - Unrecognized entries in `git log --show-signature`
66
- - Binary hash mismatch for tools in `~/.local/bin`
67
- - Shell startup latency spike (possible injected sourcing)
68
-
69
- ### Phase 2: Triage
70
-
71
- Classify the incident severity and assign ownership.
72
-
73
- ```bash
74
- # Gather initial evidence
75
- dot audit | tail -50
76
- git log --oneline --show-signature -20
77
- chezmoi diff
78
- chezmoi verify
79
-
80
- # Check for secrets in recent history
81
- gitleaks detect --source . --log-opts="-20"
82
-
83
- # Validate binary integrity
84
- mise ls --current
85
- nix flake metadata
86
- ```
87
-
88
- **Triage decision tree:**
89
-
90
- 1. Are credentials or secrets exposed publicly? -> **Critical**
91
- 2. Is a signed commit chain broken? -> **High**
92
- 3. Is the CI pipeline producing unexpected artifacts? -> **High**
93
- 4. Is configuration drift limited to non-sensitive files? -> **Medium**
94
- 5. Is the finding advisory with no active risk? -> **Low**
95
-
96
- ### Phase 3: Containment
97
-
98
- Stop the incident from spreading. Actions depend on severity.
99
-
100
- **Immediate containment (Critical/High):**
101
-
102
- ```bash
103
- # Revoke exposed credentials
104
- dot secrets rotate --all-exposed
105
-
106
- # Revoke SSH certificates
107
- dot ssh-cert revoke
108
-
109
- # Lock configuration files to prevent further modification
110
- lock-configs
111
-
112
- # Disable compromised CI workflow
113
- gh workflow disable <workflow-name>
114
-
115
- # Force-protect the main branch
116
- gh api repos/{owner}/{repo}/branches/main/protection \
117
- --method PUT \
118
- --field required_status_checks='{"strict":true,"contexts":["ci"]}' \
119
- --field enforce_admins=true
120
- ```
121
-
122
- **Short-term containment (Medium/Low):**
123
-
124
- ```bash
125
- # Pin the affected dependency to a known-good version
126
- # In .chezmoidata.toml or flake.nix, revert to last verified version
127
-
128
- # Re-apply known-good configuration
129
- chezmoi apply --force
130
-
131
- # Clear potentially tainted caches
132
- rm -rf ~/.cache/shell/
133
- ```
134
-
135
- ### Phase 4: Eradication
136
-
137
- Remove the root cause of the incident.
138
-
139
- | Incident Type | Eradication Action |
140
- |---------------|-------------------|
141
- | Secrets in git history | Rewrite history with `git filter-repo`; rotate all exposed credentials |
142
- | Compromised dependency | Pin to patched version; update `flake.lock` or `lazy-lock.json` |
143
- | Unsigned commits | Rebase and re-sign the commit chain; enforce branch protection |
144
- | Tampered binary | Reinstall from verified source; validate checksums |
145
- | CI workflow compromise | Audit workflow diff; re-pin actions to verified SHA; rotate `GITHUB_TOKEN` |
146
-
147
- ### Phase 5: Recovery
148
-
149
- Restore normal operations and verify integrity.
150
-
151
- ```bash
152
- # Re-apply dotfiles from clean source
153
- chezmoi init --apply
154
-
155
- # Verify deployed state matches source
156
- chezmoi verify
157
-
158
- # Run full test suite
159
- ./tests/framework/test_runner.sh
160
-
161
- # Run compliance checks
162
- pre-commit run --all-files
163
-
164
- # Validate system health
165
- dot health
166
- dot doctor
167
-
168
- # Confirm audit log captures recovery
169
- dot audit | tail -20
170
- ```
171
-
172
- ### Phase 6: Post-Mortem
173
-
174
- Conduct a structured review within 5 business days of resolution. Use the [Post-Incident Review Template](#post-incident-review-template) below.
175
-
176
- ---
177
-
178
- ## Runbooks
179
-
180
- ### Runbook 1: Secrets Leaked to Git History
181
-
182
- **Detection:** Gitleaks pre-commit hook, TruffleHog CI scan, or manual discovery.
183
-
184
- ```bash
185
- # Step 1: Identify exposed secrets
186
- gitleaks detect --source . --verbose --report-path /tmp/gitleaks-report.json
187
-
188
- # Step 2: Determine exposure window
189
- git log --all --oneline --diff-filter=A -- '**/.*env*' '**/*key*' '**/*token*'
190
-
191
- # Step 3: Rotate all exposed credentials immediately
192
- # API keys: regenerate in provider dashboard
193
- # SSH keys: generate new keypair and update authorized_keys
194
- ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519_new
195
- # Tokens: revoke and reissue via provider
196
-
197
- # Step 4: Remove secrets from git history
198
- git filter-repo --invert-paths --path <file-containing-secret>
199
-
200
- # Step 5: Force-push cleaned history (requires branch protection override)
201
- git push origin --force --all
202
-
203
- # Step 6: Notify GitHub to purge cached views
204
- # Open a support ticket at https://support.github.com for cache invalidation
205
-
206
- # Step 7: Update Gitleaks baseline
207
- gitleaks detect --source . --baseline-path config/gitleaks-baseline.json
208
-
209
- # Step 8: Verify clean state
210
- gitleaks detect --source . --verbose
211
- ```
212
-
213
- **Post-action:** Add the leaked pattern to `config/gitleaks.toml` allowlist if it was a false positive, or add a new rule if the pattern was not previously covered.
214
-
215
- ### Runbook 2: Supply Chain Compromise
216
-
217
- **Detection:** CVE advisory, unexpected binary behavior, hash mismatch, or `nightly.yml` alert.
218
-
219
- ```bash
220
- # Step 1: Identify the compromised package
221
- mise ls --current
222
- brew list --versions
223
- nix flake metadata
224
-
225
- # Step 2: Check upstream advisories
226
- gh api /advisories --jq '.[] | select(.package.name == "<package>")'
227
-
228
- # Step 3: Pin to last known-good version
229
- # For Nix: revert flake.lock to known-good commit
230
- git checkout <known-good-commit> -- flake.lock
231
- nix flake lock --update-input nixpkgs
232
-
233
- # For Homebrew: pin the formula
234
- brew pin <formula>
235
-
236
- # For mise: set explicit version
237
- mise use <tool>@<safe-version>
238
-
239
- # Step 4: Verify integrity of installed binary
240
- sha256sum "$(which <tool>)"
241
- # Compare against published checksums from upstream release
242
-
243
- # Step 5: Re-apply configuration with clean dependencies
244
- chezmoi apply --force
245
-
246
- # Step 6: Run full test suite to detect behavioral changes
247
- ./tests/framework/test_runner.sh
248
- ```
249
-
250
- ### Runbook 3: Configuration Drift
251
-
252
- **Detection:** `chezmoi diff` shows unexpected changes, `chezmoi verify` fails, or `dot health` reports drift.
253
-
254
- ```bash
255
- # Step 1: Identify drift scope
256
- chezmoi diff
257
- chezmoi managed --include=files | wc -l
258
-
259
- # Step 2: Capture current deployed state for forensic comparison
260
- chezmoi dump --format=json > /tmp/chezmoi-state-$(date +%s).json
261
-
262
- # Step 3: Check audit log for unauthorized operations
263
- dot audit | grep -E "(apply|edit|add)" | tail -20
264
-
265
- # Step 4: Determine root cause
266
- # Option A: Local manual edit (benign)
267
- # Option B: External tool modified config (investigate)
268
- # Option C: Compromised apply (escalate to Critical)
269
-
270
- # Step 5: Restore to source-of-truth state
271
- chezmoi apply --force
272
-
273
- # Step 6: Verify restoration
274
- chezmoi verify
275
- chezmoi diff # Should produce no output
276
-
277
- # Step 7: Lock critical configs to prevent recurrence
278
- lock-configs
279
- ```
280
-
281
- ### Runbook 4: Tool Compromise (mise/Nix Managed)
282
-
283
- **Detection:** Unexpected binary behavior, hash mismatch, or CVE disclosure for a managed tool.
284
-
285
- ```bash
286
- # Step 1: Quarantine the affected tool
287
- chmod 000 "$(which <tool>)"
288
-
289
- # Step 2: Record forensic evidence
290
- sha256sum "$(which <tool>)" > /tmp/quarantine-evidence.txt
291
- ls -la "$(which <tool>)" >> /tmp/quarantine-evidence.txt
292
- file "$(which <tool>)" >> /tmp/quarantine-evidence.txt
293
-
294
- # Step 3: Check if the tool executed during shell startup
295
- grep "<tool>" ~/.cache/shell/*
296
- grep "<tool>" ~/.local/share/dotfiles.log
297
-
298
- # Step 4: Reinstall from verified source
299
- mise install <tool>@<verified-version> --force
300
- # Or for Nix:
301
- nix profile remove <package>
302
- nix profile install nixpkgs#<package>
303
-
304
- # Step 5: Verify replacement binary
305
- sha256sum "$(which <tool>)"
306
-
307
- # Step 6: Clear cached eval output that may reference the compromised tool
308
- rm -rf ~/.cache/shell/
309
-
310
- # Step 7: Restart shell and verify clean startup
311
- exec "$SHELL" -l
312
- dot health
313
- ```
314
-
315
- ### Runbook 5: CI Pipeline Compromise
316
-
317
- **Detection:** Unexpected workflow behavior, modified workflow files, compromised action dependency.
318
-
319
- ```bash
320
- # Step 1: Disable the affected workflow
321
- gh workflow disable <workflow-name>
322
-
323
- # Step 2: Audit recent workflow changes
324
- git log --oneline --all -- '.github/workflows/'
325
- git diff HEAD~10 -- '.github/workflows/'
326
-
327
- # Step 3: Check action pinning integrity
328
- grep -r "uses:" .github/workflows/ | grep -v "@" # Find unpinned actions
329
-
330
- # Step 4: Verify no unauthorized secrets access
331
- gh api repos/{owner}/{repo}/actions/runs \
332
- --jq '.workflow_runs[] | {id, name, conclusion, head_sha}' | head -20
333
-
334
- # Step 5: Review workflow permissions
335
- grep -r "permissions:" .github/workflows/
336
-
337
- # Step 6: Restore workflows from known-good state
338
- git checkout <known-good-commit> -- .github/workflows/
339
-
340
- # Step 7: Re-pin all actions to verified SHA
341
- # Replace tag references with full commit SHA
342
- # Example: actions/checkout@v4 -> actions/checkout@<full-sha>
343
-
344
- # Step 8: Re-enable workflow and verify
345
- gh workflow enable <workflow-name>
346
- gh workflow run <workflow-name>
347
- gh run list --workflow=<workflow-name> --limit=1
348
- ```
349
-
350
- ---
351
-
352
- ## Communication Protocol
353
-
354
- ### Notification Matrix
355
-
356
- | Severity | Notify | Channel | Timeframe |
357
- |----------|--------|---------|-----------|
358
- | Critical | Repository owner, all contributors | GitHub Security Advisory, direct message | Immediate |
359
- | High | Repository owner | GitHub Issue (private), direct message | Within 24 hours |
360
- | Medium | Repository owner | GitHub Issue | Within 5 business days |
361
- | Low | Tracked in backlog | GitHub Issue with `security` label | Next review cycle |
362
-
363
- ### Escalation Path
364
-
365
- ```text
366
- 1. Incident detected
367
- └── Automated: CI/hook blocks and logs
368
- └── Manual: Reporter opens private advisory
369
-
370
- 2. Triage (within Initial Response SLA)
371
- └── Classify severity
372
- └── Assign owner
373
-
374
- 3. Escalation triggers
375
- └── No response within SLA -> escalate to next severity level
376
- └── Scope expansion -> reclassify severity upward
377
- └── Active exploitation confirmed -> immediate Critical classification
378
- ```
379
-
380
- ### External Notification
381
-
382
- | Condition | Action |
383
- |-----------|--------|
384
- | Leaked credentials for third-party service | Notify the service provider to revoke/rotate |
385
- | Compromised upstream dependency | Open issue on upstream repository |
386
- | GitHub Actions vulnerability | Report via GitHub security advisory |
387
-
388
- ---
389
-
390
- ## Evidence Preservation
391
-
392
- Preserve all forensic evidence before performing eradication or recovery actions.
393
-
394
- ### Evidence Collection Checklist
395
-
396
- | Evidence | Command | Storage |
397
- |----------|---------|---------|
398
- | Dotfiles audit log | `cp ~/.local/share/dotfiles.log /tmp/incident-$(date +%s)/` | Local archive |
399
- | Git reflog | `git reflog > /tmp/incident-$(date +%s)/reflog.txt` | Local archive |
400
- | Git signatures | `git log --show-signature -50 > /tmp/incident-$(date +%s)/signatures.txt` | Local archive |
401
- | Chezmoi state | `chezmoi dump --format=json > /tmp/incident-$(date +%s)/chezmoi-state.json` | Local archive |
402
- | Binary hashes | `sha256sum ~/.local/bin/* > /tmp/incident-$(date +%s)/binary-hashes.txt` | Local archive |
403
- | CI run logs | `gh run view <run-id> --log > /tmp/incident-$(date +%s)/ci-log.txt` | Local archive |
404
- | Shell cache | `cp -r ~/.cache/shell/ /tmp/incident-$(date +%s)/shell-cache/` | Local archive |
405
-
406
- ### Structured Log Format
407
-
408
- Incident evidence is recorded in JSONL format for automated processing:
409
-
410
- ```bash
411
- # Append structured incident event to log
412
- log_incident() {
413
- local severity="$1" type="$2" description="$3"
414
- printf '{"timestamp":"%s","severity":"%s","type":"%s","description":"%s","user":"%s","hostname":"%s"}\n' \
415
- "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
416
- "$severity" \
417
- "$type" \
418
- "$description" \
419
- "$(whoami)" \
420
- "$(hostname)" \
421
- >> ~/.local/share/incident-log.jsonl
422
- }
423
-
424
- # Usage
425
- log_incident "critical" "secrets-exposure" "API key found in commit abc1234"
426
- ```
427
-
428
- ### Retention Policy
429
-
430
- | Evidence Type | Retention Period |
431
- |---------------|-----------------|
432
- | Incident logs (JSONL) | 1 year |
433
- | Git reflog snapshots | 90 days |
434
- | Binary hash records | Until next verified release |
435
- | CI run logs | 90 days (GitHub default) |
436
-
437
- ---
438
-
439
- ## Recovery Procedures
440
-
441
- ### Standard Recovery
442
-
443
- ```bash
444
- # Roll back to a known-good dotfiles state
445
- dot rollback
446
-
447
- # Restore specific configuration files
448
- dot restore <target>
449
-
450
- # Full re-apply from source of truth
451
- chezmoi init --apply --force
452
-
453
- # Verify system health
454
- dot health
455
- dot doctor
456
- ```
457
-
458
- ### Full System Recovery
459
-
460
- For incidents requiring complete re-provisioning:
461
-
462
- ```bash
463
- # Step 1: Export current secrets (if not compromised)
464
- dot secrets export > /tmp/secrets-backup.age
465
-
466
- # Step 2: Clear all deployed dotfiles
467
- chezmoi purge
468
-
469
- # Step 3: Clear all caches
470
- rm -rf ~/.cache/shell/
471
- rm -rf ~/.cache/chezmoi/
472
-
473
- # Step 4: Re-initialize from clean clone
474
- git clone <repo-url> ~/.dotfiles
475
- cd ~/.dotfiles
476
- git verify-commit HEAD # Verify signature chain
477
-
478
- # Step 5: Re-apply
479
- chezmoi init --apply
480
-
481
- # Step 6: Re-import secrets (if exported)
482
- dot secrets import /tmp/secrets-backup.age
483
-
484
- # Step 7: Verify
485
- chezmoi verify
486
- dot health
487
- ./tests/framework/test_runner.sh
488
- ```
489
-
490
- ### Recovery Verification Checklist
491
-
492
- | Check | Command | Expected |
493
- |-------|---------|----------|
494
- | Chezmoi state clean | `chezmoi diff` | No output |
495
- | All managed files present | `chezmoi verify` | Exit code 0 |
496
- | Test suite passes | `./tests/framework/test_runner.sh` | All assertions pass |
497
- | Health dashboard green | `dot health` | No errors |
498
- | Signatures valid | `git log --show-signature -5` | All commits signed |
499
- | Pre-commit hooks active | `pre-commit run --all-files` | All hooks pass |
500
-
501
- ---
502
-
503
- ## Post-Incident Review Template
504
-
505
- Conduct a review within 5 business days of resolution. Copy the template below into a new file under `docs/security/incidents/`.
506
-
507
- ````markdown
508
- # Post-Incident Review: [INCIDENT-YYYY-NNN]
509
-
510
- ## Metadata
511
-
512
- | Field | Value |
513
- |-------|-------|
514
- | **Date detected** | YYYY-MM-DD HH:MM UTC |
515
- | **Date resolved** | YYYY-MM-DD HH:MM UTC |
516
- | **Severity** | Critical / High / Medium / Low |
517
- | **Incident type** | Secrets exposure / Supply chain / Drift / Tool compromise / CI compromise |
518
- | **Responder** | @handle |
519
-
520
- ## Timeline
521
-
522
- | Time (UTC) | Event |
523
- |------------|-------|
524
- | HH:MM | Incident detected by [source] |
525
- | HH:MM | Triage completed, classified as [severity] |
526
- | HH:MM | Containment action taken: [description] |
527
- | HH:MM | Root cause identified: [description] |
528
- | HH:MM | Eradication completed |
529
- | HH:MM | Recovery verified |
530
-
531
- ## Root Cause
532
-
533
- [Describe the root cause. Include the specific technical failure, misconfiguration, or external event.]
534
-
535
- ## Impact
536
-
537
- | Dimension | Assessment |
538
- |-----------|------------|
539
- | Data exposed | [What data, if any, was exposed] |
540
- | Systems affected | [Which machines, configs, or pipelines] |
541
- | Duration of exposure | [Time between introduction and remediation] |
542
-
543
- ## Response Evaluation
544
-
545
- | Metric | Target | Actual |
546
- |--------|--------|--------|
547
- | Detection time | Automated / < 1 hour | [actual] |
548
- | Initial response | Per severity SLA | [actual] |
549
- | Resolution | Per severity SLA | [actual] |
550
-
551
- ## Lessons Learned
552
-
553
- ### What went well
554
-
555
- - [Item]
556
-
557
- ### What needs improvement
558
-
559
- - [Item]
560
-
561
- ## Action Items
562
-
563
- | Action | Owner | Due Date | Status |
564
- |--------|-------|----------|--------|
565
- | [Preventive measure] | @handle | YYYY-MM-DD | Open |
566
- | [Detection improvement] | @handle | YYYY-MM-DD | Open |
567
- | [Process update] | @handle | YYYY-MM-DD | Open |
568
- ````
569
-
570
- ---
571
-
572
- ## References
573
-
574
- - [NIST SP 800-61 Rev. 2 — Computer Security Incident Handling Guide](https://csrc.nist.gov/publications/detail/sp/800-61/rev-2/final)
575
- - [COMPLIANCE.md — Vulnerability Response SLA](COMPLIANCE.md)
576
- - [THREAT_MODEL.md — Attack Surfaces and Mitigations](THREAT_MODEL.md)
577
- - [SECURITY.md — Security Controls and Hardening](SECURITY.md)
578
- - [SLSA Framework](https://slsa.dev/)
579
- - [Gitleaks](https://github.com/gitleaks/gitleaks)
@@ -1,122 +0,0 @@
1
- ---
2
- render_with_liquid: false
3
- ---
4
-
5
- # Install Verification
6
-
7
- This page documents what gets verified during `install.sh` execution,
8
- why those checks matter, and how to obtain the per-release expected
9
- hashes used by the verified-install path in the README.
10
-
11
- Managed under
12
- [#858](https://github.com/sebastienrousseau/dotfiles/issues/858).
13
-
14
- ## What is verified
15
-
16
- `install.sh` performs three classes of verification before doing
17
- anything destructive:
18
-
19
- ### 1. The installer itself (verified path)
20
-
21
- The README's **Verified install** snippet pins to a release tag
22
- (e.g. `v0.2.501`), downloads the installer, and asks `shasum -a 256
23
- -c` (or `sha256sum -c`) to check the contents against an expected
24
- hash. If the hash doesn't match, the verify step exits non-zero and
25
- the install never starts.
26
-
27
- ### 2. The `chezmoi` binary (always verified when possible)
28
-
29
- `install.sh` prefers the bundled checksum-verified installer at
30
- `tools/ci/install-chezmoi-verified.sh`, which:
31
-
32
- - Resolves the platform (`uname -s` + `uname -m`).
33
- - Downloads `chezmoi_<version>_<os>_<arch>.tar.gz` AND the matching
34
- `chezmoi_<version>_checksums.txt` from the official
35
- `twpayne/chezmoi` GitHub release.
36
- - Greps the checksum file for the asset's expected SHA256.
37
- - Verifies the downloaded tarball against that SHA256 using
38
- `shasum -a 256 -c` / `sha256sum -c`.
39
- - Aborts with a clear error if the asset isn't in the checksum file
40
- or the verification fails.
41
-
42
- When the verified installer isn't available (e.g. the curl one-liner
43
- mode where `install.sh` is fetched in isolation), the code falls back
44
- to `get.chezmoi.io` with two defense-in-depth checks:
45
-
46
- - The downloaded installer must be smaller than 100 KiB (sanity
47
- guard against a CDN serving an arbitrary binary).
48
- - The first line must start with `#!/` (must look like a shell
49
- script).
50
-
51
- These are weaker than a SHA256 check, but they catch the obvious
52
- "installer got replaced with a 50 MB malicious binary" failure mode.
53
-
54
- ### 3. The chezmoi source tree
55
-
56
- After chezmoi is installed, `install.sh` clones the dotfiles repo
57
- itself. This isn't currently cryptographically verified beyond Git's
58
- own object integrity, but commits in the repo are SSH-signed and
59
- branch protection on `main` requires signed commits (see #853).
60
-
61
- ## How to obtain per-release hashes
62
-
63
- The verified-install snippet uses the SHA256 of the `install.sh`
64
- file *as it exists at the release tag*. To regenerate after a release:
65
-
66
- ```bash
67
- git switch main
68
- git pull
69
- NEW_TAG="v0.2.502" # adjust
70
- git tag -s "$NEW_TAG" -m "..."
71
- git push origin "$NEW_TAG"
72
-
73
- # Compute the hash:
74
- shasum -a 256 install.sh
75
-
76
- # Update README.md's verified-install snippet with the new hash + tag.
77
- ```
78
-
79
- A follow-up automation (tracked at the bottom of this page) will
80
- publish a `.sha256` sibling next to the install.sh asset in GitHub
81
- Releases so the README snippet can reference a stable URL instead
82
- of a hardcoded value.
83
-
84
- ## What to do if the hash doesn't match
85
-
86
- If you run the verified install and `shasum -a 256 -c` reports
87
- `FAILED`:
88
-
89
- 1. **Don't run the installer.** The hash mismatch means either the
90
- release was retagged (rare) or someone is MITM-ing your download.
91
- 2. Check the [Releases page](https://github.com/sebastienrousseau/dotfiles/releases)
92
- for the matching tag. The per-release `install.sh` SHA is
93
- embedded in the README at the time of that release; you can also
94
- recover it from the git history of `README.md`.
95
- 3. If the README hash is stale (release was retagged for legitimate
96
- reasons), `git log` on `install.sh` will show the change. Inspect
97
- the diff before trusting a new hash.
98
-
99
- ## What is NOT verified (yet)
100
-
101
- - **Cosign keyless signature** on `install.sh` — tracked separately
102
- under #876.
103
- - **deps.dev attestation lookup** for npm/Python deps used during
104
- install — tracked under #877.
105
- - **Reproducible-build guarantee** for the chezmoi binary itself —
106
- out of scope; rely on the upstream project's release engineering.
107
-
108
- ## Negative-test coverage
109
-
110
- `tests/unit/install/test_install_chezmoi_verified.sh` exercises the
111
- verification path with a deliberately tampered checksum to confirm
112
- the installer aborts. The test ships with the repo and runs on every
113
- PR.
114
-
115
- ## References
116
-
117
- - `install.sh` — the entry point.
118
- - `tools/ci/install-chezmoi-verified.sh` — the SHA256-pinned
119
- chezmoi installer.
120
- - `tests/unit/install/test_install_chezmoi_verified.sh` — the
121
- negative test.
122
- - Issue [#858](https://github.com/sebastienrousseau/dotfiles/issues/858).