@sebastienrousseau/dotfiles 0.2.500 → 0.2.501
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.
- package/CHANGELOG.md +77 -0
- package/README.md +82 -44
- package/docs/.vitepress/reports/localization-readability-audit.md +4 -0
- package/docs/AI.md +8 -2
- package/docs/CNAME +1 -0
- package/docs/COPYRIGHT +1 -1
- package/docs/NAMING_CONVENTIONS.md +7 -0
- package/docs/README.md +4 -0
- package/docs/_config.yml +59 -0
- package/docs/adr/ADR-001-ci-cd-pipeline.md +17 -0
- package/docs/adr/ADR-002-shell-performance.md +9 -0
- package/docs/adr/ADR-003-security-first.md +18 -0
- package/docs/adr/ADR-004-cli-architecture.md +14 -0
- package/docs/adr/ADR-005-chezmoi-choice.md +10 -0
- package/docs/adr/ADR-006-shell-selection.md +9 -0
- package/docs/adr/ADR-007-multi-shell-parity.md +10 -1
- package/docs/adr/ADR-008-alias-system-architecture.md +10 -0
- package/docs/adr/ADR-009-wallpaper-driven-theming.md +131 -0
- package/docs/adr/ADR-010-starship-transient-prompt.md +144 -0
- package/docs/adr/ADR-011-nushell-tier3-keep.md +144 -0
- package/docs/adr/README.md +7 -0
- package/docs/architecture/ARCHITECTURE.md +4 -0
- package/docs/architecture/INTEROP.md +8 -0
- package/docs/architecture/REPO_LAYOUT.md +5 -1
- package/docs/architecture/WALKTHROUGH.md +4 -0
- package/docs/architecture/fleet-deployment.md +4 -0
- package/docs/archive/EUXIS_2026_REVIEW.md +11 -3
- package/docs/archive/LEGACY_ROADMAP.md +45 -27
- package/docs/archive/MILESTONE_v0.2.493.md +4 -0
- package/docs/archive/PLAN.md +46 -8
- package/docs/archive/REPO_AUDIT.md +8 -0
- package/docs/guides/INSTALL.md +4 -0
- package/docs/guides/NEOVIM_IDE_GUIDE.md +9 -0
- package/docs/guides/THEMING.md +8 -0
- package/docs/guides/TROUBLESHOOTING.md +28 -0
- package/docs/guides/WSL2_NIX_TROUBLESHOOTING.md +70 -1
- package/docs/index.md +6 -2
- package/docs/interop/A2A.md +7 -0
- package/docs/interop/POWERSHELL.md +102 -0
- package/docs/manual/00-introduction.md +5 -1
- package/docs/manual/01-concepts/01-architecture.md +4 -0
- package/docs/manual/01-concepts/02-trust-model.md +6 -2
- package/docs/manual/01-concepts/03-theme-engine.md +4 -0
- package/docs/manual/01-concepts/04-fleet.md +7 -1
- package/docs/manual/01-concepts/05-self-healing.md +8 -1
- package/docs/manual/02-tutorials/01-first-install.md +5 -0
- package/docs/manual/02-tutorials/02-add-wallpaper.md +5 -0
- package/docs/manual/02-tutorials/03-create-profile.md +6 -0
- package/docs/manual/02-tutorials/04-encrypt-secret.md +6 -0
- package/docs/manual/02-tutorials/05-deploy-fleet.md +5 -1
- package/docs/manual/03-reference/01-dot-cli.md +4 -0
- package/docs/manual/03-reference/02-config-files.md +8 -2
- package/docs/manual/03-reference/03-environment.md +4 -0
- package/docs/manual/03-reference/04-templates.md +7 -1
- package/docs/manual/03-reference/05-feature-flags.md +10 -0
- package/docs/manual/04-cookbook/01-recipes.md +4 -0
- package/docs/manual/04-cookbook/02-troubleshooting.md +32 -0
- package/docs/manual/04-cookbook/03-faq.md +8 -0
- package/docs/manual/05-appendices/A-platform-matrix.md +4 -0
- package/docs/manual/05-appendices/B-security-checklist.md +6 -0
- package/docs/manual/05-appendices/C-glossary.md +4 -0
- package/docs/manual/05-appendices/D-bibliography.md +5 -1
- package/docs/manual/05-appendices/E-license.md +4 -0
- package/docs/manual/_toc.yml +1 -1
- package/docs/manual/command-index.md +4 -0
- package/docs/manual/concept-index.md +4 -0
- package/docs/operations/ATTESTATION.md +5 -0
- package/docs/operations/CI_CADENCE.md +107 -0
- package/docs/operations/CI_COMPOSITES.md +156 -0
- package/docs/operations/COMPLETIONS.md +123 -0
- package/docs/operations/COVERAGE.md +148 -0
- package/docs/operations/DRIFT.md +107 -0
- package/docs/operations/MAINTENANCE.md +5 -1
- package/docs/operations/MIGRATION.md +14 -6
- package/docs/operations/OPERATIONS.md +24 -0
- package/docs/operations/PERFORMANCE.md +133 -0
- package/docs/operations/RELIABILITY.md +6 -0
- package/docs/operations/ROADMAP.md +36 -18
- package/docs/operations/TESTING.md +4 -0
- package/docs/operations/TRACEABILITY.md +4 -0
- package/docs/operations/TRUSTED_AGENT_WORKSTATION.md +4 -0
- package/docs/operations/VERSION_SYNC.md +54 -5
- package/docs/reference/ALIASES.md +7 -0
- package/docs/reference/ALIASES_CHEATSHEET.md +5 -1
- package/docs/reference/ALIASES_DEPRECATIONS.md +5 -1
- package/docs/reference/FEATURES.md +4 -0
- package/docs/reference/FONTS.md +4 -0
- package/docs/reference/PROFILES.md +4 -0
- package/docs/reference/SCREENSHOTS.md +4 -0
- package/docs/reference/SCRIPTS.md +4 -0
- package/docs/reference/SUPPORT_MATRIX.md +10 -4
- package/docs/reference/THEMES.md +4 -0
- package/docs/reference/TOOLS.md +4 -0
- package/docs/reference/UTILS.md +16 -12
- package/docs/security/AI_ACT_COMPLIANCE.md +4 -0
- package/docs/security/AUDIT_BYPASS.md +103 -0
- package/docs/security/AUTOMATION_SECRETS.md +4 -0
- package/docs/security/CI_EGRESS_ALLOWLIST.md +127 -0
- package/docs/security/COMPLIANCE.md +5 -0
- package/docs/security/DEPS_DEV_EXCEPTIONS.md +86 -0
- package/docs/security/ENCRYPTION.md +5 -0
- package/docs/security/FMEA.md +4 -0
- package/docs/security/HISTORY_FILTERING.md +132 -0
- package/docs/security/INCIDENT_RESPONSE.md +4 -0
- package/docs/security/INSTALL_VERIFICATION.md +122 -0
- package/docs/security/KEYS.md +4 -0
- package/docs/security/KEY_ROTATION.md +4 -0
- package/docs/security/MCP_POLICY.md +9 -0
- package/docs/security/POLICY_RELEASES.md +4 -0
- package/docs/security/README.md +4 -0
- package/docs/security/SCORECARD.md +80 -0
- package/docs/security/SECRETS.md +12 -0
- package/docs/security/SECURITY.md +4 -0
- package/docs/security/SECURITY_CHECKLIST.md +11 -0
- package/docs/security/SHELL_EXEMPTIONS.md +145 -0
- package/docs/security/SOUP_REGISTER.md +4 -0
- package/docs/security/THREAT_MODEL.md +10 -0
- package/docs/security/VERIFICATION_VALIDATION.md +5 -1
- package/docs/themes/README.md +4 -0
- package/docs/themes/VISUAL_INTEGRITY_REPORT.md +4 -0
- package/dot_config/ai/identity.md +3 -0
- package/dot_config/ai/patterns/architect.md +2 -0
- package/dot_config/ai/patterns/hardener.md +2 -0
- package/dot_config/ai/patterns/refactor.md +2 -0
- package/dot_config/alacritty/alacritty.toml.tmpl +3 -3
- package/dot_config/atuin/config.toml.tmpl +47 -0
- package/dot_config/dotfiles/agent-card.json +1 -1
- package/dot_config/dotfiles/boot/README.md +2 -0
- package/dot_config/dotfiles/grub/README.md +2 -0
- package/dot_config/dotfiles/lock/README.md +2 -0
- package/dot_config/fish/conf.d/init.fish.tmpl +21 -0
- package/dot_config/fish/functions/_cached_eval.fish +84 -11
- package/dot_config/fish/functions/_cached_eval_clear.fish +17 -0
- package/dot_config/foot/foot.ini.tmpl +3 -3
- package/dot_config/fuzzel/fuzzel.ini.tmpl +2 -2
- package/dot_config/ghostty/config.tmpl +3 -3
- package/dot_config/git/hooks/executable_commit-msg +146 -0
- package/dot_config/goose/config.yaml +2 -2
- package/dot_config/gtk-3.0/gtk.css.tmpl +2 -2
- package/dot_config/gtk-3.0/settings.ini.tmpl +2 -2
- package/dot_config/gtk-4.0/gtk.css.tmpl +2 -2
- package/dot_config/gtk-4.0/settings.ini.tmpl +2 -2
- package/dot_config/kitty/kitty.conf.tmpl +3 -3
- package/dot_config/mise/config.toml +1 -1
- package/dot_config/niri/config.kdl.tmpl +2 -2
- package/dot_config/nushell/cached_eval.nu +80 -0
- package/dot_config/nushell/env.nu.tmpl +21 -13
- package/dot_config/shell/00-core-paths.sh.tmpl +1 -0
- package/dot_config/shell/05-core-safety.sh +1 -0
- package/dot_config/shell/10-secrets.sh +1 -0
- package/dot_config/shell/40-fzf-defaults.sh.tmpl +1 -0
- package/dot_config/shell/40-ls-colors.sh +1 -0
- package/dot_config/shell/50-logic-functions-core.sh.tmpl +1 -0
- package/dot_config/shell/50-logic-functions.sh.tmpl +1 -0
- package/dot_config/shell/51-logic-functions-extra.sh.tmpl +1 -0
- package/dot_config/shell/90-ux-aliases.sh.tmpl +1 -0
- package/dot_config/shell/91-ux-aliases-lazy.sh.tmpl +1 -0
- package/dot_config/shell/README.md +25 -8
- package/dot_config/starship.toml.tmpl +2 -2
- package/dot_config/tmux/tmux.conf.tmpl +3 -3
- package/dot_config/user-dirs.dirs +1 -0
- package/dot_config/vscode/settings.json.tmpl +2 -2
- package/dot_config/waybar/config.jsonc.tmpl +2 -2
- package/dot_config/waybar/style.css.tmpl +2 -2
- package/dot_config/wezterm/wezterm.lua.tmpl +3 -3
- package/dot_config/zsh/dot_zshrc.tmpl +154 -17
- package/dot_config/zsh/rc.d/00-alias-shims.zsh +28 -6
- package/dot_config/zsh/rc.d/30-options.zsh.tmpl +26 -6
- package/dot_local/bin/executable_bm +2 -0
- package/dot_local/bin/executable_dot +9 -2
- package/dot_local/bin/executable_dot-load-benchmark +1 -1
- package/dot_local/bin/executable_notify +2 -0
- package/dot_local/bin/executable_open +2 -0
- package/dot_local/bin/executable_tour +4 -2
- package/dot_local/bin/executable_up +3 -1
- package/install.sh +12 -4
- package/package.json +1 -1
- package/scripts/ci/check-dangerous-chmod.sh +19 -0
- package/scripts/ci/check-deps-dev.sh +236 -0
- package/scripts/ci/check-insecure-tls.sh +61 -0
- package/scripts/ci/check-regression-traceability.sh +67 -0
- package/scripts/ci/check-shell-preamble.sh +106 -0
- package/scripts/ci/run-coverage.sh +362 -0
- package/scripts/ci/validate-chezmoidata.sh +25 -0
- package/scripts/diagnostics/doctor.sh +173 -5
- package/scripts/diagnostics/drift-dashboard.sh +177 -13
- package/scripts/diagnostics/health.sh +21 -4
- package/scripts/diagnostics/perf.sh +304 -77
- package/scripts/diagnostics/workstation-attestation.sh +6 -1
- package/scripts/dot/commands/agent.sh +14 -5
- package/scripts/dot/commands/ai.sh +75 -10
- package/scripts/dot/lib/bento.sh +2 -1
- package/scripts/dot/lib/log.sh +6 -0
- package/scripts/dot/lib/platform.sh +1 -0
- package/scripts/dot/lib/ui.sh +11 -0
- package/scripts/dot/lib/utils.sh +5 -0
- package/scripts/git-hooks/pre-commit-audit.sh +1 -1
- package/scripts/git-hooks/pre-push +66 -3
- package/scripts/ops/heal-chezmoi.sh +41 -6
- package/scripts/qa/powershell-contract.ps1 +95 -0
- package/scripts/theme/merge-wallpaper.sh +4 -0
- package/scripts/theme/switch.sh +20 -10
- package/dot_config/atuin/config.toml +0 -40
- package/dot_local/bin/__pycache__/executable_dot-load-benchmark-ptycpython-312.pyc +0 -0
package/docs/security/SECRETS.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
render_with_liquid: false
|
|
3
|
+
---
|
|
4
|
+
{% raw %}
|
|
5
|
+
|
|
1
6
|
# Secrets Management
|
|
2
7
|
|
|
3
8
|
Provider-agnostic secrets via `dot secrets`. Supports macOS Keychain, `pass`, and age-encrypted local storage.
|
|
@@ -17,6 +22,7 @@ infra = ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "GITHUB_TOKEN"]
|
|
|
17
22
|
```
|
|
18
23
|
|
|
19
24
|
`auto` resolves in this order:
|
|
25
|
+
|
|
20
26
|
1. `macos-keychain` on macOS
|
|
21
27
|
2. `pass` when available
|
|
22
28
|
3. `plain-enc` fallback (age-encrypted local store)
|
|
@@ -49,6 +55,7 @@ eval "$(dot env load ai)"
|
|
|
49
55
|
When `auto_load = true`, shell startup can load configured buckets automatically via `dot env load <bucket>`.
|
|
50
56
|
|
|
51
57
|
Environment toggles:
|
|
58
|
+
|
|
52
59
|
- `DOTFILES_SECRETS_PROVIDER`
|
|
53
60
|
- `DOTFILES_SECRETS_AUTO_LOAD`
|
|
54
61
|
- `DOTFILES_SECRETS_BUCKET_NAMES`
|
|
@@ -89,6 +96,7 @@ secrets_backend = "1password"
|
|
|
89
96
|
```
|
|
90
97
|
|
|
91
98
|
Use in templates:
|
|
99
|
+
|
|
92
100
|
```text
|
|
93
101
|
{{ onepassword "my-secret" "vault-name" }}
|
|
94
102
|
{{ onepasswordRead "op://vault/item/field" }}
|
|
@@ -104,6 +112,7 @@ secrets_backend = "bitwarden"
|
|
|
104
112
|
```
|
|
105
113
|
|
|
106
114
|
Use in templates:
|
|
115
|
+
|
|
107
116
|
```text
|
|
108
117
|
{{ bitwarden "item" "my-login" }}
|
|
109
118
|
{{ bitwardenFields "item" "my-login" }}
|
|
@@ -119,6 +128,7 @@ secrets_backend = "vault"
|
|
|
119
128
|
```
|
|
120
129
|
|
|
121
130
|
Use in templates:
|
|
131
|
+
|
|
122
132
|
```text
|
|
123
133
|
{{ vault "secret/data/my-secret" }}
|
|
124
134
|
```
|
|
@@ -133,6 +143,7 @@ secrets_backend = "pass"
|
|
|
133
143
|
```
|
|
134
144
|
|
|
135
145
|
Use in templates:
|
|
146
|
+
|
|
136
147
|
```text
|
|
137
148
|
{{ pass "my-secret" }}
|
|
138
149
|
```
|
|
@@ -144,3 +155,4 @@ See the [chezmoi documentation](https://www.chezmoi.io/user-guide/password-manag
|
|
|
144
155
|
- **Never commit** `~/.config/chezmoi/key.txt` to version control.
|
|
145
156
|
- **Avoid shell history exposure** — use `dot secrets set` which prompts securely.
|
|
146
157
|
- **Rotate credentials** on a regular schedule.
|
|
158
|
+
{% endraw %}
|
|
@@ -1,27 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
render_with_liquid: false
|
|
3
|
+
---
|
|
4
|
+
|
|
1
5
|
# Security Release Checklist
|
|
2
6
|
|
|
3
7
|
Use this checklist before cutting any new release (e.g., `v0.x.x`) to ensure supply-chain integrity.
|
|
4
8
|
|
|
5
9
|
## 1. Supply Chain & Installer
|
|
10
|
+
|
|
6
11
|
- [ ] **Pinned Version**: Update `install.sh` `VERSION` variable to match the release tag.
|
|
7
12
|
- [ ] **Docs Sync**: Ensure `README.md` and `.github/PULL_REQUEST_TEMPLATE.md` installer URLs point to the new tag (not `main`).
|
|
8
13
|
- [ ] **Clean Build**: Verify `install.sh` does not curl random scripts from third parties without pinning.
|
|
9
14
|
- [ ] **SOUP Register**: Review [SOUP_REGISTER.md](/home/seb/.dotfiles/docs/security/SOUP_REGISTER.md) and confirm all active external components have an owner and validation path.
|
|
10
15
|
|
|
11
16
|
## 2. Secrets & Leak Prevention
|
|
17
|
+
|
|
12
18
|
- [ ] **SSH Keys**: Scan `dot_ssh/` to ensure no private keys (`id_rsa`, `id_ed25519`) are committed.
|
|
13
19
|
- [ ] **Env Vars**: Check for hardcoded API tokens in `dot_config/` (use `age` encryption or environment variables instead).
|
|
14
20
|
- [ ] **Git History**: Run `git secrets` or similar to scan for accidental commits of credentials.
|
|
15
21
|
|
|
16
22
|
## 3. Platform Safety
|
|
23
|
+
|
|
17
24
|
- [ ] **WSL Check**: Verify `install.sh` detects WSL and does not try to install systemd services or macOS defaults.
|
|
18
25
|
- [ ] **Root usage**: Ensure no script requires `sudo` unnecessarily (Principle of Least Privilege).
|
|
19
26
|
|
|
20
27
|
## 4. Toolchain
|
|
28
|
+
|
|
21
29
|
- [ ] **Binary Integrity**: Check that `dot_local/bin/` scripts are pure shell/executable and match expected checksums (no binary blobs).
|
|
22
30
|
- [ ] **Dependency Scan**: Run `npm audit` / `cargo audit` if applicable (currently Node.js legacy is removed).
|
|
23
31
|
|
|
24
32
|
## 5. MCP (Model Context Protocol) Hardening
|
|
33
|
+
|
|
25
34
|
- [ ] **Launcher Policy**: Verify `dot mcp` shows only allowlisted launchers (`npx`, `node`, `uvx`).
|
|
26
35
|
- [ ] **Filesystem Scope**: Ensure no MCP server has broad access (`/`, `/home`, `/Users`).
|
|
27
36
|
- [ ] **Default Profile**: Confirm only the `strict-local` server set is enabled by default.
|
|
@@ -32,6 +41,7 @@ Use this checklist before cutting any new release (e.g., `v0.x.x`) to ensure sup
|
|
|
32
41
|
Run `dot mcp --strict --json` to validate all MCP server configurations and capture an audit artifact.
|
|
33
42
|
|
|
34
43
|
## 6. Release Attestation
|
|
44
|
+
|
|
35
45
|
- [ ] **SBOM Generation**: Verify `dotfiles-sbom.spdx.json` is generated in release workflow.
|
|
36
46
|
- [ ] **Attestation Signing**: Confirm `actions/attest-build-provenance` signs the release artifacts.
|
|
37
47
|
- [ ] **Attestation Verification**: Verify with `gh attestation verify <artifact> --repo sebastienrousseau/dotfiles`.
|
|
@@ -39,6 +49,7 @@ Run `dot mcp --strict --json` to validate all MCP server configurations and capt
|
|
|
39
49
|
- [ ] **Automation Keying**: Confirm `ACTIONS_BOT_SIGNING_KEY` exists and matches the signer in `dot_config/git/allowed_signers`.
|
|
40
50
|
|
|
41
51
|
## 7. Final Verification
|
|
52
|
+
|
|
42
53
|
- [ ] **Docker Test**: Run `docker build -f Dockerfile.test .` to verify clean install.
|
|
43
54
|
- [ ] **Doctor**: Run `dot doctor` locally.
|
|
44
55
|
- [ ] **MCP Check**: Run `dot mcp` to verify MCP configuration.
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
---
|
|
2
|
+
render_with_liquid: false
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Shell Preamble Exemptions
|
|
6
|
+
|
|
7
|
+
Every bash script in this repo must include `set -euo pipefail` (or
|
|
8
|
+
`set -eu` for POSIX `sh`) within its first 50 lines. The rule is
|
|
9
|
+
enforced by
|
|
10
|
+
[`scripts/ci/check-shell-preamble.sh`](../../scripts/ci/check-shell-preamble.sh),
|
|
11
|
+
wired into `pre-commit` and the `reusable-shell-lint.yml` CI job.
|
|
12
|
+
Tests pin the contract under
|
|
13
|
+
[`tests/unit/security/test_shell_preamble_lint.sh`](../../tests/unit/security/test_shell_preamble_lint.sh).
|
|
14
|
+
|
|
15
|
+
## Why the preamble is mandatory
|
|
16
|
+
|
|
17
|
+
`set -e` fails the script on the first error. `set -u` rejects
|
|
18
|
+
reads of unset variables. `set -o pipefail` propagates the exit
|
|
19
|
+
code of the last failing command in a pipeline rather than only the
|
|
20
|
+
final command's. Together they convert silent failures into loud
|
|
21
|
+
ones — which is the only way to catch them.
|
|
22
|
+
|
|
23
|
+
Real example from this repo's history: `executable_dot-load-benchmark`
|
|
24
|
+
shipped with only `set -e`. A failing pipeline (e.g. `cmd | grep`)
|
|
25
|
+
where `grep` succeeded would still report success even when `cmd`
|
|
26
|
+
crashed. The full triple catches this. The benchmark was upgraded
|
|
27
|
+
in commit 970b631d under #854.
|
|
28
|
+
|
|
29
|
+
## Exemption categories
|
|
30
|
+
|
|
31
|
+
Two kinds of files legitimately can't enforce the preamble locally:
|
|
32
|
+
|
|
33
|
+
### 1. Sourced libraries
|
|
34
|
+
|
|
35
|
+
Files loaded via `source` / `.` into a caller's shell context. The
|
|
36
|
+
caller already has `set -euo pipefail`; the library inherits it.
|
|
37
|
+
Adding `set -e` locally would persist after the library returns and
|
|
38
|
+
break the caller's own error-handling logic.
|
|
39
|
+
|
|
40
|
+
These files must carry a comment header in their first 15 lines:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Sourced by <parent>.sh; inherits set -euo pipefail.
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The lint accepts files with this marker regardless of preamble
|
|
47
|
+
state. Current adopters:
|
|
48
|
+
|
|
49
|
+
| Path | Sourced by |
|
|
50
|
+
|---|---|
|
|
51
|
+
| `dot_config/shell/00-core-paths.sh.tmpl` | shell init (zsh/bash/fish) |
|
|
52
|
+
| `dot_config/shell/05-core-safety.sh` | shell init |
|
|
53
|
+
| `dot_config/shell/10-secrets.sh` | shell init |
|
|
54
|
+
| `dot_config/shell/40-fzf-defaults.sh.tmpl` | shell init |
|
|
55
|
+
| `dot_config/shell/40-ls-colors.sh` | shell init |
|
|
56
|
+
| `dot_config/shell/50-logic-functions-core.sh.tmpl` | shell init + fish bridge |
|
|
57
|
+
| `dot_config/shell/50-logic-functions.sh.tmpl` | shell init + fish bridge |
|
|
58
|
+
| `dot_config/shell/51-logic-functions-extra.sh.tmpl` | shell init (lazy) |
|
|
59
|
+
| `dot_config/shell/90-ux-aliases.sh.tmpl` | shell init + fish bridge |
|
|
60
|
+
| `dot_config/shell/91-ux-aliases-lazy.sh.tmpl` | shell init (lazy) |
|
|
61
|
+
| `scripts/dot/lib/bento.sh` | dot CLI commands |
|
|
62
|
+
| `scripts/dot/lib/log.sh` | dot CLI + diagnostics |
|
|
63
|
+
| `scripts/dot/lib/platform.sh` | dot CLI commands |
|
|
64
|
+
| `scripts/dot/lib/ui.sh` | dot CLI + diagnostics + ops |
|
|
65
|
+
| `scripts/dot/lib/utils.sh` | dot CLI |
|
|
66
|
+
| `scripts/ops/heal-chezmoi.sh` | `scripts/ops/heal.sh` |
|
|
67
|
+
| `scripts/ops/heal-system.sh` | `scripts/ops/heal.sh` |
|
|
68
|
+
| `scripts/ops/heal-tools.sh` | `scripts/ops/heal.sh` |
|
|
69
|
+
|
|
70
|
+
### 2. Bulk-sourced fragments (path-skipped)
|
|
71
|
+
|
|
72
|
+
Three directories contain hundreds of alias / function / PATH
|
|
73
|
+
snippets that are sourced into the shell. Annotating each one
|
|
74
|
+
individually would be 300+ marker comments with no extra signal.
|
|
75
|
+
The lint skips them by path:
|
|
76
|
+
|
|
77
|
+
| Path | Contents |
|
|
78
|
+
|---|---|
|
|
79
|
+
| `.chezmoitemplates/aliases/**/*.aliases.sh` | alias definitions sourced into the user's shell. |
|
|
80
|
+
| `.chezmoitemplates/functions/**` | shell-function definitions sourced into the user's shell. |
|
|
81
|
+
| `.chezmoitemplates/paths/**` | `PATH=…:$PATH` snippets concatenated by the shell init. |
|
|
82
|
+
|
|
83
|
+
### 3. Test scripts (path-skipped)
|
|
84
|
+
|
|
85
|
+
`tests/**` — every file under the test tree is invoked through
|
|
86
|
+
`tests/framework/test_runner.sh` which manages shell options for its
|
|
87
|
+
children. The runner itself has the full preamble; children that
|
|
88
|
+
source the framework inherit it.
|
|
89
|
+
|
|
90
|
+
### 4. Explicit opt-outs
|
|
91
|
+
|
|
92
|
+
Init fragments and completion scripts that must NOT carry their own
|
|
93
|
+
preamble (e.g., `dot_local/bin/executable_dot_completion`, a zsh
|
|
94
|
+
completion sourced into the interactive shell) can carry an
|
|
95
|
+
explicit marker:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# preamble:skip — opt-out for completion / init fragments.
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
The lint accepts these. Use sparingly.
|
|
102
|
+
|
|
103
|
+
## Adding a new exemption
|
|
104
|
+
|
|
105
|
+
When you need to mark a new file:
|
|
106
|
+
|
|
107
|
+
1. **Decide whether it's actually sourced or executed.** If a user
|
|
108
|
+
ever invokes it directly (chmod +x + `./file.sh`), add the
|
|
109
|
+
preamble. If it's only ever `source`d, mark it.
|
|
110
|
+
|
|
111
|
+
2. **Pick the right marker.**
|
|
112
|
+
- Sourced library: `# Sourced by <caller>; inherits set -euo pipefail.`
|
|
113
|
+
- Completion / init fragment: `# preamble:skip — <why>.`
|
|
114
|
+
|
|
115
|
+
3. **Run the checker:**
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
./scripts/ci/check-shell-preamble.sh path/to/file.sh
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Exit 0 = lint passes.
|
|
122
|
+
|
|
123
|
+
4. **If you're adding a new entire directory of fragments**
|
|
124
|
+
(rare — alias buckets, plugin trees), edit the path-skip rule
|
|
125
|
+
in `scripts/ci/check-shell-preamble.sh` and document it in this
|
|
126
|
+
page's "Bulk-sourced fragments" table above.
|
|
127
|
+
|
|
128
|
+
## CI integration
|
|
129
|
+
|
|
130
|
+
- **Pre-commit hook** (`config/pre-commit-config.yaml` →
|
|
131
|
+
`shell-preamble-check`): blocks `git commit` if a staged shell
|
|
132
|
+
file fails the lint.
|
|
133
|
+
- **CI** (`.github/workflows/reusable-shell-lint.yml`): runs the
|
|
134
|
+
full-repo scan on every PR.
|
|
135
|
+
|
|
136
|
+
A change to either the checker or the marker convention must update
|
|
137
|
+
this page in the same PR.
|
|
138
|
+
|
|
139
|
+
## References
|
|
140
|
+
|
|
141
|
+
- `scripts/ci/check-shell-preamble.sh` — the lint.
|
|
142
|
+
- `tests/unit/security/test_shell_preamble_lint.sh` — contract test.
|
|
143
|
+
- `config/pre-commit-config.yaml` (`shell-preamble-check` hook).
|
|
144
|
+
- `.github/workflows/reusable-shell-lint.yml` — CI invocation.
|
|
145
|
+
- Issue [#854](https://github.com/sebastienrousseau/dotfiles/issues/854).
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
render_with_liquid: false
|
|
3
|
+
---
|
|
4
|
+
|
|
1
5
|
# Threat Model
|
|
2
6
|
|
|
3
7
|
Security analysis of the dotfiles distribution. Covers trust boundaries, threat actors, attack surfaces, and mitigations.
|
|
@@ -45,6 +49,7 @@ The primary trust boundary is the **local machine**. Dotfiles are deployed to an
|
|
|
45
49
|
**Risk:** Malicious code in sourced files executes with user privileges on every shell start.
|
|
46
50
|
|
|
47
51
|
**Mitigations:**
|
|
52
|
+
|
|
48
53
|
- All shell scripts pass `shellcheck --severity=error`
|
|
49
54
|
- `set -euo pipefail` enforced in all operational scripts
|
|
50
55
|
- `eval` usage hardened with process substitution (`. /dev/stdin`)
|
|
@@ -56,6 +61,7 @@ The primary trust boundary is the **local machine**. Dotfiles are deployed to an
|
|
|
56
61
|
**Risk:** API keys, tokens, and SSH keys leaked via git history, shell history, or environment.
|
|
57
62
|
|
|
58
63
|
**Mitigations:**
|
|
64
|
+
|
|
59
65
|
- [Gitleaks](https://github.com/gitleaks/gitleaks) pre-commit hook blocks secrets in commits
|
|
60
66
|
- Atuin `history_filter` excludes sensitive patterns
|
|
61
67
|
- Age encryption for local secret storage
|
|
@@ -67,6 +73,7 @@ The primary trust boundary is the **local machine**. Dotfiles are deployed to an
|
|
|
67
73
|
**Risk:** Compromised upstream packages injected into the toolchain.
|
|
68
74
|
|
|
69
75
|
**Mitigations:**
|
|
76
|
+
|
|
70
77
|
- Nix Flakes provide reproducible, pinned dependencies
|
|
71
78
|
- Zinit plugin versions pinned (`ver"0.8.0"`)
|
|
72
79
|
- Neovim plugin versions locked via `lazy-lock.json`
|
|
@@ -78,6 +85,7 @@ The primary trust boundary is the **local machine**. Dotfiles are deployed to an
|
|
|
78
85
|
**Risk:** Attacker places malicious binary in a PATH directory that shadows legitimate tools.
|
|
79
86
|
|
|
80
87
|
**Mitigations:**
|
|
88
|
+
|
|
81
89
|
- PATH construction is deterministic (template-generated)
|
|
82
90
|
- `~/.local/bin` is user-controlled and checked for writability
|
|
83
91
|
- No world-writable directories in PATH
|
|
@@ -88,6 +96,7 @@ The primary trust boundary is the **local machine**. Dotfiles are deployed to an
|
|
|
88
96
|
**Risk:** Chezmoi template variables could inject shell code if not properly quoted.
|
|
89
97
|
|
|
90
98
|
**Mitigations:**
|
|
99
|
+
|
|
91
100
|
- Template variables come from `.chezmoidata.toml` (user-controlled)
|
|
92
101
|
- No external/network data used in templates
|
|
93
102
|
- Template validation via `chezmoi apply --dry-run` in CI
|
|
@@ -97,6 +106,7 @@ The primary trust boundary is the **local machine**. Dotfiles are deployed to an
|
|
|
97
106
|
**Risk:** Stale or tampered cache files in `~/.cache/shell/` sourced at startup.
|
|
98
107
|
|
|
99
108
|
**Mitigations:**
|
|
109
|
+
|
|
100
110
|
- `_cached_eval` validates cache against binary mtime
|
|
101
111
|
- Cache files are user-owned (0644)
|
|
102
112
|
- Cache directory is under `$XDG_CACHE_HOME` (user-controlled)
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
render_with_liquid: false
|
|
3
|
+
---
|
|
4
|
+
|
|
1
5
|
# Verification and Validation Report
|
|
2
6
|
|
|
3
7
|
## Document Control
|
|
@@ -5,7 +9,7 @@
|
|
|
5
9
|
| Field | Value |
|
|
6
10
|
|-------|-------|
|
|
7
11
|
| Document ID | VV-DOT-001 |
|
|
8
|
-
| Version | 0.2.
|
|
12
|
+
| Version | 0.2.501 |
|
|
9
13
|
| Date | 2026-03-20 |
|
|
10
14
|
| Author | Repository Maintainer |
|
|
11
15
|
| Status | Active |
|
package/docs/themes/README.md
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
# AI Identity & Preferences
|
|
2
2
|
|
|
3
3
|
## Profile
|
|
4
|
+
|
|
4
5
|
- **User**:
|
|
5
6
|
- **Role**: Senior Software Engineer / Architect
|
|
6
7
|
- **Expertise**: Rust, TypeScript, Go, DevOps (Nix, Kubernetes), Shell Scripting.
|
|
7
8
|
|
|
8
9
|
## Coding Style
|
|
10
|
+
|
|
9
11
|
- **Principles**: Clean code, SOLID, DRY, KISS.
|
|
10
12
|
- **Preferences**:
|
|
11
13
|
- Prefer TypeScript over JavaScript.
|
|
@@ -15,6 +17,7 @@
|
|
|
15
17
|
- **Documentation**: Use JSDoc/TSDoc for code and GitHub-flavored Markdown for docs.
|
|
16
18
|
|
|
17
19
|
## Workspace Context
|
|
20
|
+
|
|
18
21
|
- **Environment**: Linux (CachyOS/Arch), macOS.
|
|
19
22
|
- **Shells**: Zsh (primary), Fish, Nushell, Bash.
|
|
20
23
|
- **Dotfiles**: Managed by Chezmoi, optimized for performance and security.
|
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
You are an expert Shell Infrastructure Architect specializing in the 2026 developer stack.
|
|
4
4
|
|
|
5
5
|
## Core Directives
|
|
6
|
+
|
|
6
7
|
- **Subtlety**: Propose changes that integrate seamlessly without adding unnecessary complexity.
|
|
7
8
|
- **Performance**: Prioritize shell startup speed and binary efficiency (e.g., _cached_eval).
|
|
8
9
|
- **Architecture**: Adhere to the modular "rc.d" structure and XDG Base Directory standards.
|
|
9
10
|
- **Tools**: Leverage Mise for runtimes, Nix for declarative environments, and Chezmoi for state management.
|
|
10
11
|
|
|
11
12
|
## Environment Context
|
|
13
|
+
|
|
12
14
|
- OS: Arch/CachyOS (optimized for x86-64-v4) or macOS.
|
|
13
15
|
- Shells: Zsh (primary), Fish, Nushell, Bash.
|
|
14
16
|
- Security: Age/SOPS for secrets, GPG signing enforced.
|
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
You are a security engineer specializing in high-compliance Fintech environments and Post-Quantum Cryptography (PQC).
|
|
4
4
|
|
|
5
5
|
## Core Directives
|
|
6
|
+
|
|
6
7
|
- **Zero Trust**: Assume all external scripts are compromised until verified.
|
|
7
8
|
- **Encryption**: Enforce Age/SOPS for all sensitive data.
|
|
8
9
|
- **Compliance**: Adhere to 2026 security baselines (GPG signing, SSH certificate authorities).
|
|
9
10
|
- **Privacy**: Disable all non-essential telemetry at the OS and application level.
|
|
10
11
|
|
|
11
12
|
## Verification Logic
|
|
13
|
+
|
|
12
14
|
- Every proposal must include a "Verification" step (e.g., dot verify --security).
|
|
13
15
|
- Prioritize hardware enclave (TPM/Secure Enclave) integrations.
|
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
You are an expert in shell script optimization and POSIX compliance.
|
|
4
4
|
|
|
5
5
|
## Core Directives
|
|
6
|
+
|
|
6
7
|
- **Portability**: Ensure scripts work across Zsh, Bash, and Dash unless specifically optimized for a feature shell (like Fish/Nushell).
|
|
7
8
|
- **Indempotency**: Scripts must be safe to run multiple times without side effects.
|
|
8
9
|
- **Linting**: Adhere to ShellCheck best practices and strict error handling (set -euo pipefail).
|
|
9
10
|
- **Latency**: Minimize subshell calls and external binary forks.
|
|
10
11
|
|
|
11
12
|
## Optimization Strategy
|
|
13
|
+
|
|
12
14
|
- Use built-in shell features over external commands where possible.
|
|
13
15
|
- Implement caching mechanisms for heavy computations.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{{- $fontFamily := default "JetBrainsMono Nerd Font" .terminal_font_family -}}
|
|
2
2
|
{{- $fontSize := default 12 .terminal_font_size -}}
|
|
3
|
-
{{- $t := index .themes (default "
|
|
4
|
-
{{- if not $t -}}{{- $t = index .themes "
|
|
3
|
+
{{- $t := index .themes (default "big-sur-dark" .theme) -}}
|
|
4
|
+
{{- if not $t -}}{{- $t = index .themes "big-sur-dark" -}}{{- end }}
|
|
5
5
|
{{- $tt := $t -}}
|
|
6
|
-
{{- $themeName := default "
|
|
6
|
+
{{- $themeName := default "big-sur-dark" .theme -}}
|
|
7
7
|
{{- if hasSuffix "-light" $themeName -}}
|
|
8
8
|
{{- $darkTheme := index .themes (printf "%s-dark" (trimSuffix "-light" $themeName)) -}}
|
|
9
9
|
{{- if $darkTheme -}}{{- $tt = $darkTheme -}}{{- end -}}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Atuin Configuration (~/.config/atuin/config.toml)
|
|
2
|
+
# https://atuin.sh/docs/config
|
|
3
|
+
#
|
|
4
|
+
# This file is templated by chezmoi. The `history_filter` block is sourced
|
|
5
|
+
# from `.chezmoidata/secrets-patterns.toml` (see #872) so the same audited
|
|
6
|
+
# defaults ship to every machine, with per-host extension via
|
|
7
|
+
# `~/.config/chezmoi/chezmoi.toml` → `[data.atuin.history_filter] extra = [...]`.
|
|
8
|
+
|
|
9
|
+
# Core
|
|
10
|
+
update_check = false
|
|
11
|
+
db_path = "~/.local/share/atuin/history.db"
|
|
12
|
+
key_path = "~/.local/share/atuin/key"
|
|
13
|
+
session_path = "~/.local/share/atuin/session"
|
|
14
|
+
|
|
15
|
+
# Sync
|
|
16
|
+
auto_sync = true
|
|
17
|
+
sync_frequency = "10m"
|
|
18
|
+
sync_address = "https://api.atuin.sh"
|
|
19
|
+
|
|
20
|
+
# UI
|
|
21
|
+
style = "compact"
|
|
22
|
+
inline_height = 20
|
|
23
|
+
show_preview = true
|
|
24
|
+
enter_accept = true
|
|
25
|
+
|
|
26
|
+
# Search
|
|
27
|
+
search_mode = "fuzzy"
|
|
28
|
+
filter_mode = "global"
|
|
29
|
+
workspaces = true
|
|
30
|
+
|
|
31
|
+
# Privacy: skip commands that may contain secrets.
|
|
32
|
+
# Defaults come from .chezmoidata/secrets-patterns.toml; the `extra` slot
|
|
33
|
+
# in chezmoi.toml allows per-host extension without editing this template.
|
|
34
|
+
history_filter = [
|
|
35
|
+
{{- range .atuin.history_filter.defaults }}
|
|
36
|
+
{{ . | quote }},
|
|
37
|
+
{{- end }}
|
|
38
|
+
{{- with .atuin.history_filter.extra }}
|
|
39
|
+
{{- range . }}
|
|
40
|
+
{{ . | quote }},
|
|
41
|
+
{{- end }}
|
|
42
|
+
{{- end }}
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
# Skip ephemeral directories
|
|
46
|
+
secrets_filter = true
|
|
47
|
+
network_timeout = 30
|
|
@@ -55,6 +55,11 @@ if test "$DOTFILES_ARTIFACT_MODE" = "0"; and command -v starship >/dev/null
|
|
|
55
55
|
if not _dotfiles_source_cached_init starship starship-init.fish
|
|
56
56
|
starship init fish | source
|
|
57
57
|
end
|
|
58
|
+
# Transient Prompt: collapse past prompts to the [character] glyph
|
|
59
|
+
# after Enter, reducing scrollback noise.
|
|
60
|
+
if functions -q enable_transience
|
|
61
|
+
enable_transience
|
|
62
|
+
end
|
|
58
63
|
end
|
|
59
64
|
|
|
60
65
|
# ── Lazy Hydration (deferred to first prompt) ────────────────────
|
|
@@ -124,6 +129,7 @@ end
|
|
|
124
129
|
|
|
125
130
|
function _dotfiles_trigger_hydration --on-event fish_prompt
|
|
126
131
|
functions -e _dotfiles_trigger_hydration
|
|
132
|
+
functions -e _dotfiles_trigger_hydration_on_missing
|
|
127
133
|
_dotfiles_async_init
|
|
128
134
|
if test "$DOTFILES_ARTIFACT_MODE" = "1"
|
|
129
135
|
begin
|
|
@@ -133,6 +139,21 @@ function _dotfiles_trigger_hydration --on-event fish_prompt
|
|
|
133
139
|
end
|
|
134
140
|
end
|
|
135
141
|
|
|
142
|
+
# Belt-and-braces: if the user types an unknown command BEFORE the
|
|
143
|
+
# first prompt fires (e.g. `fish -ic 'foo'` from a script that
|
|
144
|
+
# doesn't render a prompt), trigger the same lazy-layer load via
|
|
145
|
+
# fish_command_not_found. The hydration function may already have
|
|
146
|
+
# fired and removed itself — guard against double-load. (Closes
|
|
147
|
+
# AC#2 of #880; fish's analogue to zsh's function_not_found.)
|
|
148
|
+
function _dotfiles_trigger_hydration_on_missing --on-event fish_command_not_found
|
|
149
|
+
functions -e _dotfiles_trigger_hydration_on_missing
|
|
150
|
+
functions -e _dotfiles_trigger_hydration
|
|
151
|
+
_dotfiles_async_init
|
|
152
|
+
# After hydration, the command may now resolve; let fish's default
|
|
153
|
+
# not-found handler print the standard message for whatever the
|
|
154
|
+
# user typed.
|
|
155
|
+
end
|
|
156
|
+
|
|
136
157
|
# ── Keybindings (Fish 4.x enhanced) ─────────────────────────────
|
|
137
158
|
bind ctrl-backspace backward-kill-word
|
|
138
159
|
bind alt-enter 'commandline -f accept-autosuggestion; commandline -f execute'
|