New: Access Diff now reviews Terraform pull requests on GitHub

Newsroom / Product /

Access Diff now reviews Terraform pull requests on GitHub

When a pull request changes Terraform or OpenTofu on GitHub, AccessRoot now reports the access it would create, remove or change as a check next to your other checks.

A Terraform plan tells you which resources will change. It does not tell you who can reach what once the change is deployed. With the AccessRoot GitHub App installed, Access Diff now answers that on the pull request itself, as a check named AccessRoot / Access Diff, before anyone approves the merge.

What the check does

When a pull request changes Terraform or OpenTofu, AccessRoot reads the proposed plan and the relevant configuration. It resolves the roles, permissions and trust relationships being modified against the access model of your connected cloud accounts, then compares the proposed access with the access that exists today. The result is a list of added, removed and changed access paths, each tied to the code that causes it.

The check is a normal GitHub status check. Your repository rules decide whether it blocks a merge. If you want an unresolved finding to stop a pull request, make AccessRoot / Access Diff a required check in your branch protection rules. AccessRoot does not override your approval process.

What a reviewer sees

Take pull request #187 in halvorne/platform-infra, from the sample workspace. It changes infra/iam/data-access.tf and adds ci-deploy-role to the trust policy of data-maintenance-role. The checks list looks like this:

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

Both Terraform checks pass, because the configuration is valid and the plan shows one modified role. The AccessRoot check asks for action because ci-deploy-role already holds sts:AssumeRole, so the production write access of data-maintenance-role on the CustomerRecords table becomes reachable from the deployment pipeline. The permission on the table did not change. Who can reach it did.

The finding lists the identity, the resource, the permission and the reasons behind its priority, and it links to the Terraform file that introduced the path. In the sample, the recommended review is to confirm whether the deployment workflow needs data-maintenance-role at all. If it does not, narrow the trust policy in the same pull request. Push the commit, the analysis runs again, and the check changes from action to passed once no unintended path remains.

A finding describes what becomes reachable. It is not evidence that anyone used the access.

GitHub App scopes

The AccessRoot GitHub App requests three scopes:

contents: read
checks: write
pull requests: write

contents: read lets AccessRoot read your infrastructure code. checks: write lets it publish the access check. pull requests: write is the permission that opening a pull request needs, so it is only used for remediation, which stays off until you enable it for a repository. A repository can use Access Diff without ever allowing AccessRoot to open a pull request. The app never merges anything and has no way to change cloud IAM.

Set it up

  1. In Settings › Connections, choose GitHub under Source control and install the app on your organization.
  2. Select only the repositories that hold infrastructure code. You can add or remove repositories later, and each change is recorded in the audit log.
  3. Connect the cloud accounts those repositories deploy to, so there is a current access model to compare against.
  4. Keep running terraform plan or tofu plan on pull requests. AccessRoot reads the plan your pipeline already produces and does not run Terraform for you.

The GitHub guide covers the connection step by step, and the Access Diff guide explains how findings are structured and what to do with them. The GitHub integration page gives the product overview.

If you want to see the check on a pull request before connecting anything, book a demo.