Skip to content

Commit 0e5a9d7

Browse files
committed
Fixed some offsets in test data
1 parent a334644 commit 0e5a9d7

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

configs/patterns.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ patterns:
173173
- "Only allows for only single-quoted passwords, to better control false positives"
174174
test:
175175
data: "password: 'password123'"
176-
start_offset: 10
177-
end_offset: 21
176+
start_offset: 11
177+
end_offset: 22
178178

179179

180180
- name: YAML hardcoded passwords (double quoted strings)
@@ -201,8 +201,8 @@ patterns:
201201
data: |
202202
password: "password123"
203203
204-
start_offset: 10
205-
end_offset: 21
204+
start_offset: 11
205+
end_offset: 22
206206

207207

208208
- name: YAML hardcoded passwords (multiline strings)
@@ -228,7 +228,8 @@ patterns:
228228
password123
229229
andsomemore
230230
other_field: foo
231-
# TODO: add start_offset and end_offset
231+
start_offset: 14
232+
end_offset: 56
232233

233234

234235
- name: GitHub Actions SHA Checker

vendors/patterns.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ patterns:
556556
data: |
557557
google_api_key: 0123456789abcdef0123456789abcdef01234567
558558
start_offset: 16
559-
end_offset: -1
559+
end_offset: 56
560560

561561
- name: OpenStack password/API key
562562
type: openstack_password_or_key
@@ -610,7 +610,7 @@ patterns:
610610
data: |
611611
key: service:my-apollo-service:aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
612612
start_offset: 5
613-
end_offset: 71
613+
end_offset: 67
614614

615615
- name: ClickUp API key
616616
type: clickup_api_key
@@ -658,7 +658,7 @@ patterns:
658658
data: |
659659
jenkins_api_token="0123456789abcdef0123456789abcdef"
660660
start_offset: 19
661-
end_offset: 52
661+
end_offset: 51
662662

663663
- name: AWS S3 presigned URL
664664
type: aws_s3_presigned_url
@@ -673,6 +673,8 @@ patterns:
673673
test:
674674
data: |
675675
https://snort-org-site.s3.amazonaws.com/production/document_files/files/000/000/596/original/Rules_Writers_Guide_to_Snort_3_Rules.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIXACIED2SPMSC7GA%2F20211011%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20211011T165700Z&X-Amz-Expires=172800&X-Amz-SignedHeaders=host&X-Amz-Signature=1d5134d3a84db0f7b1ece95fcf98387a0cc32ff131b6c95e6a80d3cd4b616a5c
676+
start_offset: 0
677+
end_offset: 402
676678

677679
- name: Azure Access Key (legacy format)
678680
type: azure_access_key_legacy

0 commit comments

Comments
 (0)