Skip to content

State scripts/agent_policy.py's Trusted Inputs So Reviewers Stop Re-Deriving Them #3894

Closed

Description

@ptr727

Copilot raised the same trusted-input hardening findings against scripts/agent_policy.py on #3891 and again on #3892:

  • symlinked write targets in the checkout
  • an origin on a host other than GitHub
  • an inherited GIT_DIR / GIT_CONFIG*
  • a .coderabbit.yaml or .pr_agent.toml whose sections are not a mapping or table

Each was declined under GOVERNANCE.md "Trust Boundaries and Hardening Effort". The code does not say what it assumes, so each later round re-derives the boundary. The maintainer chose on 2026-11-05 to state it.

Done when:

  • scripts/agent_policy.py's module docstring names its inputs and their class. The registry, the hub default, the --checkout tree, its origin, and the target repository's default-branch files are trusted, as maintainer-controlled. The failure mode on a malformed trusted file is a loud nonzero exit, not a guard.
  • The hub's OPERATIONS.md "Configuration Layout" lists those inputs among its trusted boundaries, per that GOVERNANCE.md section's "A repository names its own boundaries" bullet.

Activity

  1. added
    prose
    on Nov 6, 2026
  2. ptr727 commented on Nov 13, 2026

    @ptr727
    OwnerAuthor

    Backlog burndown claim (round 5, group 4, away mode): branch burndown/agent-policy-inputs.

    Issue: #3894.

    Predicted file set:

    • scripts/agent_policy.py
    • tests/test_agent_policy.py
    • OPERATIONS.md
    • docs/repo-config.md
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

    prose

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions