A Dependency and CI Permissions Packet Before Agent-Written PRs Merge
In Short
A dependency and CI permissions packet gives reviewers one place to examine what an agent-written pull request changes, which privileges it needs, and which risks remain unresolved. Combine workflow inspection, secrets detection, SAST, and dependency declaration checks against the same commit. Then ask a named maintainer to decide whether the evidence supports merging.
The workflow below is a proposed review procedure, not a claim that these tools have been tested together. Its deliverable is a small evidence folder attached to the PR: commit identifiers, scanner versions, redacted findings, remediation notes, and an explicit decision.
Who this is for
This is for maintainers reviewing agent changes to application code, dependency manifests, or CI configuration. It is particularly useful when a seemingly small feature also edits a workflow, introduces an SDK, or adds a new environment variable. Those changes can cross several ownership boundaries in one diff.
Start with one repository and one PR. Use an isolated checkout without production credentials. Choose approved scanner releases before examining the proposed code, and keep the review configuration outside the PR author’s control. An agent can assemble the packet; repository owners still decide which permissions and residual risks are acceptable.
Starter workflow
- Freeze the review target. Record the trusted base SHA, proposed head SHA, changed files, and intended behavior. Collect workflow files, manifests, lockfiles, and relevant application paths. If the head changes later, mark the packet outdated and rerun the affected checks. A green result for an earlier revision does not describe the new diff.
- Trace CI permissions before running PR code. Read workflow triggers, job permissions, checkout behavior, reusable workflows, and secret access. Draw the boundary between untrusted input and privileged execution. Zizmor’s official repository describes checks for template injection, credential leakage, excessive permissions, and misleading references. Use its findings to guide inspection; document why every requested write permission is necessary.
- Inspect broader configuration changes. Use Ship Safe to supplement the workflow review. Its official documentation includes CI/CD checks and a trusted-base versus PR-head comparison. Separate newly introduced findings from existing debt. Select local scanning settings deliberately, and inspect data-flow options before enabling provider-backed analysis. Keep automated fixes outside this evidence-collection pass.
- Scan for secrets with controlled output. Betterleaks is a secrets scanner with documented detection and optional credential validation capabilities. Record the exact release and scope: working tree, history, or both. Keep raw results restricted and share redacted evidence. Do not enable credential validation or revocation as an incidental scan step; those operations need a separate decision.
- Review code and dependency declarations. Bearer CLI uses static analysis to identify security and privacy risks in source code. Follow each relevant finding to its input, data handling, and sensitive operation. For Python projects, deptry compares imported modules with declared dependencies and should run in the project’s dedicated environment. Keep dependency declaration correctness separate from package vulnerability and provenance review.
| Packet layer | Evidence to retain | Reviewer question |
|---|---|---|
| CI permissions | Trigger, token scope, trusted input boundary | Can untrusted code reach privileged execution? |
| Secrets | Redacted finding, path, scan scope | Was a credential exposed? |
| Code risks | Rule, source location, inspected data path | Can the reported behavior occur? |
| Dependencies | Manifest diff, import mapping, lockfile change | Are runtime requirements explicit? |
| Human review | Owner, disposition, final head SHA | Is this exact revision ready? |
For example, suppose an agent adds a Python client and edits its release workflow. The packet should show the new import and dependency declaration, explain any lockfile change, identify the workflow’s token permissions, and record whether the new logging path exposes sensitive values. Resolve those questions before treating ordinary unit-test success as sufficient release evidence.
Recommended ASE skills
- Audit GitHub Actions with Zizmor: start the workflow privilege and supply-chain inspection.
- Ship Safe configuration review: examine the broader CI/CD and permission surface.
- Betterleaks secrets scanner: collect scoped, redacted secret-detection evidence.
- Bearer CLI SAST: inspect security and privacy findings in supported source code.
- Audit Python dependency declarations: compare imports with declared project requirements.
What to watch
Record failures and exclusions as clearly as findings. A scanner that cannot parse the project or exits early leaves an evidence gap. Unsupported languages, ignored paths, missing history, and disabled rules belong in the packet. Deduplicate overlapping reports without discarding their source locations.
For each unresolved issue, record severity, introduced-or-existing status, owner, proposed fix, and disposition. Suggested dispositions are fix before merge, accepted with rationale, or needs investigation. Never treat an unexplained suppression as a completed review. Recheck the final head after remediation, then attach the maintainer’s decision and any follow-up deadline.
FAQ
Does a clean packet prove a PR is secure?
No. It documents the checks performed and the evidence reviewed for a specific revision. Static checks have coverage limits. Behavioral tests and human review remain necessary, especially around authentication, deployment, and sensitive data handling.
Should every existing finding block the change?
Use a trusted baseline to distinguish existing debt from introduced risk. Keep existing issues visible with owners. Block according to repository policy, and investigate whether the PR makes an old issue reachable or increases its impact.
What should the first adoption step be?
Build one packet manually for an upcoming PR. Check whether another maintainer can reproduce its conclusions from the recorded versions, scope, and revisions. Automate repeatable collection after that trial, while keeping merge approval explicit.
