Skip to content
Closed
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
42c2b67
test(sandbox): define quarantined patch validation contract
seonghobae Aug 5, 2026
2fd5f8b
feat(sandbox): implement quarantined patch validation
seonghobae Aug 5, 2026
28b6d58
feat(sandbox): export patch validation API
seonghobae Aug 5, 2026
8d3f3c9
fix(sandbox): preserve nofollow patch path semantics
seonghobae Aug 5, 2026
7d1fb3a
test(sandbox): close patch validator safety branches
seonghobae Aug 5, 2026
de2bab9
fix(sandbox): reject raw backslash patch paths before tokenization
seonghobae Aug 5, 2026
641420b
docs(doctoring): record quarantined patch validation boundary
seonghobae Aug 5, 2026
86052b5
docs(sandbox): explain quarantined patch validation
seonghobae Aug 5, 2026
f6a289d
docs(changelog): record quarantined patch validation
seonghobae Aug 5, 2026
c83fb48
docs(changelog): restore undici release-gate wording
seonghobae Aug 5, 2026
acd9c0b
test(sandbox): expose exact-source and patch handoff races
seonghobae Aug 5, 2026
235b7e8
test(sandbox): expose hidden patch and evidence boundaries
seonghobae Aug 5, 2026
76c059e
fix(sandbox): close patch metadata and mount injection gaps
seonghobae Aug 5, 2026
be89ea9
fix(sandbox): bind exact source and bounded result artifact
seonghobae Aug 5, 2026
b4db02d
test(sandbox): verify safe staging and bounded metadata parsing
seonghobae Aug 5, 2026
ef87aa3
test(sandbox): assert private staged patch and output mount
seonghobae Aug 5, 2026
8a16a92
test(sandbox): reject non-exact source worktrees
seonghobae Aug 5, 2026
7e61a23
docs(sandbox): document staged patch and bounded result evidence
seonghobae Aug 5, 2026
b8c17b9
docs(doctoring): bind staged patch and result trust boundaries
seonghobae Aug 5, 2026
71e885e
ci: repair PR 65 reviewer coverage test-first
seonghobae Aug 5, 2026
b1b00fa
chore(ci): remove temporary self-modifying repair workflow
seonghobae Aug 5, 2026
795b940
test(sandbox): reject dirty and unverifiable source snapshots
seonghobae Aug 5, 2026
2f0608b
fix(sandbox): reject dirty exact-head source snapshots
seonghobae Aug 5, 2026
5d3da44
docs(sandbox): require clean exact-head Git snapshots
seonghobae Aug 5, 2026
fe15128
docs(doctoring): require clean exact-head source evidence
seonghobae Aug 5, 2026
5045cc4
test(sandbox): hide Git credentials from untrusted validation
seonghobae Aug 5, 2026
13b33e2
fix(sandbox): mask Git control metadata from untrusted code
seonghobae Aug 5, 2026
93fe83d
docs(sandbox): document Git metadata credential mask
seonghobae Aug 5, 2026
6ff8029
docs(doctoring): record Git metadata credential mask
seonghobae Aug 5, 2026
b044062
ci: reject dirty PR 65 source worktrees
seonghobae Aug 5, 2026
f3d42e3
chore(ci): remove temporary dirty-source repair workflow
seonghobae Aug 5, 2026
e531bde
test(sandbox): expose source snapshot race
seonghobae Aug 5, 2026
0a2dbf5
chore(pr65): stage exact-source snapshot repair
seonghobae Aug 5, 2026
d5f6d78
fix(pr65): make source snapshot repair script executable
seonghobae Aug 5, 2026
2a064be
ci(pr65): run exact-source snapshot repair once
seonghobae Aug 5, 2026
2c7a3f8
chore(ci): remove invalid PR repair workflow
seonghobae Aug 5, 2026
c1c3f12
chore(sandbox): remove temporary PR repair script
seonghobae Aug 5, 2026
712125f
ci(pr65): verify exact-commit source snapshot repair
seonghobae Aug 5, 2026
8584d1e
chore(ci): remove invalid self-modifying repair workflow
seonghobae Aug 5, 2026
e0b9a33
fix(sandbox): mount exact committed source snapshot
seonghobae Aug 5, 2026
4643980
test(sandbox): cover exact source snapshot failures
seonghobae Aug 5, 2026
86f9388
docs(sandbox): document exact committed source snapshot
seonghobae Aug 5, 2026
816387e
docs(doctoring): record exact committed source boundary
seonghobae Aug 5, 2026
bd64670
test(sandbox): specify bounded archive extraction
seonghobae Aug 5, 2026
841d475
test(sandbox): complete archive boundary regressions
seonghobae Aug 5, 2026
ea4786c
fix(sandbox): bound exact-source archive extraction
seonghobae Aug 5, 2026
6521891
docs(sandbox): specify bounded archive extraction
seonghobae Aug 5, 2026
c884296
docs(doctoring): record archive extraction boundary
seonghobae Aug 5, 2026
247072f
test(sandbox): cover archive collision failures
seonghobae Aug 5, 2026
542867c
test(sandbox): isolate exact source from local Git attributes
seonghobae Aug 5, 2026
caa94a0
test(sandbox): reproduce raw-tree and bounded-output gaps
seonghobae Aug 5, 2026
004b14f
fix(sandbox): isolate Git control metadata from exact snapshots
seonghobae Aug 5, 2026
ca012c6
test(sandbox): cover isolated Git control failure boundaries
seonghobae Aug 5, 2026
59e5616
test(sandbox): exercise malformed archive after isolated control setup
seonghobae Aug 5, 2026
82abd4f
fix(sandbox): bound patch evidence to one host result file
seonghobae Aug 5, 2026
3cea7ad
test(sandbox): target the single bounded result-file mount
seonghobae Aug 5, 2026
299dd78
test(sandbox): target bounded result file in metadata isolation
seonghobae Aug 5, 2026
4938886
test(sandbox): verify one bounded result-file channel
seonghobae Aug 5, 2026
6d9fd53
docs(sandbox): document isolated raw Git tree and result file
seonghobae Aug 5, 2026
ac385ee
docs(doctoring): record isolated Git attribute boundary
seonghobae Aug 5, 2026
cbbf712
docs(changelog): record isolated Git tree and result boundary
seonghobae Aug 5, 2026
cad5be4
docs(doctoring): keep repository citations APA-only
seonghobae Aug 5, 2026
cbf749e
test(sandbox): allow realistic artifacts under fsize cap
seonghobae Aug 5, 2026
b98a263
fix(sandbox): preserve realistic file writes under bounded validation
seonghobae Aug 5, 2026
5f57f2c
docs(sandbox): separate workspace and evidence file-size ceilings
seonghobae Aug 5, 2026
9a200bc
docs(doctoring): separate process and evidence size ceilings
seonghobae Aug 5, 2026
03af3f6
test(sandbox): parse exact result mount boundary
seonghobae Aug 5, 2026
01e8c5e
test(sandbox): expose post-hunk path-smuggling boundary
seonghobae Aug 5, 2026
2c843cf
fix(sandbox): parse unified hunk boundaries before path checks
seonghobae Aug 5, 2026
7b848d0
test(sandbox): cover unified hunk parser boundaries
seonghobae Aug 5, 2026
be2ba58
test(sandbox): bind secondary paths to primary diff identity
seonghobae Aug 5, 2026
f220803
fix(sandbox): bind auxiliary paths to counted diff identity
seonghobae Aug 5, 2026
34362d0
test(sandbox): reject existing symlink and gitlink index modes
seonghobae Aug 5, 2026
37d8191
test(sandbox): fail closed on provenance and hunk edges
seonghobae Aug 5, 2026
51c6717
docs(changelog): record exact hunk path and mode boundaries
seonghobae Aug 5, 2026
cf8d0e5
ci(sandbox): stage exact validation-contract repair
seonghobae Aug 5, 2026
e92ceea
ci(sandbox): run exact validation-contract repair
seonghobae Aug 5, 2026
8e3b020
test(sandbox): forbid untrusted result evidence writes
seonghobae Aug 5, 2026
f327efb
fix(sandbox): enforce exact provenance and bounded evidence
seonghobae Aug 5, 2026
920086d
chore(security): remove self-modifying PR repair workflow
seonghobae Aug 5, 2026
15e951d
chore(sandbox): remove transient repair mutator
seonghobae Aug 5, 2026
a99350e
test(sandbox): remove superseded host-evidence contract
seonghobae Aug 5, 2026
2d48b43
test(sandbox): bound prearchive tree and result channel
seonghobae Aug 5, 2026
e68e88d
test(sandbox): model post-stat result growth
seonghobae Aug 5, 2026
229c2b3
test(sandbox): isolate legacy unit boundaries explicitly
seonghobae Aug 5, 2026
740daa5
test(sandbox): remove trust-boundary bypass fixtures
seonghobae Aug 5, 2026
9de2da5
test(sandbox): modernize runner fixtures without bypasses
seonghobae Aug 5, 2026
e8294f4
test(sandbox): authenticate adversarial runner fixtures
seonghobae Aug 5, 2026
9b5a6ef
test(sandbox): require canonical repository paths
seonghobae Aug 5, 2026
a3ce5c6
test(sandbox): authenticate direct result-file fixture
seonghobae Aug 5, 2026
aad5390
test(sandbox): model exact-tree preflight in archive fixtures
seonghobae Aug 5, 2026
3ce8041
fix(sandbox): validate canonical metadata and exact tree before archive
seonghobae Aug 5, 2026
477f0a7
test(sandbox): bind source-integrity doubles to prearchive tree checks
seonghobae Aug 5, 2026
5bbe221
test(sandbox): close exact-tree and parser branch coverage
seonghobae Aug 5, 2026
471efa3
test(sandbox): preserve hunk-before-header regression after no-diff gate
seonghobae Aug 5, 2026
93b0766
test(sandbox): cover descriptor sentinel cleanup branch
seonghobae Aug 5, 2026
f676886
docs(sandbox): align patch validation contract with exact-tree preflight
seonghobae Aug 5, 2026
c604f92
docs(doctoring): record exact-tree and single-result evidence rationale
seonghobae Aug 5, 2026
9febe3c
test(sandbox): require bounded streaming Git evidence
seonghobae Aug 5, 2026
c88bd75
fix(sandbox): stream hostile Git evidence within hard bounds
seonghobae Aug 5, 2026
3f17418
test(sandbox): isolate archive fixtures from streaming tree process
seonghobae Aug 5, 2026
2b626da
test(sandbox): model streamed status command failure
seonghobae Aug 5, 2026
b36c9c3
test(sandbox): model streamed exact-tree process failures
seonghobae Aug 5, 2026
5027f64
test(sandbox): cover bounded Git streaming failure branches
seonghobae Aug 5, 2026
2680812
test(sandbox): close final bounded-stream coverage edges
seonghobae Aug 5, 2026
59c726d
docs(sandbox): document bounded Git stream collection
seonghobae Aug 5, 2026
9e03b17
docs(doctoring): justify bounded Git evidence streaming
seonghobae Aug 5, 2026
89b4e5c
test(sandbox): expose trailing mode token bypass
seonghobae Aug 5, 2026
0a703e3
ci: verify and repair strict mode metadata parsing
seonghobae Aug 6, 2026
dc65698
chore(workflows): remove invalid self-modifying repair automation
seonghobae Aug 6, 2026
609333f
fix(reviewer): parse patch mode metadata exactly
seonghobae Aug 6, 2026
31371cc
docs(reviewer): document exact mode metadata parsing
seonghobae Aug 6, 2026
ad7a63c
docs(doctoring): record mode-metadata fail-closed decision
seonghobae Aug 6, 2026
0c60dea
docs(changelog): record strict mode metadata parsing
seonghobae Aug 6, 2026
44e3cb8
docs(changelog): preserve unrelated audit wording
seonghobae Aug 6, 2026
ae509a7
test(sandbox): require canonical ASCII exact-tree metadata
seonghobae Aug 6, 2026
36ad5bb
fix(sandbox): require canonical ASCII exact-tree metadata
seonghobae Aug 6, 2026
e6f5b47
docs(sandbox): specify canonical exact-tree metadata
seonghobae Aug 6, 2026
8f9c802
docs(doctoring): justify canonical ASCII tree grammar
seonghobae Aug 6, 2026
1e836fa
docs(changelog): record canonical ASCII tree grammar
seonghobae Aug 6, 2026
7c9090e
test(sandbox): preserve canonical git size padding
seonghobae Aug 6, 2026
df9829a
test(sandbox): define canonical git size padding grammar
seonghobae Aug 6, 2026
67d57ae
fix(sandbox): parse canonical git long-size padding
seonghobae Aug 6, 2026
1deb46b
docs(sandbox): document canonical git size padding
seonghobae Aug 6, 2026
e682978
docs(doctoring): reconcile git long-size padding grammar
seonghobae Aug 6, 2026
5d63605
docs(changelog): reconcile git long-size padding finding
seonghobae Aug 6, 2026
dd5813a
test(sandbox): reject borrowed Git object databases
seonghobae Aug 6, 2026
757c467
test(sandbox): bind exact tree to archive bytes
seonghobae Aug 6, 2026
5da28df
test(sandbox): remove unused archive-binding import
seonghobae Aug 6, 2026
a586e18
fix(sandbox): bind exact Git tree to extracted bytes
seonghobae Aug 6, 2026
d59159c
test(sandbox): cover Git blob identity failure edges
seonghobae Aug 6, 2026
d29abd4
test(sandbox): cover absent descriptor cleanup branch
seonghobae Aug 6, 2026
3e074a9
docs: bind patch validation source identity
seonghobae Aug 6, 2026
19f038d
docs: doctor exact-tree identity boundary
seonghobae Aug 6, 2026
552a6dd
docs: record authenticated source contract
seonghobae Aug 6, 2026
5c2e676
docs: preserve unrelated changelog text
seonghobae Aug 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
401 changes: 401 additions & 0 deletions .github/workflows/repair-pr65-reviewer-ci.yml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## Unreleased
- untrusted patch를 exact repository/base/head/patch SHA-256와 allowlisted validation profile에 결합해 credential-free, no-network, read-only, non-root Docker sandbox에서 검증하는 reviewer 경계를 추가. text-only preflight가 malformed UTF-8·binary payload·symlink/gitlink mode·traversal·absolute/control-character/raw-backslash path·중복/과다 변경 파일·GitHub governance 경로를 Docker 실행 전에 실패-폐쇄하며, descriptor-safe no-follow read와 immutable digest-pinned image·capability drop·seccomp·resource quotas·bounded timeout cleanup·bounded structured result 재검증을 강제한다. beginner-readable 운영 문서와 NIST SP 800-190·NIST SP 800-218·OCI Runtime Specification 1.3.0·SLSA 1.2 근거를 APA 7th doctoring에 기록하고 reviewer production statement/branch/docstring 100% gate와 현실적인 악성 patch 회귀 테스트를 유지한다.
- `hourly-product-development`가 `NVIDIA_NIM_API_KEY`뿐 아니라 `NOEMA_MAINTAINER_APP_CLIENT_ID`와 `NOEMA_MAINTAINER_APP_PRIVATE_KEY` 존재를 checkout·OpenCode 설치·NVIDIA 호출 전에 검증한다. 게시 경로가 준비되지 않았으면 `maintainer_app_unavailable`로 실패 폐쇄하여 알려진 실패에 추론 비용을 쓰지 않으며, `dry_run`은 credential 없이 queue와 task contract를 검토하는 경로로 유지한다. 기존 reviewer App 및 `NOEMA_LLM_API_KEY`·`contextual-orchestrator` reviewer credential 경계는 변경하지 않는다.
- zero open pull requests일 때만 `NVIDIA_NIM_API_KEY` 전용 OpenCode 1.17.13 세션을 실행하는 proposal-only `hourly-product-development` 루프를 추가. minute-47 schedule·non-cancelling single flight·OpenCode binary SHA-256 pin·NVIDIA NIM model fallback·후보 실패 시 clean reset·GitHub/OIDC credential 제거·reviewer key 비참조·full release verification·40-file/500,000-byte proposal budget·trusted one-PR packaging을 강제한다. 각 후보 실행은 900초와 30초 kill grace로 제한하고, 실패 후 `npm ci --ignore-scripts` 재설치는 별도 60초와 10초 kill grace로 제한한다. 재설치가 실패하거나 시간 초과되면 불완전한 dependency tree로 다음 후보를 실행하지 않고 실패 폐쇄한다. 세 후보의 실행·종료 2,790초, 두 번의 후보 간 재설치 140초, 300초 setup/diagnostic reserve를 합친 3,230초가 55분(3,300초) job budget에 들어가며 70초 여유를 남긴다. 마지막 후보가 실패하면 불필요한 reset·clean·재설치를 생략하고 안정적인 전체 후보 실패 진단으로 곧바로 종료한다. 모델 실행, 제안 코드 검증, publication credential을 각각 별도의 GitHub-hosted runner로 분리하고, immutable artifact의 exact ID·workflow-run ID·archive digest와 patch SHA-256·base SHA·file/byte count를 교차 검증하며 symlink(`120000`)와 gitlink(`160000`)를 세 경계 모두에서 차단한다. 제안 코드를 실행한 runner에는 Maintainer App secret/token을 절대 제공하지 않고, 세 번째 non-executing publisher에서만 late-bound repository-scoped App token을 발급한다. merge/release/deploy authority는 기존 `hourly-commercial-readiness` exact-head governance에 유지하며, 운영 Runbook과 OpenCode/NVIDIA/GitHub Actions/NIST SP 800-218 근거를 APA 7th doctoring에 기록했다. package version은 release·deployment·production KPI evidence를 발행하지 않으므로 유지한다.
- `/health` liveness와 분리된 unauthenticated `GET`/`HEAD /ready` runtime readiness endpoint를 추가. GitHub Actions OIDC issuer·audience·organization/workflow binding·exact workflow ref·GitHub Cloud API origin·GitHub App identifiers·PKCS#8 private key를 외부 호출 없이 검증하며, 불완전한 설정은 secret/config value를 반사하지 않는 deterministic failure codes와 `503 ERR_SERVICE_NOT_READY`, `Retry-After`, no-store/nosniff/trace/latency headers로 실패-폐쇄한다. exact workflow named ref는 Git `check-ref-format`의 모호성·유효성 경계(`..`, `//`, dot-leading/`.lock` component, revision-expression 문자, trailing dot/slash 등)를 만족해야 하므로 GitHub가 실제로 표현할 수 없는 ref에서 false-ready가 발생하지 않는다. 배포 smoke contract가 liveness·runtime readiness·unauthenticated exchange challenge를 모두 요구하도록 확장하고 Kubernetes probe separation, RFC 9110, NIST SSDF, Git ref-format 근거를 APA 7th doctoring에 기록했다.
Expand Down
140 changes: 140 additions & 0 deletions docs/doctoring/quarantined-patch-validation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
# Quarantined patch-validation boundary

## Decision

Noema validates generated or externally supplied text patches only inside a credential-free, no-network container boundary. The validator is deliberately narrower than a general-purpose CI runner: it accepts one repository/base/head/patch-digest tuple and one allowlisted validation profile, then returns a bounded structured result that the trusted reviewer process revalidates.

This design keeps patch content, repository scripts, and test execution away from GitHub App, reviewer-model, NVIDIA NIM, Cloudflare, OIDC, Docker-socket, and publication credentials. A successful sandbox result is evidence about one supplied source snapshot, patch, image, and validation profile only. It is not merge approval, release provenance, production-readiness evidence, or a substitute for independent review.

## Threat model

The boundary assumes that patch content, checked-out repository content, repository scripts, and container output may be malicious. It therefore treats the following as hostile inputs:

- primary and auxiliary Git diff paths;
- file modes, including symlinks and gitlinks;
- binary patch payloads;
- the caller-controlled original patch pathname;
- test output and structured result output;
- repository scripts executed by an approved profile; and
- attempts to consume host resources, reach external services, or inherit credentials.

The current slice does not claim protection against a compromised host kernel, container runtime, immutable validator image, image registry, trusted workflow source, or intentionally false non-Git source snapshot supplied by a privileged caller. Those remain separate infrastructure and supply-chain trust decisions.

## Fail-closed controls

### Exact identity binding

A request binds all of the following:

1. repository full name;
2. exact base commit SHA;
3. exact head commit SHA;
4. SHA-256 digest of the patch bytes; and
5. an enumerated validation profile.

When the source root is a Git working tree, the trusted host runs a non-shell `git rev-parse HEAD` before Docker starts and requires the observed commit to equal the requested head SHA. A source snapshot without `.git` metadata can still enter the sandbox, but this module cannot independently prove its revision; the trusted caller must supply separate exact-source evidence.

The base SHA is an evidence binding repeated in the result. This runner neither fetches nor reconstructs the base commit and performs no network access. Consumers must not infer that the runner independently established the base-to-head relationship.

The returned result repeats the same identity tuple and the command baked into the selected profile. Unknown fields, malformed fields, out-of-bound values, a `PASSED` status with a nonzero exit code, or any identity mismatch are rejected before the result can influence reviewer judgement.

### Descriptor-safe patch intake and private staging

Before Docker is invoked, Noema reads the original patch through descriptor-safe, no-follow filesystem operations and rejects:

- missing, empty, non-regular, symlinked, unstable, or oversized patch files;
- non-UTF-8 content;
- binary patch payloads;
- symlink or gitlink modes;
- malformed diff headers;
- traversal, absolute paths, control characters, raw backslashes, malformed quoted paths, repeated targets, and excessive changed-file counts; and
- governance-sensitive paths such as GitHub Actions workflows, local actions, Git metadata, root or documented CODEOWNERS files, Dependabot configuration, and submodule configuration.

Path validation covers `diff --git`, `---`, `+++`, `rename from`, `rename to`, `copy from`, and `copy to` metadata outside hunks. This prevents a superficially safe primary header from redirecting the applied patch into governance files through an auxiliary header.

Raw backslashes are rejected before shell-style tokenization. This prevents a parser from consuming a backslash as an escape and accidentally converting an unsafe path into a superficially safe token.

After byte validation and digest comparison, Noema copies the exact verified bytes to an owner-only private temporary path. The original caller-controlled pathname is never included in Docker's comma-delimited `--mount` grammar. The staged copy is mounted read-only and deleted when validation exits. This closes both mount-option injection through characters such as commas and a change-after-check window on the original path.

### Container isolation

The validator command requires an immutable digest-pinned image and applies the following runtime controls:

- `--pull=never` after independent image verification;
- no network namespace access;
- read-only root filesystem;
- read-only source and staged-patch bind mounts;
- one private writable output bind mount for the result artifact only;
- non-root host UID/GID execution;
- all Linux capabilities dropped;
- `no-new-privileges` and a seccomp profile;
- no Docker socket;
- bounded PID, CPU, memory, swap, file-descriptor, process, core-dump, wall-time, and tmpfs resources;
- isolated IPC; and
- a child environment containing only the minimum executable path, output path, and exact validation identity.

The trusted caller performs forced container cleanup after timeout. Normal subprocess stdout and stderr are discarded rather than accepted as an unbounded evidence channel.

### Bounded result artifact

The container writes `/output/result.json` inside a private host temporary directory. The host reads the file with regular-file, no-follow, stable-descriptor, and byte-limit checks. The artifact is limited to 16 KiB and parsed with an extra-fields-forbidden schema.

The schema bounds status, exit code, duration, excerpts, reason-code count, and reason-code syntax. A successful status requires exit code zero. Repository, base SHA, head SHA, patch SHA-256, profile, and baked-in command must exactly match the request. The private output directory is deleted when validation exits.

A bounded stdout fallback exists only to preserve deterministic injected-runner unit tests. The real subprocess configuration discards stdout and stderr and requires the result file contract.

## Standards rationale

NIST SP 800-190 describes container-specific risks and recommends protecting images, registries, orchestrators, hosts, and container workloads through isolation, least privilege, vulnerability management, and trusted image practices. Noema applies those principles through an immutable image reference, non-root execution, dropped capabilities, no network, read-only mounts, a narrowly writable result directory, and explicit resource constraints. This is an implementation-alignment statement, not a claim of formal NIST conformance.

NIST SP 800-218 defines the final SSDF Version 1.1. NIST published Draft SP 800-218 Rev. 1, describing SSDF Version 1.2, in December 2025; because it remains draft, this decision treats the final Version 1.1 as the normative NIST baseline while tracking the draft for future changes. Exact request/result binding, deterministic preflight, structured bounded evidence, and test-first failure cases operationalize SSDF verification and evidence practices for generated-patch validation.

OCI Runtime Specification 1.3.0, released November 4, 2025, is the latest approved OCI runtime specification at the time of this decision. It defines the low-level container configuration model for namespaces, mounts, Linux resources, capabilities, and process execution. Docker flags are one runtime-specific mechanism for expressing those controls; Noema does not treat the Docker CLI itself as a security standard.

SLSA Version 1.2, released November 24, 2025, is the current approved SLSA specification. Its Build and Source tracks distinguish source-review controls, build isolation, provenance, and source verification. This sandbox improves one validation boundary but does not by itself establish a SLSA level. Noema keeps source authentication, protected-branch approval, exact-head checks, independent review, build provenance, and release evidence as separate gates.

## Verification contract

Deterministic tests must prove at least:

- valid text patches produce an ordered unique changed-path tuple;
- malformed UTF-8, binary patches, symlink/gitlink modes, traversal, absolute paths, control characters, raw backslashes, malformed quoted metadata, governance paths, repeated paths, and file-count overflow fail closed;
- auxiliary Git path headers cannot redirect a safe primary header into governance files;
- descriptor swaps, symlink substitutions, short reads, size overflow, and filesystem errors fail closed;
- a Git source HEAD mismatch blocks Docker before untrusted execution;
- caller-controlled comma-bearing patch names are replaced by a private safe staged path;
- only digest-pinned trusted image references are accepted;
- Docker receives no repository, reviewer, model, NVIDIA NIM, Cloudflare, OIDC, or publication credential;
- the command is a fixed enum profile rather than caller-provided shell text;
- timeout cleanup is attempted and bounded;
- malformed, oversized, unknown-field, inconsistent, or identity-mismatched result artifacts fail closed;
- staged patch and result directories are removed after validation; and
- production statement and branch coverage and public docstring coverage remain 100 percent.

## Residual risks and next slices

Before treating this boundary as release-grade, the repository must also retain or add:

- independent exact-head review and required GitHub checks;
- exact-source authentication for non-Git source snapshots;
- a build definition for the patch-validator image;
- image signature, vulnerability, SBOM, and provenance verification in a trusted workflow;
- a real no-network smoke test of the digest-pinned patch-validator image, rather than inference from another sandbox image;
- integration into the reviewer decision flow with explicit separation between validation evidence and model judgement;
- evidence retention with exact workflow, run, source, image, and request bindings;
- operator documentation for image rotation, failure recovery, and incident response; and
- rollback behavior when image verification or sandbox execution becomes unavailable.

Until those items are satisfied, this PR is a tested library boundary and evidence contract, not a complete end-to-end production activation.

## References

Open Container Initiative. (2025, November 4). *OCI runtime-spec v1.3.0 release notice*. https://opencontainers.org/release-notices/v1-3-0-runtime-spec/

SLSA Community. (2025, November 24). *Announcing SLSA v1.2*. The Linux Foundation. https://slsa.dev/blog/2025/11/announce-slsa-v1.2

SLSA Community. (2025). *SLSA specification (Version 1.2)*. The Linux Foundation. https://slsa.dev/spec/v1.2/

Souppaya, M., Morello, J., & Scarfone, K. (2017). *Application container security guide* (NIST Special Publication 800-190). National Institute of Standards and Technology. https://doi.org/10.6028/NIST.SP.800-190

Souppaya, M., Scarfone, K., & Dodson, D. (2022). *Secure software development framework (SSDF) version 1.1: Recommendations for mitigating the risk of software vulnerabilities* (NIST Special Publication 800-218). National Institute of Standards and Technology. https://doi.org/10.6028/NIST.SP.800-218
Loading
Loading