Skip to content

feat(dlp): add Google API key and GCP service-account rules - #465

Merged
blitzcrieg1 merged 1 commit into
blitzcrieg1:masterfrom
surendraSinghKamboj:feat/dlp-gcp-credentials
Nov 25, 2026
Merged

blitzcrieg1 merged 1 commit into
blitzcrieg1:masterfrom
surendraSinghKamboj:feat/dlp-gcp-credentials

Conversation

@surendraSinghKamboj

Copy link
Copy Markdown
Contributor

What and why

Closes #3. The DLP pack had no Google coverage. This adds two rules to apps/orchestrator/agentmetry/policies/dlp/manifest.yaml, both category credentials, severity critical:

  • google_api_key: AIza + 35 chars of [0-9A-Za-z_-], not followed by another key character.
  • gcp_service_account_key: the "type": "service_account" marker of a service-account key file. The pattern allows the backslash-escaped quotes, since the scanner matches against json.dumps(arguments).

Tests in tests/test_dlp_scanner.py cover a fire and a near-miss for each rule (fake key, marked gitleaks:allow). The README collected-test count (2917 to 2921) and the CHANGELOG are updated.

Checks

  • python -m pytest -q: all pass here except test_mcp_proxy_packaged, which needs python -m venv and my machine lacks ensurepip
  • python -m ruff check agentmetry tests passes
  • Detection ruleset files untouched (DLP manifest only), so the fingerprint is unaffected
  • No real secrets in the diff

Also: the issue carries the bounty label but no amount. Could you confirm the payout and how you'd like it sent?

Adds google_api_key and gcp_service_account_key to the DLP manifest,
with fire and near-miss tests for each. Closes blitzcrieg1#3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add DLP rules for Google / GCP credentials

2 participants