Skip to content

[Security] Gate AI-agent package installs from untrusted llms.txt and web instructions #128

Description

@seonghobae

Threat and owned outcome

AI coding agents can turn untrusted llms.txt, README fragments, issue comments, retrieved documents, or tool output into package-install or execution requests. Wardnet owns a Rust Agent Artifact Admission Controller that evaluates a structured install intent before package installation or code execution. Source text never establishes package ownership, trust, artifact identity, install-mutation authority, network authority, or execution authority.

Wardnet owns security-artifact admission policy and evidence only. quarantine-sandbox-runtime owns hostile execution/isolation and cleanup; contextual-orchestrator owns Agent/LLM orchestration; EgressWeave owns reusable outbound-policy authority; AppGuardrail owns static package/security analysis; Noema activation remains a separate governed authority. Wardnet consumes released/versioned ports/ACLs and does not copy those implementations.

Required contract

  • structured argv only; no shell command string;
  • fail closed unless each requested artifact matches reviewed ecosystem/name/version/HTTPS registry/owner/SHA-256 identity;
  • executable family must match artifact ecosystem;
  • direct download-and-execute, shell/runtime inline execution, unknown registries, unpinned artifacts and malformed provenance are blocked;
  • package-manager source, destination, workspace, configuration, registry trust/TLS, lifecycle hooks, install overwrite/tracking semantics, build output, platform/distribution identity, build variant and dependency-cardinality are admitted capabilities, not ignored syntax;
  • an exact reviewed artifact set cannot be widened by resolver-selected transitive artifacts; supported direct PyPI install paths require explicit dependency-cardinality safety;
  • required safety flags are interpreted semantically, including contradictory Boolean spellings, parser-equivalent shorthands and attached short-option values;
  • remote instruction sources require HTTPS plus content SHA-256;
  • v0.1 binds loopback only; remote exposure stays behind authenticated TLS/mTLS infrastructure;
  • admin credential bootstrap stays in the credential registry boundary;
  • append audit evidence before returning allow; audit failure becomes fail-closed service failure;
  • audit normalized URI/command hash/artifact coordinates/decision/reason only, never secrets or raw command text;
  • policy denials return a successful admission result with decision=block, distinct from transport failure.

Current owning candidate — 2026-09-06 KST

PR #129 remains the sole owning candidate at exact db921e7f855f52870b23de52a4e23f11ff996644 on protected main@5829a0f08d78de464dd24393ce5d0f25fba9d126. It remains Draft; source churn is not authorized merely to reacquire delegated control-plane evidence.

The candidate retains the complete Agent Artifact Admission surface: exact artifact/source/registry identity, executable/ecosystem matching, undeclared operand/source/destination/config/workspace rejection, lifecycle/integrity bypass rejection, Cargo/OCI/Podman/PyPI/npm-family variant binding, transitive dependency-cardinality constraints, audit-before-allow, fail-closed remote-instruction provenance, and the PyPI hash-mode repair that rejects contradictory --no-require-hashes when required hash checking is part of the reviewed intent. An admission receipt still does not prove retrieved-byte integrity; downstream execution must independently bind installed/executed bytes or equivalent immutable provenance to the reviewed digest.

Exact-current evidence

Four current repository/security lanes have completed successfully on unchanged exact db921e7f855f52870b23de52a4e23f11ff996644:

  • CI 33977431401success;
  • Fuzz 33977431523success;
  • Security Scan 33977431400success;
  • SAST Semgrep 33977431547success.

CodeQL PR 33977431418 is terminal failure, but current logs isolate a central delegated-verdict defect rather than a Wardnet source failure. Compatibility job 101354139576 acquired Ubuntu 24.04, confirmed OIDC, exchanged a repository-scoped app token successfully, and successfully sent the exact repository_dispatch for PR #129/head db921e7.... It then intentionally failed closed with VERDICT_STATE=pending, requiring the central dispatch workflow to publish authenticated terminal context codeql-dispatch/actions to this exact SHA and wake/re-run the same required job. Fresh combined commit status still contains no such terminal delegated status.

The exact current specimen and RED/GREEN acceptance have been advanced on central owner path ContextualWisdomLab/.github#712 (latest Wardnet #129 handoff comment 5555244181). GREEN there requires correlation of the dispatched (repository, PR, head SHA, language, required run/job) payload to its central run, exact target checkout, authenticated terminal status publication by the designated app identity, and a bounded rerun/wake of only the failed required job. Preserve the four existing GREEN lanes; do not create a no-op source commit, broad rerun storm, predecessor verdict, or gate weakening.

Context Fabric / EA and release authority

Wardnet does not modify context-graph-contracts or enterprise-architecture-core source/PR state. Provider-neutral artifact/evidence/activation grammar remains context-graph-contracts#27 owner work and architecture adoption/risk/provenance projection remains enterprise-architecture-core#45 owner work. Package-manager argv and Wardnet reason codes are not Shared Kernel or authoritative EA facts.

Fresh release inventory for both context-graph-contracts and enterprise-architecture-core remains empty, and both still have open owner stacks. No mutable foreign head is production authority. Wardnet consumes only released/versioned compatible owner contracts and fails closed when required release/schema/provenance/conformance is absent or unverifiable.

Live organization ruleset 18156473 still requires one generic approving review with no required reviewer/team, central required workflows, resolved review threads, deletion/non-fast-forward protection, and exposes OrganizationAdmin/always bypass. .github#772 owns the solo-maintainer governance repair. Self-approval, model/bot-as-human approval, routine bypass, force push, gate weakening and predecessor evidence reuse remain forbidden.

Completion gate

Close only after #129 or a verified successor preserving every unique implementation/test/fixture/contract/evidence delta reaches protected main; the unchanged integration candidate has terminal current repository/security/coverage/package/SBOM/provenance/review/governance evidence; retrieved bytes or equivalent provenance are independently verified before execution; and released Context Fabric/consumer boundaries preserve the separate authorities above. Feature-branch allow evidence is not a release or runtime-execution authorization.

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

    enhancementNew feature or requestpriority: highHigh-priority or P1 worktype: featureNew or expanded product capability

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions