Skip to content

security(admission): reject direct-pip Requires-Python compatibility override #331

Description

@seonghobae

Refs #128 / canonical Agent Artifact Admission #129.

Verified Wardnet-local gap

Fresh exact review of #129@22c50d886d9e2ed8f5c376bacff8ec1f8a0d5b6c shows direct pip/pip3 install admission has explicit fail-closed handling for caller-selected package-manager safety overrides such as --break-system-packages, but no classifier for canonical --ignore-requires-python.

Pinned upstream authority pypa/pip@2b28a816d043826f2ba10ff1d22ec3d94d2ed7c5 defines --ignore-requires-python as a store_true install option whose documented behavior is “Ignore the Requires-Python information.” The install command passes options.ignore_requires_python into resolver construction. An otherwise reviewed exact artifact can therefore ask pip to disregard publisher-declared Python compatibility without changing Wardnet's approved ecosystem/name/version/registry/owner/hash coordinate.

This is a caller-selected structured-argv safety override at Wardnet's Agent Artifact Admission boundary. Wardnet must not inspect the effective interpreter, infer runtime compatibility, execute pip, or duplicate quarantine-sandbox-runtime environment/isolation authority. Runtime compatibility remains the executor/runtime owner's responsibility; Wardnet only refuses an explicit request to disable the package manager's metadata safety check.

Hostile realistic RED

Create one serialized Draft child from exact current #129. Keep production source byte-identical in the RED commit. Hosted CI must pass checkout/toolchain/format and reach a semantic assertion proving, for both pip and pip3:

  • the exact reviewed baseline install remains Allow;
  • adding canonical --ignore-requires-python must be required to return Block with stable ReasonCode::MissingSafetyFlag;
  • the denial is causal to this selector, not incidental artifact-cardinality or command-path rejection.

Do not claim parser abbreviations in this slice. Canonical exact spelling is sufficient to prove and repair the current gap; any accepted prefix language requires separate pinned-parser verification.

Minimum causal GREEN

Add one narrow direct-pip classifier for canonical --ignore-requires-python and wire it to MissingSafetyFlag. Preserve uv and other installer grammars independently; do not inspect environment variables, interpreter state, package metadata, wheels/sdists, or executor filesystem/network state.

Preserve all existing artifact/manifest/hash/dependency/source/trust/proxy/config/keyring/output/cache/install-root/system-package/mutation/audit invariants.

Completion gate

Require one unchanged child head with formatting, locked workspace tests, strict Clippy, Fuzz, Security Scan, SAST and then-live review/thread evidence before ordinary expected-head integration into still-exact #129. After integration, reacquire #129 exact-current evidence. Keep this issue open until #129 or a verified complete successor carrying the full RED/GREEN/test/doc/evidence delta reaches protected main.

No force update, destructive rebase, self/model approval, routine administrator bypass, gate weakening, mutable foreign dependency, source copy, cross-service SQL, ambient-runtime inference, or predecessor-evidence promotion.

TRACEABILITY

  • Python Packaging Authority. (2026). pip command options, commit 2b28a816d043826f2ba10ff1d22ec3d94d2ed7c5: --ignore-requires-python explicitly disables Requires-Python compatibility enforcement.
  • Python Packaging Authority. (2025). Core Metadata Specifications — Requires-Python: Requires-Python declares the Python version requirement for a distribution.
  • National Institute of Standards and Technology. (2022). Secure Software Development Framework (SSDF) Version 1.1 (NIST SP 800-218), PW.8 secure-by-default verification context.
  • MITRE. (2025). CWE-693: Protection Mechanism Failure.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions