Skip to content

Commit

Permalink
Added Onfido API token detection to recognize this type of secrets (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasan1 authored Sep 3, 2024
1 parent e2df3ce commit c2c65f6
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
8 changes: 8 additions & 0 deletions generic/secrets/security/detected-onfido-live-api-token.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# ruleid: detected-onfido-live-api-token
api_live.abc123ABC-_.abc123ABC-_abc123ABC-_abc123ABC-

# ruleid: detected-onfido-live-api-token
api_live_ca.abc123ABC-_.abc123ABC-_abc123ABC-_abc123ABC-

# ruleid: detected-onfido-live-api-token
api_live_us.abc123ABC-_.abc123ABC-_abc123ABC-_abc123ABC-
20 changes: 20 additions & 0 deletions generic/secrets/security/detected-onfido-live-api-token.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
rules:
- id: detected-onfido-live-api-token
pattern-regex: (?:api_live(?:_[a-zA-Z]{2})?\.[a-zA-Z0-9-_]{11}\.[-_a-zA-Z0-9]{32})
languages: [regex]
message: Onfido live API Token detected
severity: ERROR
metadata:
cwe:
- 'CWE-798: Use of Hard-coded Credentials'
category: security
technology:
- secrets
- onfido
confidence: HIGH
references:
- https://documentation.onfido.com/api/latest/#api-tokens
subcategory:
- audit
likelihood: HIGH
impact: HIGH

0 comments on commit c2c65f6

Please sign in to comment.