Skip to content

Commit

Permalink
feat: Add detection rules for Google Cloud Service Account Key
Browse files Browse the repository at this point in the history
Signed-off-by: HAHWUL <[email protected]>
  • Loading branch information
hahwul committed Nov 11, 2024
1 parent 2dad14a commit bef8549
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions secrets/gcloud-service-account-key.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
id: gcloud-service-account-key
info:
name: Detect GCLOUD_SERVICE_ACCOUNT_KEY
author: [hahwul]
severity: critical
description: Detects the presence of Google Cloud Service Account Key JSON in the code
reference: ['']
matchers-condition: or
matchers:
- type: word
patterns: [GOOGLE_APPLICATION_CREDENTIALS, GOOGLE_CLOUD_KEY]
condition: or
- type: regex
patterns:
- '"type"\s*:\s*"service_account"'
- '"project_id"\s*:\s*"[^"]+"'
- '"private_key_id"\s*:\s*"[^"]+"'
- '"private_key"\s*:\s*"[^"]+"'
condition: or
category: secret
techs: ['*']

0 comments on commit bef8549

Please sign in to comment.