test(security): prove audit special-file open is nonblocking - #253
Merged
seonghobae merged 4 commits intoSep 10, 2026
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
seonghobae
marked this pull request as ready for review
September 10, 2026 07:21
seonghobae
merged commit Sep 10, 2026
c4030f7
into
feat/agent-artifact-admission
3 of 4 checks passed
This was referenced Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #252. Draft child of exact
feat/agent-artifact-admission@bf5a48b8a095359b28a067e019b93b8c0e26104f.Wardnet-local scope only: audit-evidence file persistence for Agent Artifact Admission. No quarantine execution, EgressWeave transport policy, contextual-orchestrator behavior, AppGuardrail analysis, foreign-owner source, cross-service SQL, product-gap-ledger edit, force update, self/model approval or gate weakening.
Hosted hostile RED
The first test commit required formatting repair and therefore was not accepted as RED. Test-only exact
187aabd1ada11b5a5c9bbf3c07df143d645b492dis the valid hostile reproduction: production source remained byte-identical to parent#129@bf5a48b...; CI34448606974, rust job102778872900, acquired realubuntu-24.04, completed checkout/toolchain andcargo fmt --check, then executed the workspace suite. Existing tests passed through the audit-path controls. Inaudit_special_file_safety_contract, the helper control passed, whilefile_sink_rejects_fifo_without_blocking_on_openremained blocked for the bounded 3.11 s interval and failed withaudit append blocked while opening a FIFO; special audit files must fail closed promptly. The child was killed/reaped, so the regression is semantic RED rather than a hung runner.Root cause is the existing Linux single-open boundary:
O_NOFOLLOWand post-openmetadata().is_file()protect against final-link redirection and reject non-regular descriptors after open, but a write-only FIFO can block insideopenbefore that type check. Linux man-pages 6.18fifo(7)andopen(2)specify that normal FIFO open waits for the other endpoint;O_NONBLOCK | O_WRONLYinstead fails promptly withENXIOwhen no reader exists.Minimum causal repair
Exact successor
1e2efdc9580328709b3d3bdde3682979abf46a2achanges only the hostile fixture andcrates/agent-artifact-admission/src/audit.rs. The production delta adds LinuxO_NONBLOCKto the sameOpenOptionscustom flags that already containO_NOFOLLOW; mode0600, append/create behavior, the post-open regular-file check, stableAuditError::StorageUnavailable, process-local serialization, bounded encoding, flush andsync_dataremain unchanged. Linuxopen(2)documents thatO_NONBLOCKhas no relevant effect on regular-file semantics, while it prevents this FIFO open from waiting indefinitely. No pre-open pathname type check or TOCTOU-prone split path was introduced.Exact-current GREEN
On unchanged exact
1e2efdc9580328709b3d3bdde3682979abf46a2a, repository CI34449016775is terminal SUCCESS: rust job102780179969completed hosted checkout/toolchain, formatting, the full locked workspace test step, and Clippy successfully. Fuzz34449016761is also terminal SUCCESS. Fresh submitted-review inventory is empty and inline review-thread inventory is empty. The live base remains unchanged exactfeat/agent-artifact-admission@bf5a48b8a095359b28a067e019b93b8c0e26104f, and the PR is mechanically mergeable.This child is ready for normal integration into #129. After integration, #129 must reacquire its own exact-head repository/security/coverage/package/SBOM/provenance/review/thread evidence; child receipts do not transfer.