forked from mirrors/kingfisher
69 lines
1.9 KiB
YAML
69 lines
1.9 KiB
YAML
rules:
|
|
- name: Confluence Data Center Personal Access Token
|
|
id: kingfisher.confluence.1
|
|
pattern: |
|
|
(?x)
|
|
(?i:confluence|wiki)
|
|
(?:.|[\n\r]){0,16}?
|
|
\b
|
|
(
|
|
[MNO][A-Za-z0-9+/]{15}
|
|
O[g-v]
|
|
[A-Za-z0-9+/]{26}
|
|
)
|
|
pattern_requirements:
|
|
min_digits: 2
|
|
min_uppercase: 1
|
|
min_lowercase: 1
|
|
min_entropy: 4.0
|
|
confidence: medium
|
|
examples:
|
|
- 'confluence_pat: "MjQzMjkzMDQyNTI1OgTGWAoKFZTh/Is7cl+cdAI0Lbxo"'
|
|
- 'wiki_PAT=MDgxODgyOTYwNTA5OkFSuEyq1mtrLTVNGAPyka+/Vyfv'
|
|
references:
|
|
- https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html
|
|
- https://developer.atlassian.com/server/confluence/confluence-server-rest-api/
|
|
validation:
|
|
type: Http
|
|
content:
|
|
request:
|
|
headers:
|
|
Accept: application/json
|
|
Authorization: Bearer {{ TOKEN }}
|
|
method: GET
|
|
response_matcher:
|
|
- report_response: true
|
|
- status:
|
|
- 200
|
|
type: StatusMatch
|
|
- type: JsonValid
|
|
- type: WordMatch
|
|
words:
|
|
- '"type":"known"'
|
|
url: '{{ CONFLUENCE_BASE_URL }}/rest/api/user/current'
|
|
depends_on_rule:
|
|
- rule_id: kingfisher.confluence.2
|
|
variable: CONFLUENCEDCDOMAIN
|
|
|
|
- name: Confluence Data Center Domain
|
|
id: kingfisher.confluence.2
|
|
pattern: |
|
|
(?xi)
|
|
(?:https?://)?
|
|
\b
|
|
(
|
|
(?:[a-z0-9-]+\.){0,16}
|
|
(?:wiki|confluence)[a-z0-9-]*
|
|
\.[a-z0-9.-]{2,64}
|
|
(?::\d{2,5})?
|
|
)
|
|
\b
|
|
min_entropy: 2.5
|
|
visible: false
|
|
confidence: medium
|
|
examples:
|
|
- wiki.corp.mongodb.com
|
|
- confluence.example.com
|
|
- https://wiki-staging.corp.internal:8443
|
|
references:
|
|
- https://confluence.atlassian.com/doc/confluence-server-documentation-135922.html
|