Releases: garagon/nanostack
v0.7.0
Third security round of the day. The guard shifts from "Bash-only, allowlist-first" to an authoritative layer: block rules run before the allowlist, and a new hook covers Write, Edit, and MultiEdit. Four PRs (#139, #140, #141, #142) closed all seven findings from the round 3 audit.
Guard becomes authoritative
- Block before allowlist. Binaries on the allowlist (
find,cat,head,tail) no longer short-circuit past block rules.find . -delete,find . -exec rm -rf {} +,cat .env,head .env,tail secrets.pemnow return exit 1 with the matching block rule. G-005, G-006, G-030 are effective again. - Write and Edit covered. New
guard/bin/check-write.shPreToolUse hook. Denies secrets by basename (.envand variants,*.pem,*.key,*.p12,*.pfx, SSH keys includingid_rsa/id_ed25519/authorized_keys, shell history) and by path prefix (/etc,/var,/usr/bin,/usr/sbin,/usr/lib,/System,/private/etc,~/.ssh,~/.gnupg,~/.aws,~/.gcp,~/.config/gcloud,~/.kube). - Fresh installs wire both hooks.
init-project.shwrites ahooks.PreToolUseblock alongside permissions, with matchers forBash(check-dangerous.sh) andWrite|Edit|MultiEdit(check-write.sh). Existing installs are not modified; manual wire-up is inSECURITY.md. git push --force-with-leasepasses. G-007 tightened fromgit push --forcetogit push.*--force([[:space:]]|$)so the guard's own recommended alternative stops tripping the block.
/nano-doctor reports the full model
Five rows across permissions and hook presence:
rm_scope,write_scope,allowlist_scope— cross-reference the relevant hook.bash_guard,write_guard— report hook presence directly.
A broad Write(*) with the hook wired now reads as pass with a note that the hook covers secrets and system paths. Without the hook it warns with concrete remediation pointing at SECURITY.md.
CI coverage
- Guard regression matrix expanded from 12 to 21 cases. New cases cover the allowlist-bypass class (
find . -delete,cat .env, etc.) plus the--force-with-leasepositive. - New
write-guard-regressionjob: 19 cases plus two JSON-on-stdin contract checks so a Claude Code protocol drift surfaces on every PR.
Portability and integrity
feature/bin/enforce-sprint.shuses BSD stat with a GNU stat fallback, mirroring the pattern inguard/bin/phase-gate.sh. Gates run on Linux agents, not just macOS.bin/resolve.shpasses--verifytofind-artifact.sh. Tampered artifacts no longer feed downstream phases (gates, review context, conflict precedence).
Compatibility
No breaking changes to the wire telemetry schema. Existing .claude/settings.json files are not modified. The Write/Edit hook is only wired automatically for fresh installs; existing installs opt in via the copy-paste block in SECURITY.md.
Install
npx create-nanostackRun /nano-doctor in your project to see the honest state of your permission and hook surface.
Full diff
v0.6.0
Six weeks of work since the v0.1.0 baseline. This is the first tag since the VERSION file was introduced, and it reflects the features, skills, and hardening that landed along the way.
New surface
/nano-doctor— install health-check skill. Ten checks across deps, install integrity, home directory permissions, telemetry config, pre-V5 detection, and Worker reachability. Exit code maps to severity: 0 healthy, 1 warnings, 2 critical. Flags:--json,--offline,--fix.- Observational feedback in
/think— optional## What I noticedblock when a coaching pattern fires (jump-to-solution, scope drift, strong pain observation, surprising synthesis). Silence beats a forced observation. Target firing rate under 30% of sessions. observational_firedv1 telemetry field — measures firing rate of the feedback block without any content leaving the machine. Additive, nullable; only/thinksets it.NANOSTACK_DEBUG=1— surfaces the pre-V5 detection decision (marker-present, pre-V5, or fresh-install) so future silent bugs surface on first run.- Latent-vs-deterministic reference — linked from
/think(Phase 4 Premise Challenge) and/nano(Architecture Checkpoint). Names when to trust the model versus when to build infrastructure.
Internal security round (all findings closed)
- Guard block rules run before the in-project shortcut so recursive operations that resolve inside the repo cannot bypass.
setup--renameinput validated via strict regex pluspath_is_underguard before anyrm.- Audit log records built via
jq -cn --argso quoted, backslashed, or newline-laden fields cannot inject extra keys. - Session lock records owner PID and uses
kill -0to tell stale from live; fails closed at 30s. - Wrangler bumped from 3.60 to 4.85;
bun auditwent from 6 vulnerabilities to 0. - Guard audit trail lands in
.nanostack/audit.logregardless ofNANOSTACK_STOREstate. - CI adds
bun install --frozen-lockfile,bun audit,tsc --noEmit, and a 12-case guard regression matrix. - Default
rmscope narrowed to.nanostack/**and/tmp/**. Existing installs untouched;/nano-doctorsurfaces broad legacy entries with an opt-in migration path. - Permission model documented in
SECURITY.md.
Compatibility
No breaking changes to the wire telemetry schema. observational_fired is additive and nullable. Existing opt-in installations continue to send events that pass Worker validation.
init-project.sh never removes entries from an existing .claude/settings.json; pre-v0.6 installs keep whatever they had and can migrate on their own timeline.
Install
npx create-nanostackSee README for the full set of skills and TROUBLESHOOTING.md if you hit anything.