# Review Kubernetes permissions before merge

Use your coding agent and Anyshift Graph MCP to compare Helm and Kubernetes RBAC changes with live roles, bindings and workloads before merge.

Source: https://anyshift.io/for-agents/use-cases/review-kubernetes-permissions

## Before starting

- Your coding agent needs the diff and relevant Helm or RBAC files. Anyshift needs access to the affected Kubernetes environment. Reuse existing connections; a PR URL alone does not give your agent access to a private repository.

[Connect Graph MCP](https://docs.anyshift.io/pages/product/integration/graph_mcp#connect)

## Workflow

- A pull request extends a shared access policy to compute clusters. Check whether the rendered roles and bindings would grant access beyond each team’s namespace.

1. Read the proposed permissions and resolve the affected cluster and namespaces.

2. Compare the proposed bindings with the observed roles, subjects and workloads.

3. Report the permission at risk, the supporting evidence and a narrower scope to consider.

## Set up

- Connect the affected cluster: Reuse its Kubernetes integration, or install the read-only collector with Helm.

- Give your coding agent graph access: Connect Graph MCP or use the plugin that already includes it. Provide the diff and rendered manifests through your agent’s existing repository access.

[Connect the affected cluster](https://docs.anyshift.io/pages/integration/kubernetes)

[Give your coding agent graph access](https://docs.anyshift.io/pages/product/graph-api/pull-request-blast-radius#what-you-need)

## Evidence

- Proposed permissions: Give your agent the diff and rendered Helm or RBAC manifests. It needs repository access separately from Anyshift.

- Live roles and bindings: The Kubernetes integration captures Roles, RoleBindings, ClusterRoles and ClusterRoleBindings, alongside workloads and namespaces.

- Read access: Graph MCP retrieves evidence for your coding agent. It does not apply the proposed policy or submit a GitHub review.

[Proposed permissions](https://docs.anyshift.io/pages/product/graph-api/pull-request-blast-radius#what-you-need)

[Live roles and bindings](https://docs.anyshift.io/pages/iac/kubernetes_live#what-the-agent-captures)

[Read access](https://docs.anyshift.io/pages/product/integration/graph_mcp)

## Expected result

- If the policy grants cluster-wide secret access, flag the cross-namespace risk. If the rendered policy or affected cluster is unavailable, say what could not be verified.

- This is an evidence-based review, not a simulation of an unapplied policy. Existing bindings, the rendered manifest and collection timestamps matter. Missing evidence cannot establish that a change is safe.

## What should a permission review show?

- The proposed verbs and resources, the affected roles and bindings, their subjects and namespace scope, and workloads linked to those identities when available. Each finding should cite the diff and recorded production evidence, including collection timestamps and missing relationships.

## Does this prove a policy is safe?

- No. Graph MCP supplies observed evidence; your coding agent interprets the diff. It does not simulate the Kubernetes authorization engine or guarantee that every escalation path has been checked. An incomplete review must say what remains unverified.

## Review with your coding agent

```text
Review this diff: [paste diff or accessible PR URL]. Use Anyshift Graph MCP to check the impact on [cluster / namespace]. Call describe_schema and confirm the intended project with list_projects before reading resources. Resolve exact resource IDs, then inspect the relevant RBAC relationships. Report any added access to secrets or workloads outside the intended namespace, cite the evidence and name missing context. Do not apply changes or publish a review.
```

[Connection instructions](https://docs.anyshift.io/pages/product/integration/graph_mcp#connect)

[Read the PR review guide](https://docs.anyshift.io/pages/product/graph-api/pull-request-blast-radius)

## Usage

- With your own coding agent, graph reads use your Graph query allowance; your AI provider bills its model usage separately.

[Pricing](https://anyshift.io/for-agents/pricing)

