Skip to content

Install the secure-code-audit toolchain by default, pre-flight per run - #12

Merged
gurnben merged 1 commit into
mainfrom
feat/default-toolchain
Oct 21, 2026
Merged

gurnben merged 1 commit into
mainfrom
feat/default-toolchain

Conversation

@gurnben

@gurnben gurnben commented Oct 21, 2026

Copy link
Copy Markdown
Member

Summary

The init wizard asked users to pick a scanner toolchain profile before they could know what they would run — and the answer is deterministic anyway: the secure-code-audit profile's toolset is a superset of the vuln-scan and triage profiles, so one profile covers every stage of every flow (audit and verify use its scanners; triage and patch need nothing beyond it).

  • init installs secure-code-audit by default — the wizard question is gone; --toolchain none remains the explicit opt-out; already-installed profiles are skipped so re-init stays fast.
  • Per-run pre-flight: every run (and therefore every flow stage) whose skill has a toolchain profile gets a cheap admin toolchain doctor check; an incomplete profile surfaces as a non-fatal warning naming the profile, the coverage cost ("the skill will run with reduced scanner coverage"), and the fix (traust-cli init). Degraded audits now say why they're degraded instead of silently producing thinner evidence.
  • The skill→profile mapping ships in the standalone profile (toolchain: field), alongside the existing role/min-model data.
  • Bonus fix: run ids widened to a 6-hex random suffix — the 4-hex suffix collided ~8% of the time once a dozen runs shared a second (surfaced by the uniqueness test going flaky under repeated CI runs), and a collision meant a shared run directory.

Verification

  • Live against the real workspace: the pre-flight fired on its incomplete profile (6 missing tools), and the default install brought 7 of 8 tools healthy — one version-pinned govulncheck upgrade remains operator-side (go install golang.org/x/vuln/cmd/govulncheck@latest).
  • Tests: the warning path (fires, names the fix, non-fatal), the clean path (no warning), and id uniqueness across repeated suites.
  • Full suite ×3 with race detector, vet, staticcheck clean.

💘 Generated with Crush

The init wizard asked users to pick a scanner toolchain profile before
they could know what they would run, and the answer is deterministic
anyway: the secure-code-audit profile's toolset is a superset of the
vuln-scan and triage profiles, so one profile covers every stage of
every flow (audit and verify use its scanners; triage and patch need
nothing beyond it).

init now installs it by default — the wizard question is gone, and
--toolchain none remains the explicit opt-out. Already-installed
profiles are skipped so re-running init stays fast and idempotent.

With the profile guaranteed by default, runs can hold it to account:
every run (and therefore every flow stage) whose skill has a toolchain
profile gets a cheap admin-toolchain-doctor pre-flight, and an
incomplete profile surfaces as a non-fatal warning naming the profile,
the coverage cost, and the fix — a degraded audit now says why it is
degraded instead of silently producing thinner evidence.

Also: run ids widened to a 6-hex random suffix — the 4-hex suffix
collided ~8% of the time once a dozen runs shared a second (found by
the uniqueness test going flaky in CI-race runs), and a collision
meant a shared run directory.

Verified live against the real workspace: the pre-flight fired on its
incomplete profile, and the default install brought seven of eight
tools healthy (one version-pinned upgrade left to the operator).
Tests cover the warning path (non-fatal, names the fix), the clean
path, and id uniqueness across repeated suites.

💘 Generated with Crush

Assisted-by: Crush:rits/zai-org/glm-5-3
@gurnben
gurnben requested a review from a team as a code owner October 21, 2026 18:57
@gurnben
gurnben merged commit 2085a58 into main Oct 21, 2026
2 checks passed
@gurnben
gurnben deleted the feat/default-toolchain branch October 21, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant