Government of Alberta uses Claude to find and fix cybersecurity vulnerabilities across government systems
Key Points
- 466M lines scanned in 20 hours
- Automated fixes, tests, and rebuilds using Claude Code
- Continuous red/blue agent security reviews (95 controls)
Summary
The Government of Alberta used Claude Code (Opus and Sonnet models) to run a large-scale security and modernization program across ~1,280 applications and ~3,400 repositories. In 2025 the team scanned 466 million lines of code in ~20 hours, automatically produced fixes, tests, and rebuilds, and deployed a continuous AI-driven security review pipeline with human engineer approval.
Key Points
- Scope: scanned 466 million lines across ~3,400 repositories in ~20 hours (estimated manual effort ≈ 6.5 years).
- Tools & models:
Claude CodewithOpusandSonnet, and ~50 autonomous agents built on the Claude Agent SDK. - Two-stage scan: rules-engine repository scan to flag patterns, then targeted file-and-line citations for developer verification.
- Automated remediation: generated patches, wrote tests when missing, and rebuilt legacy components in modern languages when necessary.
- Continuous review: red-team (external probe) and blue-team (defense assessment) agents run in the development pipeline, checking ~95 security controls and producing remediation plans.
- Governance: every patch was reviewed and approved by Ministry engineers before deployment; technical white papers and an industry day document the approach.
- Training & adoption: Alberta AI Academy trained thousands of employees and 10,000+ public users to scale practices.
- Roadmap: plans to consolidate 185 legacy production apps into ~16 modern reusable applications to lower cost and complexity.
Practical recommendations for engineers
- Run a fast rules-based scan first, then a focused agent review that cites exact files/lines to minimize triage overhead.
- Require test generation alongside any automated patch to validate safety before deploy.
- Implement red/blue agent checks mapped to an explicit control list and enforce human sign-off for production changes.
- Publish playbooks and white papers to accelerate adoption across teams and agencies.