Claude Code for defensive security engineering

Review an owned infrastructure change, turn approved policy into tests, and write a runbook a teammate can verify.

Read the expected access policy beside the plan

Anthropic’s security account describes reviewing proposed Terraform changes and turning operational context into runbooks. In this illustrative defensive review, a storage change should allow one reporting service to read an internal bucket. Give Claude Code the local plan, the proposed service identity and the approved access rule. Use a sanitized plan with secrets removed.

Anthropic’s account of the team’s workflow

Ask Claude to document the policy differences

Review the plan as a proposed change and keep the work to local artifacts and defensive tests. Give the reviewer a clear record of what is permitted.

Code
Review this saved Terraform plan against the approved bucket access policy. Identify changes to resource exposure, service identities and permissions. Cite the plan resource and intended requirement for each concern. Propose the smallest configuration change or approval question. Do not apply the plan or contact a deployed service.

Turn the agreed access rule into an offline check

Create a fixture that shows the reporting service has read access, a fixture that shows an unrelated identity is absent from the policy, and a check for inadvertent write access. Verify how a policy reviewer can see the outcome in the test report. Have the responsible owner confirm that the fixtures reflect the agreement.

Finish with a runbook and a separate approval decision

Document where to find a saved plan, how to compare it with the approved access rule, who receives findings, and what to attach to a review. Have a teammate follow the steps on a sanitized plan and compare the findings they produce. Keep the plan and the approval record available for the release owner.

Related reading

Claude Code for Data Infrastructure

Claude Code for Product Development

Claude Code for Inference Engineering