File tree Expand file tree Collapse file tree 8 files changed +105
-5
lines changed
Expand file tree Collapse file tree 8 files changed +105
-5
lines changed Original file line number Diff line number Diff line change 209209 - code
210210 - doc
211211
212+ - name : Akamai Credential
213+ severity : high
214+ confidence : strong
215+ type : pattern
216+ values :
217+ - (?P<value>akab-[0-9a-z]{16}-[0-9a-z]{16})(?!\.[0-9a-z-]{1,80}\.akamaiapis\.net)
218+ filter_type : GeneralPattern
219+ required_substrings :
220+ - akab-
221+ min_line_len : 38
222+ target :
223+ - code
224+ - doc
225+
212226- name : AWS Client ID
213227 severity : high
214228 confidence : moderate
Original file line number Diff line number Diff line change 11from pathlib import Path
22
33# total number of files in test samples
4- SAMPLES_FILES_COUNT = 162
4+ SAMPLES_FILES_COUNT = 163
55
66# the lowest value of ML threshold is used to display possible lowest values
77NEGLIGIBLE_ML_THRESHOLD = 0.0001
88
99# credentials count after scan with negligible ML threshold
10- SAMPLES_CRED_COUNT = 504
10+ SAMPLES_CRED_COUNT = 505
1111
1212# Number of filtered credentials with ML
1313ML_FILTERED = 22
1616SAMPLES_POST_CRED_COUNT = SAMPLES_CRED_COUNT - ML_FILTERED
1717
1818# with option --doc & NEGLIGIBLE_ML_THRESHOLD
19- SAMPLES_IN_DOC = 855
19+ SAMPLES_IN_DOC = 856
2020
2121# archived credentials that are not found without --depth
2222SAMPLES_IN_DEEP_1 = SAMPLES_POST_CRED_COUNT + 129
Original file line number Diff line number Diff line change 177177 }
178178 ]
179179 },
180+ {
181+ "rule": "Akamai Credential",
182+ "severity": "high",
183+ "confidence": "strong",
184+ "ml_probability": null,
185+ "line_data_list": [
186+ {
187+ "line": "akab-tblc7jkffv3wfxh3-h5stbzeswb3v4kj3",
188+ "line_num": 1,
189+ "path": "./tests/samples/akamai",
190+ "info": "FILE:./tests/samples/akamai|RAW",
191+ "variable": null,
192+ "variable_start": -2,
193+ "variable_end": -2,
194+ "value": "akab-tblc7jkffv3wfxh3-h5stbzeswb3v4kj3",
195+ "value_start": 0,
196+ "value_end": 38,
197+ "entropy": 4.15557
198+ }
199+ ]
200+ },
180201 {
181202 "rule": "API",
182203 "severity": "medium",
Original file line number Diff line number Diff line change 4141 }
4242 ]
4343 },
44+ {
45+ "rule": "Akamai Credential",
46+ "severity": "high",
47+ "confidence": "strong",
48+ "ml_probability": null,
49+ "line_data_list": [
50+ {
51+ "line": "akab-tblc7jkffv3wfxh3-h5stbzeswb3v4kj3",
52+ "line_num": 1,
53+ "path": "./tests/samples/akamai",
54+ "info": "FILE:./tests/samples/akamai|RAW",
55+ "variable": null,
56+ "variable_start": -2,
57+ "variable_end": -2,
58+ "value": "akab-tblc7jkffv3wfxh3-h5stbzeswb3v4kj3",
59+ "value_start": 0,
60+ "value_end": 38,
61+ "entropy": 4.15557
62+ }
63+ ]
64+ },
4465 {
4566 "rule": "Atlassian Old PAT token",
4667 "severity": "info",
Original file line number Diff line number Diff line change 4141 }
4242 ]
4343 },
44+ {
45+ "rule" : " Akamai Credential" ,
46+ "severity" : " high" ,
47+ "confidence" : " strong" ,
48+ "ml_probability" : null ,
49+ "line_data_list" : [
50+ {
51+ "line" : " akab-tblc7jkffv3wfxh3-h5stbzeswb3v4kj3" ,
52+ "line_num" : 1 ,
53+ "path" : " ./tests/samples/akamai" ,
54+ "info" : " " ,
55+ "variable" : null ,
56+ "variable_start" : -2 ,
57+ "variable_end" : -2 ,
58+ "value" : " akab-tblc7jkffv3wfxh3-h5stbzeswb3v4kj3" ,
59+ "value_start" : 0 ,
60+ "value_end" : 38 ,
61+ "entropy" : 4.15557
62+ }
63+ ]
64+ },
4465 {
4566 "rule" : " API" ,
4667 "severity" : " medium" ,
Original file line number Diff line number Diff line change 4141 }
4242 ]
4343 },
44+ {
45+ "rule" : " Akamai Credential" ,
46+ "severity" : " high" ,
47+ "confidence" : " strong" ,
48+ "ml_probability" : null ,
49+ "line_data_list" : [
50+ {
51+ "line" : " akab-tblc7jkffv3wfxh3-h5stbzeswb3v4kj3" ,
52+ "line_num" : 1 ,
53+ "path" : " ./tests/samples/akamai" ,
54+ "info" : " " ,
55+ "variable" : null ,
56+ "variable_start" : -2 ,
57+ "variable_end" : -2 ,
58+ "value" : " akab-tblc7jkffv3wfxh3-h5stbzeswb3v4kj3" ,
59+ "value_start" : 0 ,
60+ "value_end" : 38 ,
61+ "entropy" : 4.15557
62+ }
63+ ]
64+ },
4465 {
4566 "rule" : " API" ,
4667 "severity" : " medium" ,
Original file line number Diff line number Diff line change 1+ akab-tblc7jkffv3wfxh3-h5stbzeswb3v4kj3
2+ F: akab-h5stbzeswb3v4kj3-tblc7jkffv3wfxh3.drain.akamaiapis.net
Original file line number Diff line number Diff line change @@ -426,7 +426,7 @@ def test_multi_jobs_p(self) -> None:
426426 mocked_logger .assert_has_calls ([
427427 call (f"Scan in { 7 } processes for { SAMPLES_FILES_COUNT - 17 } providers" ),
428428 call (f"Grouping { SAMPLES_CRED_COUNT + 5 } candidates" ),
429- call (f"Run ML Validation for { SAMPLES_CRED_COUNT - 156 } groups" ),
429+ call (f"Run ML Validation for { SAMPLES_CRED_COUNT - 157 } groups" ),
430430 ANY , # initial ML with various arguments, cannot predict
431431 call (f"Exporting { SAMPLES_POST_CRED_COUNT } credentials" ),
432432 ])
@@ -440,7 +440,7 @@ def test_multi_jobs_p(self) -> None:
440440 mocked_logger .assert_has_calls ([
441441 call (f"Scan in { 7 } processes for { SAMPLES_FILES_COUNT - 17 } providers" ),
442442 call (f"Grouping { SAMPLES_CRED_COUNT + 5 } candidates" ),
443- call (f"Run ML Validation for { SAMPLES_CRED_COUNT - 156 } groups" ),
443+ call (f"Run ML Validation for { SAMPLES_CRED_COUNT - 157 } groups" ),
444444 # no init
445445 call (f"Exporting { SAMPLES_POST_CRED_COUNT } credentials" ),
446446 ])
You can’t perform that action at this time.
0 commit comments