test(security): prove global pip log authority causal evidence - #431
seonghobae merged 3 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughpip 전역 Changespip 전역 로그 옵션 지원
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant PipCommand
participant normalize_reviewed_direct_pip_global_options
participant ArtifactAdmission
PipCommand->>normalize_reviewed_direct_pip_global_options: 전역 --log 옵션과 경로 전달
normalize_reviewed_direct_pip_global_options->>ArtifactAdmission: 정규화된 --log=VALUE 전달
ArtifactAdmission-->>PipCommand: Block 및 alternate_install_root 결정 반환
Merge Risk: ⚪ Minimal · up to No actionable issue remains from the reviewed change. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Refs #270. Serialized child of canonical Agent Artifact Admission #129.
Finding
Exact parent
#129@951b3cb68621e4fbb8c6076d0b447b8481551b16already rejectspip install ... --log...as caller-selected filesystem write authority, but pip defines--log,--log-file, and--local-login its General Options and accepts them before command selection. The current Wardnet direct-pip global-option normalizer did not consume this reviewed option family, while the dedicated log classifier requiredinstallto be the first argument afterpip/pip3.As a result, a parser-valid request such as
pip --log /tmp/wardnet-pip.log install cwl-example==1.2.3 --require-hashes --no-deps --no-inputfailed closed generically, lost the causalalternate_install_rootevidence, and misclassified the consumed log path as artifact evidence. For a security evidence/policy product, generic rejection is not a sufficient successor to the specific write-authority evidence already promised by #270.Primary-source check:
pypa/pip@2b28a816d043826f2ba10ff1d22ec3d94d2ed7c5defines the log aliases incmdoptions.py;main_parser.pyinstallsgeneral_groupbefore command selection; pip'stests/unit/test_options.pyexplicitly exercisesmain(["--local-log", "path", "fake"])and the post-command equivalent.This stays inside Wardnet's pre-execution argv admission/evidence boundary. It does not duplicate filesystem isolation from quarantine-sandbox-runtime, outbound policy from EgressWeave, orchestration from contextual-orchestrator, or AppGuardrail logic.
Hostile RED
Test-only exact head
ea5e4994d7bee013178c04c7b9d6bfb0a0d3f9f6changed onlycrates/agent-artifact-admission/tests/pypi_log_output_authority_contract.rs; production source was byte-identical to the parent.Hosted CI
35031897218, rust job104592062846, passed checkout/toolchain/format and the existing workspace suite until the new hostile contract.valid_global_pip_log_options_remain_causal_write_authority_evidencethen failed semantically on parser-valid--log=/tmp/wardnet-pip.log, observing[ForbiddenCommand, ArtifactNotApproved]instead of causalalternate_install_rootwithout manufactured artifact evidence. Fuzz35031897252was terminal SUCCESS on the same test-only source head.The contract covers
pipandpip3, complete aliases, separated/attached values, and representative already-reviewed unambiguous prefixes in the valid pre-command position. It requires:Blockbefore execution;alternate_install_rootevidence;artifact_not_approvedfrom the log path consumed by pip option grammar;Minimum causal repair
Current exact repair head:
eedaa3fb46e89ce740c28269654235ba99c51912.The repair makes the already-reviewed pip log spelling predicate reusable by the existing direct-pip General Options normalization seam. Pre-command attached log values remain option tokens; separate log paths are attached only in the internal normalized policy copy so consumed option grammar cannot masquerade as an artifact operand. The submitted intent remains authoritative for command hashing/audit identity. No new parser, accepted log spelling, path authorization, foreign-owner runtime logic, dependency, or gate weakening was added.
Exact-head CI
35046405436and Fuzz35046405418have materialized for this repair head and are currently QUEUED. Keep Draft until the unchanged exact head reaches terminal GREEN and current review/thread evidence remains clear. Do not churn the source merely to redispatch queued jobs.No force update, destructive rebase, self/model approval, routine bypass, mutable sibling dependency, or protected-base source churn.
Summary by CodeRabbit
pip및pip3명령에서 전역 로그 옵션(--log등)을 올바르게 인식합니다.--log=값형식을 지원하며, 비어 있거나 유효하지 않은 값은 계속 안전하게 거부합니다.