forked from mirrors/kingfisher
83 lines
2.2 KiB
YAML
83 lines
2.2 KiB
YAML
rules:
|
|
- name: Razorpay API Key
|
|
id: kingfisher.razorpay.1
|
|
pattern: |
|
|
(?xi)
|
|
\b
|
|
(
|
|
rzp_live_[A-Za-z0-9]{14}
|
|
)
|
|
\b
|
|
confidence: medium
|
|
min_entropy: 3.0
|
|
examples:
|
|
- 'RAZORPAY_KEY_ID=rzp_live_dK4mHQs3eAHUtq'
|
|
- 'razorpay_key: rzp_live_Nf2tP7xB5qWvYd'
|
|
- 'var razorpay = new Razorpay("rzp_live_8mQ2kLpV3xRbYe", secret);'
|
|
references:
|
|
- https://razorpay.com/docs/api/
|
|
depends_on_rule:
|
|
- rule_id: kingfisher.razorpay.3
|
|
variable: RAZORPAY_SECRET
|
|
validation:
|
|
type: Http
|
|
content:
|
|
request:
|
|
method: GET
|
|
url: "https://api.razorpay.com/v1/payments"
|
|
headers:
|
|
Authorization: "Basic {{ TOKEN | append: ':' | append: RAZORPAY_SECRET | b64enc }}"
|
|
response_matcher:
|
|
- report_response: true
|
|
- type: StatusMatch
|
|
status: [200]
|
|
|
|
- name: Razorpay Test API Key
|
|
id: kingfisher.razorpay.2
|
|
pattern: |
|
|
(?xi)
|
|
\b
|
|
(
|
|
rzp_test_[A-Za-z0-9]{14}
|
|
)
|
|
\b
|
|
confidence: medium
|
|
min_entropy: 3.0
|
|
examples:
|
|
- 'RAZORPAY_KEY_ID=rzp_test_7mHnQ3pL9xKvYw'
|
|
- 'razorpay_key: rzp_test_Bf5tR8xC2qEvMd'
|
|
references:
|
|
- https://razorpay.com/docs/api/
|
|
depends_on_rule:
|
|
- rule_id: kingfisher.razorpay.3
|
|
variable: RAZORPAY_SECRET
|
|
validation:
|
|
type: Http
|
|
content:
|
|
request:
|
|
method: GET
|
|
url: "https://api.razorpay.com/v1/payments"
|
|
headers:
|
|
Authorization: "Basic {{ TOKEN | append: ':' | append: RAZORPAY_SECRET | b64enc }}"
|
|
response_matcher:
|
|
- report_response: true
|
|
- type: StatusMatch
|
|
status: [200]
|
|
|
|
- name: Razorpay API Secret
|
|
id: kingfisher.razorpay.3
|
|
visible: false
|
|
pattern: |
|
|
(?xi)
|
|
\b
|
|
(?:RAZORPAY[_-]?(?:KEY[_-]?)?SECRET|razorpay[_-]?(?:key[_-]?)?secret|key_secret)
|
|
\s* [=:] \s* ["']?
|
|
(
|
|
[A-Za-z0-9]{20,64}
|
|
)
|
|
["']?
|
|
confidence: medium
|
|
min_entropy: 3.0
|
|
examples:
|
|
- 'RAZORPAY_KEY_SECRET=abc123def456ghi789jkl012mno345pq'
|
|
- 'razorpay_secret: "Abc123Def456Ghi789Jkl012Mno345Pq"'
|