AAK-SECRET-009: Google Cloud service account key file
- Severity
- HIGH
- Category
- Secret Exposure (
secret-exposure) - Scanner
agent_audit_kit/scanners/secret_exposure.py- Auto-fixable
- No.
- SARIF name
GcpServiceAccountKey
What it detects
A Google Cloud service account key JSON file was found in the project.
How to fix
Remove key file, use workload identity or environment-based auth.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-SECRET-009
Limitations
Reports a file with a .json extension, in any case, that contains "type": "service_account". The same key saved under another extension, such as .yml, is not reported. A file over 1,000,000 bytes is not read.
References
- OWASP MCP Top 10: MCP01:2025 (Token Mismanagement & Secret Exposure)
- OWASP Agentic Top 10: ASI03 (Identity and Privilege Abuse)
- Adversa AI MCP Top 25 (AAK-defined ids): ADV-TOKEN-11 (GCP Key Exposure)
- CSA AI Controls Matrix (AICM): DSP-17
All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-SECRET-009.md: the page then shows that text, with the registry reference appended under it.