forked from mirrors/kingfisher
feat(asana): add v2 tokens, split v1/v0 patterns
Signed-off-by: Luke Young <bored-engineer@users.noreply.github.com>
This commit is contained in:
parent
2bf9e54ad9
commit
ac02fb2783
1 changed files with 99 additions and 15 deletions
|
|
@ -43,30 +43,24 @@ rules:
|
|||
- "asana :'20c2F0d03201af478ca1aBE9515A1A4FEfb'"
|
||||
- ASANA_PAT = 1234567890abcdef1234567890abcdef12
|
||||
|
||||
- name: Asana OAuth / Personal Access Token
|
||||
- name: Asana OAuth / Personal Access Token (Legacy)
|
||||
id: kingfisher.asana.3
|
||||
pattern: |
|
||||
(?xi)
|
||||
\b
|
||||
(?xi)
|
||||
\b
|
||||
asana
|
||||
(?:.|[\n\r]){0,64}?
|
||||
\b
|
||||
(
|
||||
[01]{1,}
|
||||
\/
|
||||
[0-9a-f]{16,32}
|
||||
(?:
|
||||
:
|
||||
[a-z0-9]{32,64}
|
||||
)?
|
||||
)
|
||||
\b
|
||||
(
|
||||
0/
|
||||
[a-f0-9]{32}
|
||||
)
|
||||
\b
|
||||
pattern_requirements:
|
||||
min_digits: 4
|
||||
min_entropy: 3.5
|
||||
confidence: medium
|
||||
examples:
|
||||
- asana_pat = 1/1248440223456784:d3d7e52e5c4a5d4c9bc424d2d882324d
|
||||
- asana token = 0/d6f1e29e5b4b4d8c9bb419b2d882154d
|
||||
categories:
|
||||
- api
|
||||
|
|
@ -89,4 +83,94 @@ rules:
|
|||
- 'data:'
|
||||
- email
|
||||
- name
|
||||
url: https://app.asana.com/api/1.0/users/me
|
||||
url: https://app.asana.com/api/1.0/users/me
|
||||
|
||||
- name: Asana OAuth / Personal Access Token (V1)
|
||||
id: kingfisher.asana.4
|
||||
pattern: |
|
||||
(?xi)
|
||||
\b
|
||||
asana
|
||||
(?:.|[\n\r]){0,64}?
|
||||
\b
|
||||
(
|
||||
1/
|
||||
[0-9]{14,16}
|
||||
:
|
||||
[a-f0-9]{32}
|
||||
)
|
||||
\b
|
||||
pattern_requirements:
|
||||
min_digits: 4
|
||||
min_entropy: 3.5
|
||||
confidence: medium
|
||||
examples:
|
||||
- asana_pat = 1/1248440223456784:d3d7e52e5c4a5d4c9bc424d2d882324d
|
||||
categories:
|
||||
- api
|
||||
- key
|
||||
- asana
|
||||
references:
|
||||
- https://developers.asana.com/docs/personal-access-token#example
|
||||
validation:
|
||||
type: Http
|
||||
content:
|
||||
request:
|
||||
headers:
|
||||
Authorization: Bearer {{ TOKEN }}
|
||||
method: GET
|
||||
response_matcher:
|
||||
- report_response: true
|
||||
|
||||
- name: Asana OAuth / Personal Access Token (V2)
|
||||
id: kingfisher.asana.5
|
||||
pattern: |
|
||||
(?xi)
|
||||
\b
|
||||
asana
|
||||
(?:.|[\n\r]){0,64}?
|
||||
\b
|
||||
(
|
||||
2/
|
||||
[0-9]{16}
|
||||
/
|
||||
[0-9]{16}
|
||||
:
|
||||
[a-f0-9]{32}
|
||||
)
|
||||
\b
|
||||
pattern_requirements:
|
||||
min_digits: 4
|
||||
min_entropy: 3.5
|
||||
confidence: medium
|
||||
examples:
|
||||
- ASANA_TOKEN = "2/1208779539612523/1208824174176866:99d6decca6ce6ef503bf0c5bca554e1a"
|
||||
categories:
|
||||
- api
|
||||
- key
|
||||
- asana
|
||||
references:
|
||||
- https://developers.asana.com/docs/personal-access-token#example
|
||||
validation:
|
||||
type: Http
|
||||
content:
|
||||
request:
|
||||
headers:
|
||||
Authorization: Bearer {{ TOKEN }}
|
||||
method: GET
|
||||
response_matcher:
|
||||
- report_response: true
|
||||
- match_all_words: true
|
||||
type: WordMatch
|
||||
words:
|
||||
- 'data:'
|
||||
- email
|
||||
- name
|
||||
url: https://app.asana.com/api/1.0/users/me
|
||||
- match_all_words: true
|
||||
type: WordMatch
|
||||
words:
|
||||
- 'data:'
|
||||
- email
|
||||
- name
|
||||
url: https://app.asana.com/api/1.0/users/me
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue