Skip to content

fix(scaffold): render managed docs from manifest settings - #1911

Merged
gerchowl merged 5 commits into
devfrom
bugfix/1910-feature-aware-security-commit-docs
Oct 27, 2026
Merged

gerchowl merged 5 commits into
devfrom
bugfix/1910-feature-aware-security-commit-docs

Conversation

@gerchowl

@gerchowl gerchowl commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Description

Fixes #1910. Managed SECURITY.md and docs/COMMIT_MESSAGE_STANDARD.md describe the consumer manifest after scaffolding and upgrades. Disabling scanning removes CodeQL/Scorecard promises and accepted findings; disabling Renovate removes its monitoring claim. Refs wording and exemptions use the same resolved list as the validators, including explicit-list precedence and custom types.

Changes

  • Preserve default document bytes and the issue-less branch rule for exempt types.
  • Remove the optional-Refs cross-reference when every type requires Refs; retain inline code formatting in rendered bullets.
  • Fail explicitly before splicing when either Exemptions anchor is missing or invalid.
  • Document managed rendering in the migration feature/key reference; add ADR metadata, feature audit, and rejected alternatives.
  • Keep both files managed with normal Scaffold Drift verification.

Validation

Commands run in nix develop.

  • Review regression tests committed first (db73be2a): 28 failed, 2 passed before implementation.
  • Isolated origin/dev snapshot with the expanded manifest matrix: 27 failed, 1 passed. test_managed_docs_follow_manifest is the wording regression test.
  • Current branch: all 28 scanning × Renovate × Refs-policy/type combinations pass; default bytes are checked.
  • Missing-anchor tests cover each anchor and ensure failure leaves the document unchanged.
  • The inox/default drift integration test verifies a clean scaffold passes and a hand edit fails. It also passes on origin/dev; it is integration coverage, not the wording regression test.
  • uv run pytest -q tests/test_scaffold_drift.py tests/test_ci_runner.py tests/test_transforms.py tests/test_vig_os_manifest.py: 245 passed.
  • bats -j 8 tests/bats/init-workspace.bats: 337 passed.
  • just sync-workspace, file-scoped prek, and git diff --check: passed.

The initial combined Python run passed 244 cases and hit one rsync exit 23 while template synchronization overlapped it; rerun after synchronization is recorded above.

Changelog

The #1910 Unreleased entry and its managed mirror now include the independent Renovate rendering behavior.

CI outside this change

PR #1912 remains open and addresses the expired security exceptions already present on origin/dev. The prior PR run has red Project Lint and Python Security Scan jobs for those exceptions. Project Flake Gates also failed its pre-commit derivation before this review round; the published log tail does not identify its failing hook, so its cause remains unconfirmed. Test Summary aggregates these failures. No security exception dates were changed here.

No release cut; consumers receive the change by upgrading their devkit pin and re-scaffolding.

Refs: #1910

@gerchowl

Copy link
Copy Markdown
Contributor Author

Round 3 (64b6187): fixed nits 2 and 4 plus the chore reason in custom modes; ADR corrected for dependency review. Follow-ups filed: #1913 (SECURITY.md dependency-review wording for private repos, e.g. nerdmachines/inox) and #1914 (approved-types table for custom DEVKIT_COMMIT_TYPES).

gerchowl added a commit that referenced this pull request Oct 26, 2026
Expired `.vulnixignore` entries stop nightly scanning before it produces
findings and fail PR expiry checks. Reconcile the register against
locally rebuilt closures and ship the available dependency fixes.

Closes #1847
Refs #1853, #1895, #1896, #1565

- Advance stable nixpkgs `cf5e7650` → `1f607aa7`, unstable `419fe0f4` →
`674a2028`, and its paired Home Manager input using the weekly update
workflows' commands. Stable alone leaves OpenSSL 3.6.4 via `claude-code
→ socat`; advancing unstable removes that vulnerable closure too.
- Delete **CVE-2025-59777 and CVE-2025-62689**: libmicrohttpd 1.0.2 →
1.0.10, both absent from the final scan.
- Delete **CVE-2026-81642, CVE-2026-82717 and CVE-2026-81634**:
libunbound 1.26.0 → 1.26.1, all three absent from the final scan.
- Re-verify the six glibc exceptions as **patched-in-nixpkgs**, with
links to the applied aggregate patch and each upstream fix. The original
pin already contained these fixes; the previous rationale claiming no
fix was available was stale. The additional unstable glibc 2.44 match
for CVE-2026-5435 is fixed in the locked source tarball (NEWS BZ 34033;
TSIG handler removed). Review on Wednesday **2026-11-25**. Every
retained register entry still matches the final findings, and every
expiry is a Wednesday.
- Align the existing image-test uv prefix with the updated unstable
input (0.12 → 0.13; pinned binary reports 0.13.4).
- Update the Unreleased security changelog and its required scaffold
copy. This is configuration and register documentation; TDD does not
apply.

### Evidence and root causes

The latest nightly run
[40181159867](https://github.com/vig-os/devkit/actions/runs/40181159867)
has no findings artifact: both lanes fail at **Validate .vulnixignore
exception expirations**, matching #1895/#1896. Therefore scans were run
locally with the workflow's target, scanner, NVD mirror and gate.
Baseline: 18 package records / 58 unique CVEs; final: 14 records / 32
unique CVEs, **26 removed / 0 added**. Five removed CVEs had register
entries, listed above. The four unexcepted OpenSSL findings
(CVE-2026-54873, CVE-2026-72897, CVE-2026-84782, CVE-2026-84784) also
disappear. This addresses the current findings behind #1853; a passing
scheduled nightly is still needed before closing #1895.

[PR #1911
CI](https://github.com/vig-os/devkit/actions/runs/40213239074): Python
Security Scan explicitly fails on the same eight expired entries;
Project Lint does too. Flake Gates fails building
`checks.x86_64-linux.pre-commit`. Reproduced this against an archive of
unmodified `dev` (`b26f40c4`): **exit 1**, with `check-expirations` as
the failing hook and the same eight expired entries. The corrected local
Nix pre-commit check passes (**0**). Both failures are therefore
pre-existing on `dev`, independent of #1911. No #1910/#1911
implementation was changed.

`main` is unchanged by this dev-targeted PR. It receives the dependency
pin advances and reconciled register through the next release train from
`dev`. For an earlier register repair of #1846, use the [release-neutral
lane](https://github.com/vig-os/devkit/blob/dev/docs/RELEASE_CYCLE.md#release-neutral-lane-changing-main-without-a-release):
review against `main`'s own closure, carry only applicable
renewals/additions and their changelog entry, and require its nightly
gate to pass. Never mirror the five dev deletions onto the older main
closure without independent clearance evidence. No main/dev push, merge,
or release is performed here.

Tracking status (verified 2026-10-26): **#1853 OPEN** — the four
unexcepted OpenSSL findings disappear locally; close only after a later
scheduled dev scan passes the gate. **#1895 OPEN** — this PR repairs
dev's expiry failure; close only after a later scheduled dev scan
completes. **#1896 OPEN** and **#1846 OPEN** — main still requires its
own register reconciliation or the next release train; this PR's local
dev results do not clear main.

### Validation

- `nix build .#devkitImageEnv --out-link /tmp/devkit-1847-final-closure
--max-jobs 8 --print-build-logs`: **0**; baseline and intermediate
stable-only builds also **0**.
- `nix run .#vulnix -- --mirror https://vig-os.github.io/nvd-mirror/
--closure /tmp/devkit-1847-final-closure --json >
/tmp/devkit-1847-final-findings.json`: **2** (valid findings JSON;
scanner exit 2 means findings). The same scan against the original
`./result` closure also returned **2**.
- `PYTHONPATH=packages/vig-utils/src python3 -m vig_utils.vulnix_gate
/tmp/devkit-1847-final-findings.json`: **0**; the gate against
`/tmp/devkit-1847-findings.json` (baseline) returned **1**.
- `PYTHONPATH=packages/vig-utils/src python3 -m
vig_utils.check_expirations .trivyignore .vulnixignore
.github/dependency-review-allow.txt`: baseline **1**; final **0** (13
entries).
- `nix build .#checks.x86_64-linux.pre-commit --no-link --max-jobs 8`:
**0**.
- `nix flake check --max-jobs 8 --print-build-logs`: **0** (all local
x86_64-linux checks).
- `git diff --check`: **0**; explicit weekday assertions: **0**.

Tooling: the host commit hook initially failed with `Failed to run
pymarkdown -c .pymarkdown fix: No such file or directory (os error 2)`;
use the Nix dev shell. An impure `getFlake` check invocation included
the worktree Git pointer and failed in treefmt; use the standard flake
command. watcher-s1 reports `System One unavailable ... timeout` /
`breaker open` but preserves process exit codes.

The first complete hosted run
[40245233416](https://github.com/vig-os/devkit/actions/runs/40245233416)
passed every job except Image Tests (and its dependent summary): the
test expected uv 0.12 but the security pin advance ships 0.13.4. The
prefix assertion is updated to 0.13 and verified against the built
closure; the final run passes this assertion and all other checks.

Prior reviewed head: `3552a53a5fd3c24b6cb8ba37445e97ed1a7d34d8`. **All
18 checks pass**, including [CI run
40245850259](https://github.com/vig-os/devkit/actions/runs/40245850259),
CodeQL and both Home Matrix platforms. `gh pr checks 1912 -R
vig-os/devkit --watch --interval 20` exited **0**. No red jobs remain.

### Round 2: reproducible closure and source evidence

Head `4d5f27e5` adds only hash-verified source evidence to the register
(documentation only; TDD does not apply). Image inputs match `3552a53a`.
Both reviewed closures were rebuilt successfully on 2026-10-26:

| Scan | Exact flake ref | Resulting store path |
| --- | --- | --- |
| Before (`origin/dev`) |
`github:vig-os/devkit/b26f40c49867964079af6001ed69a212bd187795#devkitImageEnv`
| `/nix/store/g6an04ag44hv793mlr14xh2bf23d35g8-devcontainer-image-env` |
| After (PR head) | `github:vig-os/devkit/4d5f27e5#devkitImageEnv` |
`/nix/store/ylja3bm8nnr71qkgymvsyisxww8hzhjv-devcontainer-image-env` |

Build command: `nix build <flake-ref> --out-link
/tmp/devkit-1847-r2/<before|after> --max-jobs 8` (both **0**). Scanner
command, run from the PR checkout for both targets:

```sh
nix run .#vulnix -- --mirror https://vig-os.github.io/nvd-mirror/ --closure /tmp/devkit-1847-r2/before --json > /tmp/devkit-1847-r2/before.json
nix run .#vulnix -- --mirror https://vig-os.github.io/nvd-mirror/ --closure /tmp/devkit-1847-r2/after --json > /tmp/devkit-1847-r2/after.json
```

Pinned scanner **vulnix 1.12.4**, same NVD database on 2026-10-26, no
register filtering. Both scanner exits **2** mean findings, not scan
failure. Before **18 records / 58 unique CVEs**; after **14 / 32**; **26
removed / 0 added**. The after findings pass
`PYTHONPATH=packages/vig-utils/src python3 -m vig_utils.vulnix_gate
/tmp/devkit-1847-r2/after.json` (**0**) with the PR's register.

Raw JSON records: [before part
1/2](#1912 (comment)),
[before part
2/2](#1912 (comment)),
[after](#1912 (comment)).
The before arrays concatenate in order to all 18 original records; only
JSON whitespace was compacted.

| Deleted exception | Before finding | After closure version | After
finding |
| --- | --- | --- | --- |
| CVE-2025-59777 | libmicrohttpd 1.0.2 | libmicrohttpd 1.0.10 | Absent |
| CVE-2025-62689 | libmicrohttpd 1.0.2 | libmicrohttpd 1.0.10 | Absent |
| CVE-2026-81642 | unbound 1.26.0 | libunbound 1.26.1 | Absent |
| CVE-2026-82717 | unbound 1.26.0 | libunbound 1.26.1 | Absent |
| CVE-2026-81634 | unbound 1.26.0 | libunbound 1.26.1 | Absent |

CVE-2026-5435 renewal evidence: [exact derivation, hash verification,
full patch list/application log, and patched
code](#1912 (comment)).
The reviewed closure contains
`pqyiidz5mi73wv5f91d48s9plcqyj5bz-glibc-2.44-57`; the locked derivation
is `9914bijg139hajpnv60z66b8sdv9ac3s-glibc-2.44-57.drv`. Its `src` flat
SHA-256 is **`sha256-N/YA8r7zxegwAUcFlWiyouQKetbMxlzpQlVtSUKcxmc=`**,
independently matched by `nix hash file --sri`. All **11** patches from
the locked derivation apply successfully; patched
**`resolv/ns_print.c:503–530`** uses the bounded default/hexify path and
has no TSIG case. Base source `NEWS:160–161` records BZ 34033. The fix
is present in the hash-verified 2.44 base source and remains present
after the exact patch list; this does not rely on the stable 2.42
backport.

All commit hooks passed, including expiry and commit-message validation;
`git diff --check` passed. **New head
`4d5f27e50b440d47a742dca896c502f19f1ee5d3`: all 18 hosted checks pass**,
including [CI run
40317694372](https://github.com/vig-os/devkit/actions/runs/40317694372),
[Home Matrix
40317694458](https://github.com/vig-os/devkit/actions/runs/40317694458)
and [CodeQL
40317694371](https://github.com/vig-os/devkit/actions/runs/40317694371).
`gh pr checks 1912 --watch --interval 20` exited **0**.
- none mode: say chore/<summary> remains allowed instead of "each exempt type"
- keep the chore reason when chore is exempt in custom modes
- ADR: dependency review runs only for public repos (follow-up #1913)
- move doc renders after render_issueless_branch_types
- known gap: approved-types table for custom types (#1914)

Refs: #1910
@gerchowl
gerchowl force-pushed the bugfix/1910-feature-aware-security-commit-docs branch from 64b6187 to a7027a7 Compare October 26, 2026 19:52
@gerchowl
gerchowl merged commit 7572d68 into dev Oct 27, 2026
16 checks passed
@gerchowl
gerchowl deleted the bugfix/1910-feature-aware-security-commit-docs branch October 27, 2026 08:19
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