Commit Graph

16 Commits

Author SHA1 Message Date
50ff598684 refactor(notstrap): replace EnvInjector with SecretResolver
Some checks failed
Public Repo Readiness / Check Public Repo Readiness (push) Has been cancelled
Remove the EnvInjector closure and replace with a secrets_config path
that loads notsecrets.toml and uses SecretResolver for env injection.
Existing parse_env_line validation (blocked keys, null bytes) is
preserved in the injection loop.
2026-06-06 09:57:20 -04:00
Joseph O'Brien
c7c074d48b feat: add notnet crate and YubikeySource, thread Tailscale into notstrap
- New crates/notnet: TailscaleOptions, ensure_connected(), auth key chain
  (TS_AUTHKEY env → YubiKey PIV 9d → interactive prompt), install via
  apt/brew/pacman or official install.sh, peer reachability verification
- notsecrets: YubikeySource implementing IdentitySource, reads age key from
  PIV slot 9c; gated behind optional `yubikey` feature
- notstrap: Tailscale step inserted between prerequisites and clone;
  BootstrapOptions.tailscale controls override/skip; NotstrapConfig gains
  optional [tailscale] section; dotfiles_repo is now Option<String> (Tailscale
  gitea_url takes precedence); identity chain adds YubikeySource before
  Bitwarden
- Updated workspace Cargo.toml: notnet added to members and workspace deps
- Integration tests: tailscale: Some(None) to skip Tailscale in all test opts
2026-04-17 00:01:50 -04:00
Joseph O'Brien
67f20eef2d Refactor: Formalize ports and update related files 2026-04-15 21:27:25 -04:00
Joseph O'Brien
19e74b4a1b security: audit Command call sites; confirm no argument injection
Closes #18

All six Command::new call sites audited:
- bitwarden.rs (sh -c): shell string is a hardcoded literal; no user data.
- bitwarden.rs (bw unlock): all args hardcoded.
- bitwarden.rs (bw get): item_name and session passed as discrete .args() elements; no shell.
- nothooks/runner.rs (nu/sh/etc): interp and script path passed as discrete args; no shell.
- notstrap/repo.rs (git clone): url and dest passed as discrete .arg() calls; no shell.
- notfiles/tests/integration.rs: test harness with hardcoded args only.

Added SAFETY comments on the three sites that handle user-controlled config values.
2026-04-11 23:52:40 -04:00
Joseph O'Brien
83008c5353 fix(notstrap): wire age identity to decryption; fix parse_env_line quoting
Closes #14, closes #16
2026-04-11 23:40:47 -04:00
Joseph O'Brien
3e7135a398 fix(notfiles): save state on partial link failure; skip re-copy of unchanged files
Closes #8, closes #9
2026-04-11 23:40:32 -04:00
Joseph O'Brien
b5a27108d0 feat(notgraph): heatmap coloring, symbol counts, per-crate module graphs, cycle callouts 2026-04-02 20:53:07 -04:00
Joseph O'Brien
58de007e19 feat(notstrap): migrate to notsecrets age-native API, remove sops shell-out
Replace AgeKeySource/resolve_age_key/install_age_key with IdentitySource/resolve_identities.
Update integration tests to use a valid age bech32 key fixture.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 21:19:23 -04:00
Joseph O'Brien
b4cba74ea3 docs: update HANDOFF.md — age-native redesign progress (tasks 1–7 complete) 2026-04-01 20:58:09 -04:00
Joseph O'Brien
55d68ee92f fix: address security findings from devkit-review (#1–#7)
notsecrets:
- install_age_key_at: create key file with mode 0600 via OpenOptions,
  eliminating TOCTOU window where file was transiently world-readable (#3)
- sops_args: extract arg-builder and add -- separator before path,
  preventing leading-dash flag injection (#2)
- use .context() instead of .with_context(closure) for string literal (#7)

notstrap:
- extract parse_env_line: validates env lines before set_var — rejects
  null bytes (#4) and blocks dangerous keys (LD_PRELOAD, PATH, etc.) (#5)
- wire parse_env_line into injection loop; errors abort the step cleanly
- correct SAFETY comment: documents single-threaded invariant and notes
  that subsequent spawns inherit injected env (#6)

Tests: 12 new tests covering all fixes; workspace grows from 44 to 56 passing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 15:00:47 -04:00
Joseph O'Brien
403bcc4436 fix: address blocking sentinel findings (unsafe SAFETY comment, unwrap panics)
Some checks failed
Public Repo Readiness / Check Public Repo Readiness (push) Failing after 4s
2026-04-01 08:59:28 -04:00
Joseph O'Brien
748a0d8634 fix(notstrap): fix clippy warning and unwrap panics in lib extraction 2026-04-01 05:00:26 -04:00
Joseph O'Brien
1545a913c5 refactor(notstrap): extract run() into lib with BootstrapOptions 2026-04-01 04:57:32 -04:00
Joseph O'Brien
0ff89234e8 chore: add dual MIT/Apache-2.0 license, update Cargo.toml and README
Some checks failed
Public Repo Readiness / Check Public Repo Readiness (push) Failing after 4s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-31 22:00:10 -04:00
Joseph O'Brien
4025ed037b feat(notstrap): add new-machine bootstrap orchestrator 2026-03-31 17:29:08 -04:00
Joseph O'Brien
6b0bd3beb6 feat(notcore): add shared types, config, paths, error crate
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-31 17:17:35 -04:00