Skip to content

Commit d1ee14d

Browse files
committed
fix: enforce rootless fixtures and restrict Valkey rollback scope
1 parent ced52a9 commit d1ee14d

24 files changed

Lines changed: 282 additions & 38 deletions

‎CHANGELOG.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# Changelog
22

3-
## 0.2.2 — implementation candidate; pentest NOT RUN
3+
## 0.2.2 — implementation candidate; pentest RETEST REQUIRED
44

5+
- Remediate the Medium rootless-enforcement and Low rollback-scope findings;
6+
add side-effect-denial regressions and require maintainer retest.
57
- Adopt public signed Wolfi Valkey 9.1.2 with exact index/platform admission and
68
weekly/manual freshness checks; retain the previous official digest for rollback.
79
- Separate fixture custody, OpenBao-issued ACLs, real eviction, outage/restart,

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ external network operations are distinct explicit actions.
2626
**Current status:** `v0.1.0`, `v0.2.0` and `v0.2.1` are signed and tagged with
2727
accepted pentests and green GitHub checks. The `0.2.2` candidate adopts the
2828
public signed Wolfi Valkey image for the development fixture, with explicit
29-
rollback and real cache/resource tests. Maintainer pentest is **NOT RUN**.
29+
rollback and real cache/resource tests. Maintainer pentest is **RETEST REQUIRED**.
3030
OpenBao-first service provisioning and the Wolfi/PostgreSQL fixture remain
3131
available. No workbench, transformation, browser UI, production HTTP server or
3232
CyberChef parity is implemented yet. See the [0.2.2 scope](docs/releases/v0.2.2-scope.md)

‎deploy/podman/valkey/README.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ are 512 MiB, one CPU and 128 PIDs, read-only root, dropped capabilities and
3333
no-new-privileges. Secret config is a private read-only mount, never argv.
3434

3535
The previous official digest and its narrowly reviewed unsigned-image exception
36-
remain available only via `RUNASMIDJA_VALKEY_PROFILE=official`. It is rescanned,
36+
remain available only via `RUNASMIDJA_VALKEY_PROFILE=official` with the validated
37+
`RUNASMIDJA_STACK_ID=v02-admission-ready`; other instance IDs fail closed. It is rescanned,
3738
not implicitly trusted because it was previously accepted. The new default
3839
fixture has separate vault/database custody; no automatic data migration or
3940
credential copying occurs. See [rollback commands](../../../docs/local-stack.md#valkey-profile-rollback-v022).

‎docs/IMPLEMENTATION_PLAN.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Runasmidja Implementation Plan
22

3-
Status: planning contract; v0.1.0/v0.2.0/v0.2.1 tagged; v0.2.2 implementation candidate; maintainer pentest NOT RUN.
3+
Status: planning contract; v0.1.0/v0.2.0/v0.2.1 tagged; v0.2.2 implementation candidate; maintainer pentest RETEST REQUIRED.
44
The authorized Wolfi/PostgreSQL fixture passes scans and real qualification; see the
55
[assessment](../security/pentest/v0.2.0.md).
66

‎docs/RELEASE_PLAN.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Runasmidja Release Plan To 1.0.0
22

3-
Status: roadmap contract; v0.1.0/v0.2.0/v0.2.1 tagged; v0.2.2 implementation candidate; maintainer pentest NOT RUN.
3+
Status: roadmap contract; v0.1.0/v0.2.0/v0.2.1 tagged; v0.2.2 implementation candidate; maintainer pentest RETEST REQUIRED.
44
The authorized Wolfi/PostgreSQL fixture passes scans and real qualification; see the
55
[assessment](../security/pentest/v0.2.0.md).
66

‎docs/local-stack.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,3 +213,12 @@ real bounded maxmemory eviction, outage and restart with cache nonpersistence
213213
and unchanged OpenBao credential versions. It grants no administrative ACL
214214
commands. Actual TTL/countdown remains v0.7. This is a disposable local fixture,
215215
not production cache migration, TLS, high availability or a website feature.
216+
217+
The service fixture rejects real/effective UID 0 and checks the selected Podman
218+
engine's rootless flag before each operation, including stop and bounds upgrade.
219+
Engine-info failure or unexpected output blocks work. Startup/locking check
220+
before custody creation; qualification also rejects container UID 0 independently.
221+
The official Valkey profile is restricted in selection, admission and entrypoint
222+
handling to the validated `v02-admission-ready` instance; another stack ID fails
223+
before custody creation or image building. These checks trust the local engine
224+
and CLI under the development fixture's existing trusted-host model.

‎docs/releases/v0.2.2-handoff.md‎

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# v0.2.2 implementation handoff
22

3-
Status: implementation verification PASS; maintainer pentest NOT RUN.
3+
Status: implementation verification PASS; maintainer pentest RETEST REQUIRED.
44
Baseline: signed v0.2.1. Scope: [Wolfi Valkey fixture](v0.2.2-scope.md).
55

66
## Implemented
@@ -23,8 +23,8 @@ Completed on 2026-10-04:
2323

2424
| Command / profile | Result |
2525
| --- | --- |
26-
| `scripts/checks.sh` | PASS: repository/plan, Rust fmt/Clippy/debug/release/all-features/rustdoc, bare-metal/Wasm no_std and 128 Python tests |
27-
| `PYTHONOPTIMIZE=2 python3 -m unittest discover -s scripts -p 'test_*.py'` | PASS: 128 tests |
26+
| `scripts/checks.sh` | PASS: repository/plan, Rust fmt/Clippy/debug/release/all-features/rustdoc, bare-metal/Wasm no_std and 136 Python tests |
27+
| `PYTHONOPTIMIZE=2 python3 -m unittest discover -s scripts -p 'test_*.py'` | PASS: 136 tests |
2828
| `python3 scripts/stack_qualification.py` | PASS: fresh Wolfi initialization and final retained-profile run, OpenBao first, scoped DB/cache auth, interrupted startup, root revocation, ownership/disclosure checks, restart/persistence and 12 PostgreSQL negatives |
2929
| Same command with official rollback profile and previous stack ID | PASS: previous custody/data retained; then stopped before returning to Wolfi |
3030
| `python3 scripts/qualification_bounds.py` | PASS: signed Wolfi base, actual audit ENOSPC, log rotation/capture bounds |
@@ -75,3 +75,20 @@ drift/rotation, service TLS and production recovery retain later owners.
7575
After local verification and commit, request maintainer pentest. Do not push,
7676
tag or attest PASS from these tests. v0.2.3 OpenBao image qualification remains
7777
proposed; v0.3.0 remains the next numbered minor.
78+
79+
## Pre-release SAST remediation
80+
81+
The review of ced52a9 reported one Medium rootless-enforcement gap and one Low
82+
rollback-instance scope gap. Both are accepted and corrected; see the
83+
[assessment](../../security/pentest/v0.2.2.md). Eight additional regressions
84+
exercise real/effective UID 0, rootful/malformed/failed engine info, engine
85+
changes between calls, pre-custody/pre-build denial, stop/upgrade denial,
86+
independent container UID checks and rollback selection/admission/entrypoint
87+
restriction. No new dependency or GitHub container job is introduced.
88+
Maintainer retest, not automated verification, determines acceptance.
89+
90+
Remediation runtime verification: full retained Wolfi and old-instance official
91+
qualification PASS, including fresh scans and existing fault/negative suites.
92+
Signed-base log/audit bounds PASS. The old fixture was stopped with data retained;
93+
return-to-Wolfi startup and complete service smoke PASS. The first restricted
94+
environment attempt failed and is retained as a failure in the assessment.

‎docs/releases/v0.2.2-scope.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# v0.2.2 — Wolfi Valkey fixture
22

3-
Status: implementation candidate; maintainer pentest NOT RUN.
3+
Status: implementation candidate; maintainer pentest RETEST REQUIRED.
44
Baseline: signed v0.2.1. Compatible service packaging patch; no new website/API.
55

66
## Goal and deliverables
@@ -21,6 +21,9 @@ Use a new default owned profile `v022-wolfi-valkey`. Earlier vault/database stat
2121
is retained untouched. Explicit `RUNASMIDJA_VALKEY_PROFILE=official` plus the old
2222
stack ID selects the rollback image; unknown profile names fail closed. Existing
2323
container image drift still rejects, never triggers replacement or a state reset.
24+
Selection, admission and entrypoint checks enforce the old rollback instance ID.
25+
Require nonzero real/effective host UID and the selected Podman engine rootless
26+
flag before service operations; reject container UID 0 independently.
2427

2528
## Verification
2629

‎docs/security-controls.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
| Tool provenance/freshness | Configured | Exact archive SHA-256 and versions; live freshness workflow |
1212
| Verified tool compilation | Implemented; maintainer retest accepted | CI compiles exact verified archive offline; corrupt/offline/traversal regressions |
1313
| Wolfi static probe qualification | Implemented; maintainer accepted v0.2.1 | Signed base/platform, exact archive/executable binding, live kernel limits/capabilities, owned cleanup; native/scratch regressions |
14-
| Fixture image provenance/inventory | Implemented; maintainer retest accepted | Signed OpenBao/Wolfi index-to-leaf binding, signed Wolfi Valkey index (exact official exception only for rollback), source-built PostgreSQL config/layer binding, per-image inventory and UNKNOWN/HIGH/CRITICAL rejection; only evidence-bound expiring UNKNOWN not-affected reviews; original PostgreSQL remains blocked |
14+
| Fixture image provenance/inventory | Implemented; v0.2.0 accepted, v0.2.2 retest required | Signed OpenBao/Wolfi index-to-leaf binding, signed Wolfi Valkey index (exact official exception only for rollback), source-built PostgreSQL config/layer binding, per-image inventory and UNKNOWN/HIGH/CRITICAL rejection; only evidence-bound expiring UNKNOWN not-affected reviews; original PostgreSQL remains blocked |
1515
| Public build containment | Implemented; maintainer retest accepted | Checked CPU/memory/PID owned cgroup and build-step limits, private 3 GiB store, pre-write 512 MiB atomic archive cap; actual build/kernel/tmpfs and failure regressions |
1616
| Public SBOM privacy | Implemented; maintainer retest accepted | Stable image names; generator/repository rejection of home/macOS/Windows/workspace paths |
1717
| Scanner completion and build publication | Implemented; maintainer retest accepted | Nonzero scanner exits always reject; findings evaluated only after completion; candidate scan/import/identity checks precede final receipt; failure/retry and previous-artifact preservation regressions |
@@ -27,7 +27,7 @@
2727
| Release metadata readiness | Configured; limited | Report shape/digest/lineage/SBOM-presence only; no assessor/artifact authentication; trusted review required |
2828
| Workflow/graph enforcement hardening | Required; planned | Reproduced .yaml action/CodeQL omission and no_std comment spoof; versioned rejection/admission owners in [reconciliation](gap-reconciliation-2026-10-03.md) |
2929
| Fixture ownership/drift | Minimum ownership implemented; full drift pending v0.5 | Project/service/instance labels before network/volume/container reuse and stop; pinned image ID checked. Full fingerprints and inspect/mutate races unqualified |
30-
| Wolfi Valkey fixture | Implemented; v0.2.2 pentest pending | Exact version/base, auth/ACL/key denials, real eviction, kernel restrictions, outage/restart/nonpersistence and preserved official-profile rollback |
30+
| Wolfi Valkey fixture | Implemented; v0.2.2 retest required | Exact version/base, auth/ACL/key denials, real eviction, kernel restrictions, outage/restart/nonpersistence and preserved-instance-only official rollback; nonzero host/container UID and selected-engine rootless enforcement |
3131
| Valkey expiry evidence | Required; planned | Current smoke accepts EX then deletes; actual TTL/countdown/expiry qualification remains pending |
3232
| Product security controls | Planned | Browser, API, recipe, worker, provider and recovery milestones |
3333
| Smoke evidence integrity | Implemented; maintainer retest accepted | Optimization-safe checks, actual child's announced ephemeral port, bounded/flushed readiness and pre/post liveness; 34 Python tests plus optimized actual probes |

‎release-notes/v0.2.2.md‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Runasmidja 0.2.2 — Wolfi Valkey fixture
22

3-
Status: implementation candidate; maintainer pentest NOT RUN.
3+
Status: implementation candidate; maintainer pentest RETEST REQUIRED.
44
Compatible fixture packaging patch over signed v0.2.1, not production readiness.
55

66
The default development cache now uses public Wolfi Valkey 9.1.2, authenticated
@@ -32,3 +32,9 @@ See [scope](../docs/releases/v0.2.2-scope.md),
3232
[verification handoff](../docs/releases/v0.2.2-handoff.md),
3333
[image profile](../deploy/podman/valkey/README.md) and
3434
[assessment](../security/pentest/v0.2.2.md).
35+
36+
Pre-release SAST remediation: enforce nonroot invocation and rootless Podman
37+
before service fixture work; independently reject Valkey UID 0. Restrict the
38+
unsigned official rollback image to the preserved stack ID at selection, image
39+
admission and entrypoint boundaries. Negative regressions cover both reported
40+
bypasses. Maintainer retest is required; see the linked assessment.

0 commit comments

Comments
 (0)