Skip to content

chore(scaffold): justfile audit — complete devc-* namespacing, reachable worktree recipes, de-stale'd compose docs - #809

Merged
c-vigo merged 7 commits into
devfrom
chore/806-justfile-audit
Jul 3, 2026
Merged

c-vigo merged 7 commits into
devfrom
chore/806-justfile-audit

Conversation

@c-vigo

@c-vigo c-vigo commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Audit of the scaffold justfiles for compose-era leftovers post-#799/#795, per #806. The audit confirmed the repo-root justfiles are clean and the docker-compose.project.yaml/local.yaml layering is an intentional #799 survivor; four findings were actionable and are fixed here:

  • Namespacing completed: check → devc-check, devcontainer-upgrade → devc-upgrade in the managed justfile.devc (recipes, hint strings, version-check.sh notification text, and exact-string test assertions), freeing the generic check name for project use.
  • Worktree recipes were unreachable in consumers: the scaffold ships .devcontainer/justfile.worktree and .claude skills that invoke just worktree-start, but the root justfile never imported it. Now imported via import? (direnv-mode safe; verified a git-less scaffold copy still parses — just backtick vars are lazy).
  • Dead workflow documented: the shipped .devcontainer/README.md instructed cp docker-compose.override.yml.example … — a file that hasn't shipped for a long time. Rewritten to the real project/local layering.
  • Small cleanups: dropped a vacuous tests/test_image.py assertion on a docker-compose.local.yml (.yml) spelling nothing ships; aligned the dev-env ADR's illustrative services verb with the shipped just services; restored the [CHORE] Adopt git-hooks.nix with package = pkgs.prek (supersedes #40) #778 prek changelog entry header that feat(flake): mkProjectServices — daemonless local dev services (process-compose + services-flake) #807's changelog edit accidentally replaced (its sub-bullets were orphaned under the feat(flake): mkProjectServices — process-compose + services-flake helper for local dev services #795 rename entry).

Verification

  • bats tests/bats/init-workspace.bats tests/bats/just.bats tests/bats/worktree-claude-cli.bats — 99 ok (includes new red-first [CHORE] Audit scaffold justfile recipes for compose-era leftovers post-#799/#795 #806 guards: devc-check/devc-upgrade present + bare names absent, worktree import present, README documents live layering and not the override workflow)
  • Manual: full scaffold copy parses and just --list shows the [worktree] group; direnv-mode load guard stays green
  • prek run --all-files — full suite green
  • The renamed-recipe integration tests (test_integration.py) run in CI's container lanes

Closes #806
Refs #795, #799

c-vigo added 6 commits July 3, 2026 14:17
…evc-upgrade

Completes the devc-* namespacing started in #795: the two remaining
devcontainer-management verbs free the generic 'check' name for project
use. Hint strings in the recipes and version-check.sh notifications, and
the exact-string test assertions, follow.

Refs: #806
…ering

The scaffold shipped .devcontainer/justfile.worktree plus .claude skills
invoking 'just worktree-start', but the root justfile never imported it,
so the worktree recipes were unreachable in consumer repos. Import it
(import?, direnv-mode safe; backtick vars are lazy so a git-less parse
still succeeds). The shipped .devcontainer/README.md also documented the
long-removed docker-compose.override.yml(.example) workflow; it now
describes the real project/local compose layering kept by #799.

Refs: #806
…rb prose

tests/test_image.py asserted absence of docker-compose.local.yml (.yml)
— a spelling nothing ships, so the check was vacuous; the shipped .yaml
template is already covered by expected_files. The ADR's illustrative
'just up' verb is updated to the 'just services' recipe #795 shipped.

Refs: #806
…eader

Adds the Changed note (devc-check/devc-upgrade completing the #795
namespacing) and the Fixed entry (worktree recipes reachable, compose
README de-stale'd, vacuous test assertion dropped). Also restores the
'Git-hook runner migrated to prek' (#778) entry header that the #795
changelog edit in PR #807 accidentally replaced, orphaning its
sub-bullets under the rename entry. Mirror synced.

Refs: #806
pymarkdown normalizes the scaffold README's ordered-list numbering and
ruff-format restyles a multi-line assertion whose width changed with the
devc-upgrade rename.

Refs: #806
@c-vigo
c-vigo enabled auto-merge July 3, 2026 12:29
… tests

The #806 rename swept string literals ('just check', 'just',
'check' argv), but two structural scans used line.startswith('check ')
to locate the recipe line and silently found nothing — caught by the CI
container lane (these tests skip without the image locally).

Refs: #806
@c-vigo
c-vigo merged commit 746b88a into dev Jul 3, 2026
13 checks passed
@c-vigo
c-vigo deleted the chore/806-justfile-audit branch July 3, 2026 12:51
c-vigo added a commit that referenced this pull request Jul 4, 2026
…lback docs, changelog framing (#808)

## Summary

Pre-release readiness batch for the 0.4.0 Nix publish-cutover (#639).
Grew from docs/trigger work into the full vulnix-gate hardening after
the first-ever dispatched scan exposed real defects.

**Cutover readiness (original scope):**
- **`workflow_dispatch` on `security-scan.yml`** — scheduled runs
execute from the default branch (`main`, still the Debian-era scan), so
the vulnix nightly had never run; manual dispatch provides the #639
go/no-go evidence.
- **Consumer comms in `docs/MIGRATION.md`** — rollback story (final
Debian release is 0.3.9; pin `DEVCONTAINER_VERSION=0.3.9` in `.vig-os`)
and the `devcontainer` → `devkit` rename heads-up (#781).
- **CHANGELOG cutover framing** — `## Unreleased` leads with the cutover
as a BREAKING consumer change; Security entry documents the scan
hardening + CVE triage.
- **Stale `Containerfile` comment** in the scaffold compose fixed (#642
remnant).

**vulnix gate hardening (found by dispatching the scan; NVD was
mid-incident, nix-community/vulnix#171):**
- Scan step made errexit-safe: vulnix's documented exit 2 ("advisories
found") killed the step under the runner's default `bash -e {0}` before
findings ever reached the gate.
- Crash-vs-findings disambiguation: a vulnix NVD-timeout crash exits 1
(same as "whitelisted findings"); the step now accepts a run only when
the findings JSON validates, and retries throttled fetches 3× with
backoff (ETag-resuming).
- Weekly-keyed `actions/cache` of the NVD database: warm runs fetch only
the ~3 MB `modified` feed (this cut the scan from ~25 min of fetch
roulette to ~4 min).
- `packages.vulnix` patches upstream's hardcoded 10 s NVD fetch timeout
to 60 s.
- Findings artifact uploads `if: always()` so a red gate keeps its
triage evidence.

**CVE triage (2026-07 batch):**
- 8 new HIGH/CRITICAL findings (libssh2 ×2, socat, libxml2, gzip, fzf
×2, jq) triaged online against NVD/CERT.PL/GHSA + upstream + nixpkgs
branch state; accepted into `.vulnixignore` with per-entry rationale and
staggered 30–60-day expiries. None fixable by rev advance today; none
realistically exploitable in a single-user interactive dev container.

Also merges `origin/dev` (post-#809).

## Verification

- **Green end-to-end scan run** (dispatch on this branch):
https://github.com/vig-os/devcontainer/actions/runs/28698572494 — vulnix
gate passes with 35 validated exceptions, SBOM + Trivy awareness scan
green, 8.5 min total.
- `uv run vulnix-gate <findings> --register .vulnixignore` green locally
against the CI findings artifact; `check-expirations` validates the
register.
- Patched vulnix verified locally: built store path carries `timeout=60`
in `nvd.py`.
- `prek run --all-files` green.

Refs #639, #642, #781.
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