kingfisher/crates/kingfisher-rules/data/rules/pdflayer.yml

47 lines
1.4 KiB
YAML

rules:
- name: PdfLayer API Key
id: kingfisher.pdflayer.1
pattern: |
(?xi)
(?:
\b
pdflayer
(?:.|[\n\r]){0,32}?
(?:SECRET|PRIVATE|ACCESS|KEY|TOKEN|ACCESS_KEY)
(?:.|[\n\r]){0,32}?
|
\bapi\.pdflayer\.com/api/convert\?[^ \t\r\n"'<>]*\baccess_key\s*=\s*
)
\b
(
[a-z0-9]{32}
)
\b
pattern_requirements:
min_digits: 2
min_entropy: 3.5
confidence: medium
examples:
- pdflayer_key=1234567890abcdef1234567890abcdef
- PDFLAYER_ACCESS_TOKEN=abcdef1234567890abcdef1234567890
- pdflayer_secret=0123456789abcdef0123456789abcdef
references:
- https://pdflayer.com/documentation
validation:
type: Http
content:
request:
method: GET
# Use Sandbox Mode (test=1) and intentionally omit document_url/document_html.
# This yields a JSON error response (instead of generating a PDF) and should not count
# toward monthly API volume per docs.
url: "https://api.pdflayer.com/api/convert?access_key={{ TOKEN }}&test=1"
headers:
Accept: application/json
response_matcher:
- report_response: true
- type: StatusMatch
status: [200]
- type: WordMatch
negative: true
words: ['"invalid_access_key"', '"missing_access_key"']