Skip to content

Commit 59c5995

Browse files
authored
Version Up 1.14.0, Notion token (#798)
* Notion * doc fix * pkg upd
1 parent f646f46 commit 59c5995

File tree

13 files changed

+157
-13
lines changed

13 files changed

+157
-13
lines changed

.github/workflows/check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
run: |
9393
banner="$(python -m credsweeper --banner | head -1)"
9494
echo "banner = '${banner}'"
95-
if [ "CredSweeper 1.13.4 crc32:b78e43ec" != "${banner}" ]; then
95+
if [ "CredSweeper 1.14.0 crc32:a52f81a3" != "${banner}" ]; then
9696
echo "Update the check for '${banner}'"
9797
exit 1
9898
fi

SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
| Version | Supported |
66
|---------|--------------------|
7-
| 1.13.x | :white_check_mark: |
8-
| <1.13.x | :x: |
7+
| 1.14.x | :white_check_mark: |
8+
| <1.14.x | :x: |
99

1010
## Reporting a Vulnerability
1111

credsweeper/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@
2424
"__version__"
2525
]
2626

27-
__version__ = "1.13.4"
27+
__version__ = "1.14.0"

credsweeper/rules/config.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,6 +1272,22 @@
12721272
- code
12731273
- doc
12741274

1275+
- name: Notion Integration Token
1276+
severity: high
1277+
confidence: strong
1278+
type: pattern
1279+
values:
1280+
- (?:^|/|[^\\0-9A-Za-z+_-]|\\[0abfnrtv]|(?:%|\\x)[0-9A-Fa-f]{2}|\\[0-7]{3}|\\[Uu][0-9A-Fa-f]{4}|\x1B\[[0-9;]{0,80}m)(?P<value>ntn_[0-9]{9}[0-9A-Za-z_-]{36,255})
1281+
filter_type:
1282+
- ValuePatternCheck
1283+
- ValueEntropyBase64Check
1284+
required_substrings:
1285+
- ntn_
1286+
min_line_len: 50
1287+
target:
1288+
- code
1289+
- doc
1290+
12751291
- name: Hugging Face User Access Token
12761292
severity: high
12771293
confidence: moderate

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33

44
# build requirement
55
build==1.3.0
6-
hatchling==1.27.0
6+
hatchling==1.28.0
77
# 1.27.0 creates Metadata-Version: 2.4 which is not supported fully by publish github action
88
#hatchling==1.26.3
99
# check build
1010
twine==6.2.0
1111

1212
# Common requirements
1313
base58==2.1.1
14-
beautifulsoup4==4.14.2
14+
beautifulsoup4==4.14.3
1515
colorama==0.4.6
1616
cryptography==46.0.3
1717
GitPython==3.1.45

tests/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
from pathlib import Path
22

33
# total number of files in test samples
4-
SAMPLES_FILES_COUNT = 167
4+
SAMPLES_FILES_COUNT = 168
55

66
# the lowest value of ML threshold is used to display possible lowest values
77
NEGLIGIBLE_ML_THRESHOLD = 0.0001
88

99
# with option --doc & NEGLIGIBLE_ML_THRESHOLD
10-
SAMPLES_IN_DOC = 880
10+
SAMPLES_IN_DOC = 881
1111

1212
# credentials count after scan without filters and ML validations
13-
SAMPLES_REGEX_COUNT = 647
13+
SAMPLES_REGEX_COUNT = 649
1414

1515
# credentials count after scan with filters and without ML validation
16-
SAMPLES_FILTERED_COUNT = 537
16+
SAMPLES_FILTERED_COUNT = 538
1717

1818
# credentials count after default post-processing
19-
SAMPLES_POST_CRED_COUNT = 490
19+
SAMPLES_POST_CRED_COUNT = 491
2020

2121
# archived credentials that are not found without --depth
2222
SAMPLES_IN_DEEP_1 = SAMPLES_POST_CRED_COUNT + 138

tests/data/depth_3_pedantic.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8119,6 +8119,27 @@
81198119
}
81208120
]
81218121
},
8122+
{
8123+
"rule": "Notion Integration Token",
8124+
"severity": "high",
8125+
"confidence": "strong",
8126+
"ml_probability": null,
8127+
"line_data_list": [
8128+
{
8129+
"line": "ntn_123465789l62YMNJKXLKpjiCVEXbx4CBxkfprOA96Y15wZ",
8130+
"line_num": 1,
8131+
"path": "./tests/samples/notion",
8132+
"info": "FILE:./tests/samples/notion|RAW",
8133+
"variable": null,
8134+
"variable_start": -2,
8135+
"variable_end": -2,
8136+
"value": "ntn_123465789l62YMNJKXLKpjiCVEXbx4CBxkfprOA96Y15wZ",
8137+
"value_start": 0,
8138+
"value_end": 50,
8139+
"entropy": 5.06876
8140+
}
8141+
]
8142+
},
81228143
{
81238144
"rule": "NPM Token",
81248145
"severity": "high",

tests/data/doc.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15724,6 +15724,27 @@
1572415724
}
1572515725
]
1572615726
},
15727+
{
15728+
"rule": "Notion Integration Token",
15729+
"severity": "high",
15730+
"confidence": "strong",
15731+
"ml_probability": null,
15732+
"line_data_list": [
15733+
{
15734+
"line": "ntn_123465789l62YMNJKXLKpjiCVEXbx4CBxkfprOA96Y15wZ",
15735+
"line_num": 1,
15736+
"path": "./tests/samples/notion",
15737+
"info": "FILE:./tests/samples/notion|RAW",
15738+
"variable": null,
15739+
"variable_start": -2,
15740+
"variable_end": -2,
15741+
"value": "ntn_123465789l62YMNJKXLKpjiCVEXbx4CBxkfprOA96Y15wZ",
15742+
"value_start": 0,
15743+
"value_end": 50,
15744+
"entropy": 5.06876
15745+
}
15746+
]
15747+
},
1572715748
{
1572815749
"rule": "NPM Token",
1572915750
"severity": "high",

tests/data/no_filters_no_ml.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9257,6 +9257,48 @@
92579257
}
92589258
]
92599259
},
9260+
{
9261+
"rule": "Notion Integration Token",
9262+
"severity": "high",
9263+
"confidence": "strong",
9264+
"ml_probability": null,
9265+
"line_data_list": [
9266+
{
9267+
"line": "ntn_123465789l62YMNJKXLKpjiCVEXbx4CBxkfprOA96Y15wZ",
9268+
"line_num": 1,
9269+
"path": "./tests/samples/notion",
9270+
"info": "",
9271+
"variable": null,
9272+
"variable_start": -2,
9273+
"variable_end": -2,
9274+
"value": "ntn_123465789l62YMNJKXLKpjiCVEXbx4CBxkfprOA96Y15wZ",
9275+
"value_start": 0,
9276+
"value_end": 50,
9277+
"entropy": 5.06876
9278+
}
9279+
]
9280+
},
9281+
{
9282+
"rule": "Notion Integration Token",
9283+
"severity": "high",
9284+
"confidence": "strong",
9285+
"ml_probability": null,
9286+
"line_data_list": [
9287+
{
9288+
"line": "ntn_123465789l62EXAMPLEKpjiCVEXbx4CBxkftestEXAMPLE",
9289+
"line_num": 2,
9290+
"path": "./tests/samples/notion",
9291+
"info": "",
9292+
"variable": null,
9293+
"variable_start": -2,
9294+
"variable_end": -2,
9295+
"value": "ntn_123465789l62EXAMPLEKpjiCVEXbx4CBxkftestEXAMPLE",
9296+
"value_start": 0,
9297+
"value_end": 50,
9298+
"entropy": 4.82147
9299+
}
9300+
]
9301+
},
92609302
{
92619303
"rule": "NPM Token",
92629304
"severity": "high",

tests/data/no_ml.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8050,6 +8050,27 @@
80508050
}
80518051
]
80528052
},
8053+
{
8054+
"rule": "Notion Integration Token",
8055+
"severity": "high",
8056+
"confidence": "strong",
8057+
"ml_probability": null,
8058+
"line_data_list": [
8059+
{
8060+
"line": "ntn_123465789l62YMNJKXLKpjiCVEXbx4CBxkfprOA96Y15wZ",
8061+
"line_num": 1,
8062+
"path": "./tests/samples/notion",
8063+
"info": "",
8064+
"variable": null,
8065+
"variable_start": -2,
8066+
"variable_end": -2,
8067+
"value": "ntn_123465789l62YMNJKXLKpjiCVEXbx4CBxkfprOA96Y15wZ",
8068+
"value_start": 0,
8069+
"value_end": 50,
8070+
"entropy": 5.06876
8071+
}
8072+
]
8073+
},
80538074
{
80548075
"rule": "NPM Token",
80558076
"severity": "high",

0 commit comments

Comments
 (0)