DEV Community

Casey Chen
Casey Chen

Posted on

Reviewing Agent PRs That Touch CI Workflow Files

A workflow change can alter who is allowed to publish an artifact even when every application test remains green. Review an agent’s CI diff as a change to job authority as well as a change to build behavior. Begin with the reason given in the pull request. A request to improve a test report should have an explanation if it also changes the release job.

Read the effective job, including inherited settings

Write one row for each affected job with its event, executable source revision, runner, token permissions, environment and outputs. Compare the base and candidate revisions. Include referenced local and reusable workflows because a small caller can delegate most of its behavior elsewhere.

Review question Evidence to record
Who may start the job? Event and branch conditions, repository settings, and any approval requirement
Which instructions run? Reviewed revision of scripts and actions, including code in reusable workflows
What authority is available? The minimal token permissions for this job and the named environment, if any
Who can consume the output? Artifact scope and any later publishing or deployment job

An absent workflow permission block directs the reviewer to repository and organization defaults. Verify what is actually effective for the event and repository. A full action commit SHA fixes the code revision being requested; separately check that the revision belongs to the expected project and that it was reviewed. Pinning alone cannot say that the selected action is trustworthy. GitHub Actions secure use reference

Test the review on paper

Consider an illustrative change that adds a timing report to a test job and grants that job permission to publish releases. Which part of the timing report requires release authority? If the answer is none, keep the report and remove the new grant. If a distinct release job really does need publication rights, attach the permission there and identify who approves that path.

Next, trace one normal PR and one release event using the documented configuration. The PR path should use the resources required to evaluate a contribution. The release path should consume trusted artifacts under its declared approval policy. Where settings are unavailable to the reviewer, list that as missing evidence instead of inferring the privileges from a green build.

Record approvals, policy changes, and outstanding checks beside the corresponding job. Application tests still matter, but reviewing this table asks a different practical question: what can the job do once those tests have run?

This article was created with AI assistance.

Top comments (0)