fix(security): enforce admission credential file permissions - #247
Merged
seonghobae merged 2 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 05:01
seonghobae
merged commit Sep 10, 2026
473f689
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 #246. Stacked Draft on
feat/agent-artifact-admission; do not merge before #129's current security lineage is stable/integrated.Boundary
This change belongs to Wardnet's Agent Artifact Admission credential-loading boundary. It does not introduce identity brokerage, secret distribution, hostile execution/isolation, outbound transport policy, LLM orchestration, or static package analysis; Keyverse, quarantine-sandbox-runtime, EgressWeave, contextual-orchestrator and AppGuardrail remain canonical owners for those capabilities.
Hosted semantic RED
Test-only head
d9126dba9fad4332eec16cb441d3fb7a569452b4made the documented local credential-file access boundary executable. On Unix, owner-only0600/0400are positive controls; representative group/other read/write/execute modes must fail closed.CI
34434716330, rust job102737284371, acquired a real GitHub-hosted Ubuntu 24.04 runner, completed checkout/toolchain/rustfmt and passed the existing workspace suite untilcrates/agent-artifact-admission/tests/cli_contract.rs.credential_loader_rejects_group_or_other_permissionsthen failed exactly at mode0640:load_admin_tokenaccepted credential authority exposed outside the owner boundary. This is the semantic RED; it is not a runner, formatter or unrelated-test failure.Minimum causal repair
Exact source successor
2efe188cd94b77d039c749368cfeee977dbb51e4changes only the local credential reader. It opens the credential path once, checks access metadata on that same open file handle before materializing secret bytes, and on Unix rejects any group/other permission bit (mode & 0o077 != 0) with the existing non-secretInvalidCredentialerror. The ordinary non-secret configuration reader remains unchanged. This avoids a check-then-open path race and does not broaden the change into symlink/ownership policy without a separate hostile finding.A platform without this POSIX permission predicate fails the local-file credential boundary closed rather than pretending Unix mode bits provide Windows ACL parity. A native ACL contract can replace that conservative boundary when separately specified and tested.
Fresh exact-head CI
34436046500and Fuzz34436046509are current non-terminal evidence; predecessor receipts do not transfer.Traceability: MITRE CWE-732 and NIST SP 800-53 Rev. 5 AC-6/AC-6(1), as recorded in #246. Keep Draft and stacked. No self/model approval, routine bypass, force update, mutable dependency, or foreign-owner source copy may be promoted as release authority.