kingfisher/crates/kingfisher-rules/data/rules/artifactory.yml
Mick Grove ab811c8bcf v1.87.0
2026-03-09 20:11:58 -07:00

102 lines
2.8 KiB
YAML

rules:
- name: Artifactory Access Token
id: kingfisher.artifactory.1
pattern: |
(?x)
\b
(
AKCp[A-Za-z0-9]{68,70}
)
\b
pattern_requirements:
min_digits: 2
min_uppercase: 1
min_lowercase: 1
min_entropy: 3.5
confidence: high
examples:
- |
export HOMEBREW_ARTIFACTORY_API_TOKEN=AKCp8igrDNFerC357m4422e4tmu7xB983QLPxJhKFcSMfoux2RFvp8rc4jC8t9ncdmYCMFD8W
export HOMEBREW_ARTIFACTORY_API_USER=kashorn
- 'jfrog rt dl --url=http://localhost:8071/artifactory --apikey=AKCp2WXX7SDvcsmny528sSDnaB3zACkNQoRcD8D1WmxhMV9gk6Wp8mVWC8bh38kJQbXagUT8Z generic-local/hello.txt'
validation:
type: Http
content:
request:
headers:
X-JFrog-Art-Api: '{{ TOKEN }}'
method: GET
response_matcher:
- report_response: true
- status:
- 200
type: StatusMatch
- type: JsonValid
url: https://{{ JFROGURL }}/artifactory/api/repositories
references:
- https://jfrog.com/help/r/jfrog-platform-administration-documentation/access-tokens
- https://jfrog.com/help/r/jfrog-rest-apis/authentication
depends_on_rule:
- rule_id: "kingfisher.artifactory.2"
variable: JFROGURL
- name: Artifactory JFrog URL
id: kingfisher.artifactory.2
pattern: |
(?xi)
\b
(
[a-z0-9]
(?:
[a-z0-9\-]{0,61}
[a-z0-9]
)?
\.jfrog\.io
)
\b
min_entropy: 2.5
visible: false
confidence: medium
examples:
- mycompany.jfrog.io
- my-company-name.jfrog.io
- a.jfrog.io
references:
- https://jfrog.com/help/r/jfrog-rest-apis/artifactory-rest-apis
- name: Artifactory Identity Reference Token
id: kingfisher.artifactory.3
pattern: |
(?x)
\b
(
cmVmd[A-Za-z0-9]{59}
)
\b
pattern_requirements:
min_digits: 2
min_uppercase: 1
min_lowercase: 1
min_entropy: 3.5
confidence: medium
examples:
- export HOMEBREW_ARTIFACTORY_API_REFERENCE_TOKEN=cmVmdawqkxT1EE4bMepW0zmTVmBYYdv264WVufgipR9CQAW2xwSnY4CTKap8H5u0
validation:
type: Http
content:
request:
headers:
Authorization: 'Bearer {{ TOKEN }}'
method: GET
response_matcher:
- report_response: true
- status:
- 200
type: StatusMatch
url: https://{{ JFROGURL }}/artifactory/api/repositories
references:
- https://jfrog.com/help/r/jfrog-platform-administration-documentation/access-tokens
- https://jfrog.com/help/r/jfrog-rest-apis/authentication
depends_on_rule:
- rule_id: "kingfisher.artifactory.2"
variable: JFROGURL