New: Access Diff now reviews Terraform pull requests on GitHub

GitHub

Install the AccessRoot GitHub App on selected repositories to see access impact in pull requests and to review remediation as code.

The GitHub connection brings access analysis into the place where infrastructure changes are reviewed. AccessRoot reads the changes in the repositories you choose, reports an access check on each relevant pull request, and, if you turn it on, opens remediation pull requests. Approval and merging stay with your team.

What the connection does

Capability What it means Permission
Read pull requests and plans AccessRoot reads the proposed changes and Terraform or OpenTofu plans in the selected repositories On
Publish access checks AccessRoot reports its result as a check on the pull request, beside your other checks On
Open remediation pull requests AccessRoot opens a pull request with a targeted fix Separate, off until you enable it

Remediation is a separate permission by design. A repository can use Access Diff without ever allowing AccessRoot to open a pull request.

The AccessRoot GitHub App requests these scopes:

contents: read
checks: write
pull requests: write

contents: read lets AccessRoot read the infrastructure code. checks: write lets it publish the access check. pull requests: write is the permission pull request creation needs, which is why remediation pull requests are controlled separately in Settings › Connections.

Install the app

You need to be able to install a GitHub App on the organization, or to request it from an owner.

  1. Open Settings › Connections and choose GitHub under Source control.
  2. Install the AccessRoot GitHub App on your organization.
  3. Select the repositories to connect. Choose only the ones that hold infrastructure code, for example platform-infra, service-catalog and network-baseline.
  4. Return to Settings › Connections and confirm the connection reads, for example, “GitHub · halvorne” with “3 of 12 repositories selected”.

You can add or remove repositories later. Each scope change is recorded in Settings › Audit log.

What appears in a pull request

When a pull request changes infrastructure, the checks list includes AccessRoot / Access Diff next to your own checks. In the sample workspace, pull request #187 in halvorne/platform-infra shows:

Check Result
terraform validate passed
terraform plan passed
AccessRoot / Access Diff action

The Terraform checks pass because the configuration is valid. The AccessRoot check asks for action because the proposed trust policy lets ci-deploy-role assume data-maintenance-role. ci-deploy-role already has the matching sts:AssumeRole permission, so the production write access of the target role becomes reachable from the pipeline.

The finding linked from the check lists the affected identity, resource, permission and risk, and links them to the Terraform configuration behind the change. See Access Diff.

Respond to the check

  1. Open the finding and confirm whether the deployment workflow needs data-maintenance-role.
  2. If it does not, narrow the trust relationship in the same pull request. In the sample, the commit message is “Narrow trust to ops-maintenance-role”.
  3. Push the commit. AccessRoot runs the analysis again, and the check changes from action to passed once no unintended path remains.

Make the check required

The check is a normal GitHub status check. If you want a pull request with an unresolved access finding to be blocked, make AccessRoot / Access Diff a required status check in your branch protection rules. AccessRoot does not override your approval process. Your repository rules decide whether the check has to pass before a change can merge.

Remediation pull requests

For access that already exists in production, enable remediation pull request creation for the repository. AccessRoot then opens pull requests such as #192, “Restrict data-maintenance-role trust”, on a branch like accessroot/f-031-narrow-trust. The pull request goes through the same reviews and checks as any other change. AccessRoot does not merge it. See Remediation.

Change or remove the connection

Administrators can change the selected repositories, turn remediation off, or revoke the connection in Settings › Connections. Revoking stops new collection through the connection. See Workspace and audit and Permissions and data.