Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .ci/benchmark.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
META MD5 79f7c389d3a6a9e6563bf51e2947114b
DATA MD5 608e4361530d18b37b38832a965f3626
DATA: 16995334 interested lines. MARKUP: 63711 items
META MD5 52ca58b257084ebd44d6e812e0552686
DATA MD5 9890b532c1403b6546dde09bf66f7a41
DATA: 16995334 interested lines. MARKUP: 63710 items
FileType FileNumber ValidLines Positives Negatives
--------------- ------------ ------------ ----------- -----------
684 567150 136 695
Expand Down Expand Up @@ -116,7 +116,7 @@ FileType FileNumber ValidLines Positives Negatives
.markdown 38 5862 69 41
.markerb 3 12 3
.marko 1 21 2
.md 768 181113 1041 2459
.md 768 181113 1040 2462
.mdx 3 549 8
.mjml 1 18 1
.mjs 19 4119 91 113
Expand Down Expand Up @@ -179,7 +179,7 @@ FileType FileNumber ValidLines Positives Negatives
.rsa 3 3 3
.rsc 1 691 1
.rsp 18 7739 24 37
.rst 91 34736 87 346
.rst 91 34736 88 345
.rules 1 6 3
.sample 2 25 3 8
.sbt 3 570 7
Expand Down Expand Up @@ -225,13 +225,13 @@ FileType FileNumber ValidLines Positives Negatives
.yml 560 56585 1897 1386
.zsh 6 872 11
.zsh-theme 1 97 1
TOTAL: 11361 16995334 17154 53613
TOTAL: 11361 16995334 17154 53615
credsweeper result_cnt : 0, lost_cnt : 0, true_cnt : 0, false_cnt : 0
Rules Positives Negatives Reported TP FP TN FN FPR FNR ACC PRC RCL F1
------------------------------ ----------- ----------- ---------- ---- ---- ----- ----- -------- -------- -------- ----- -------- ----
API 242 4002 0 0 4002 242 0.000000 1.000000 0.942978 0.000000
AWS Client ID 205 19 0 0 19 205 0.000000 1.000000 0.084821 0.000000
AWS Multi 83 12 0 0 12 83 0.000000 1.000000 0.126316 0.000000
AWS Client ID 205 20 0 0 20 205 0.000000 1.000000 0.088889 0.000000
AWS Multi 83 11 0 0 11 83 0.000000 1.000000 0.117021 0.000000
AWS S3 Bucket 92 0 0 0 0 92 1.000000 0.000000 0.000000
Akamai Credentials 6 2 0 0 2 6 0.000000 1.000000 0.250000 0.000000
Anthropic API Key 1 0 0 0 0 1 1.000000 0.000000 0.000000
Expand All @@ -243,7 +243,7 @@ Basic Authorization 688 555 0 0
Bearer Authorization 182 0 0 0 0 182 1.000000 0.000000 0.000000
CMD ConvertTo-SecureString 13 4 0 0 4 13 0.000000 1.000000 0.235294 0.000000
CMD Password 33 137 0 0 137 33 0.000000 1.000000 0.805882 0.000000
CMD Secret 1 17 0 0 17 1 0.000000 1.000000 0.944444 0.000000
CMD Secret 1 18 0 0 18 1 0.000000 1.000000 0.947368 0.000000
CMD Token 6 2 0 0 2 6 0.000000 1.000000 0.250000 0.000000
CURL User Password 7 2 0 0 2 7 0.000000 1.000000 0.222222 0.000000
Credential 96 597 0 0 597 96 0.000000 1.000000 0.861472 0.000000
Expand All @@ -269,7 +269,7 @@ Nonce 131 109 0 0
OTP / 2FA Secret 64 3 0 0 3 64 0.000000 1.000000 0.044776 0.000000
Other 0 20 0 0 20 0 0.000000 1.000000
PEM Private Key 1154 72 0 0 72 1154 0.000000 1.000000 0.058728 0.000000
Password 2595 11363 0 0 11363 2595 0.000000 1.000000 0.814085 0.000000
Password 2595 11364 0 0 11364 2595 0.000000 1.000000 0.814098 0.000000
Perplexity API Key 2 0 0 0 0 2 1.000000 0.000000 0.000000
Postman Credentials 2 0 0 0 0 2 1.000000 0.000000 0.000000
SQL Password 44 14 0 0 14 44 0.000000 1.000000 0.241379 0.000000
Expand All @@ -283,4 +283,4 @@ Token 1140 5268 0 0
Twilio Credentials 30 39 0 0 39 30 0.000000 1.000000 0.565217 0.000000
URL Credentials 225 401 0 0 401 225 0.000000 1.000000 0.640575 0.000000
UUID 2517 3716 0 0 3716 2517 0.000000 1.000000 0.596182 0.000000
17154 53613 0 0 0 53613 17154 0.000000 1.000000 0.757599 0.000000
17154 53615 0 0 0 53615 17154 0.000000 1.000000 0.757606 0.000000
5 changes: 5 additions & 0 deletions constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,10 @@
LABEL_FALSE = 'F'
LABEL_OTHER = 'X'
ALLOWED_LABELS = (LABEL_TRUE, LABEL_FALSE, LABEL_OTHER)
# the category is used to markup undecided values
OTHER_CATEGORY = "Other"
PRIVATE_KEY_CATEGORY = "PEM Private Key"
# the rules may have multiline markup and should be skipped for single line obfuscation
MULTI_PATTERN_RULES = ("AWS Multi", "Google Multi", "JWK")
# the rules may be multiline
MULTI_LINE_RULES = MULTI_PATTERN_RULES + (OTHER_CATEGORY, PRIVATE_KEY_CATEGORY)
12 changes: 6 additions & 6 deletions meta/0f133e09.csv
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Id,FileID,Domain,RepoName,FilePath,LineStart,LineEnd,GroundTruth,ValueStart,Valu
5357,08232d99,GitHub,0f133e09,data/0f133e09/test/08232d99.txt,10,10,F,,,,,Auth
5363,6ca54b76,GitHub,0f133e09,data/0f133e09/test/6ca54b76.txt,10,10,F,,,,,Auth
5364,3f1b2dc0,GitHub,0f133e09,data/0f133e09/test/3f1b2dc0.txt,10,10,F,,,,,Key
5527,c65fed08,GitHub,0f133e09,data/0f133e09/test/c65fed08.txt,9,9,T,394,414,,AWS Client ID,AWS Client ID
105527,c65fed08,GitHub,0f133e09,data/0f133e09/test/c65fed08.txt,9,9,T,394,457,,AWS Client ID,Credential
5527,c65fed08,GitHub,0f133e09,data/0f133e09/test/c65fed08.txt,9,9,T,394,414,,aws-id,AWS Client ID
105527,c65fed08,GitHub,0f133e09,data/0f133e09/test/c65fed08.txt,9,9,T,394,457,,aws-id,Credential
136762,c65fed08,GitHub,0f133e09,data/0f133e09/test/c65fed08.txt,9,9,T,292,321,,info,AWS S3 Bucket
6626,7814ce17,GitHub,0f133e09,data/0f133e09/test/7814ce17.txt,21,21,F,,,,,Auth
6635,e925013a,GitHub,0f133e09,data/0f133e09/test/e925013a.txt,10,10,F,,,,,Key
Expand Down Expand Up @@ -189,8 +189,8 @@ Id,FileID,Domain,RepoName,FilePath,LineStart,LineEnd,GroundTruth,ValueStart,Valu
17680,0ccc1045,GitHub,0f133e09,data/0f133e09/_/0ccc1045.py,1464,1464,F,,,,,Password
20168,d27bec8f,GitHub,0f133e09,data/0f133e09/test/d27bec8f.py,64,64,F,,,,,Auth
20171,d27bec8f,GitHub,0f133e09,data/0f133e09/test/d27bec8f.py,54,54,F,,,,,Auth
20172,03cdc0c5,GitHub,0f133e09,data/0f133e09/test/03cdc0c5.py,95,95,T,123,143,,AWS Client ID,AWS Client ID
1020172,03cdc0c5,GitHub,0f133e09,data/0f133e09/test/03cdc0c5.py,95,95,T,123,186,,AWS Client ID,Credential
20172,03cdc0c5,GitHub,0f133e09,data/0f133e09/test/03cdc0c5.py,95,95,T,123,143,,aws-id,AWS Client ID
1020172,03cdc0c5,GitHub,0f133e09,data/0f133e09/test/03cdc0c5.py,95,95,T,123,186,,aws-id,Credential
136761,03cdc0c5,GitHub,0f133e09,data/0f133e09/test/03cdc0c5.py,95,95,T,123,313,,,AWS Multi
136760,03cdc0c5,GitHub,0f133e09,data/0f133e09/test/03cdc0c5.py,95,95,T,21,50,,info,AWS S3 Bucket
20680,0ccc1045,GitHub,0f133e09,data/0f133e09/_/0ccc1045.py,1236,1236,F,,,,,Key
Expand All @@ -208,8 +208,8 @@ Id,FileID,Domain,RepoName,FilePath,LineStart,LineEnd,GroundTruth,ValueStart,Valu
30876,d4a67d01,GitHub,0f133e09,data/0f133e09/test/d4a67d01.txt,10,10,F,57,437,,,Key
30877,d6019b5f,GitHub,0f133e09,data/0f133e09/test/d6019b5f.txt,10,10,F,74,454,,,Key
30883,7400d4c5,GitHub,0f133e09,data/0f133e09/test/7400d4c5.txt,10,10,F,9,389,,,Key
30951,c65fed08,GitHub,0f133e09,data/0f133e09/test/c65fed08.txt,10,10,T,110,130,,AWS Client ID,AWS Client ID
1030951,c65fed08,GitHub,0f133e09,data/0f133e09/test/c65fed08.txt,10,10,T,110,173,,AWS Client ID,Credential
30951,c65fed08,GitHub,0f133e09,data/0f133e09/test/c65fed08.txt,10,10,T,110,130,,aws-id,AWS Client ID
1030951,c65fed08,GitHub,0f133e09,data/0f133e09/test/c65fed08.txt,10,10,T,110,173,,aws-id,Credential
136763,c65fed08,GitHub,0f133e09,data/0f133e09/test/c65fed08.txt,10,10,T,8,37,,info,AWS S3 Bucket
31365,b3356305,GitHub,0f133e09,data/0f133e09/_/b3356305.md,35,35,X,65,77,,,Token
34714,cd589265,GitHub,0f133e09,data/0f133e09/test/cd589265.py,281,281,X,29,37,,,Password
Expand Down
2 changes: 1 addition & 1 deletion meta/2df212a2.csv
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Id,FileID,Domain,RepoName,FilePath,LineStart,LineEnd,GroundTruth,ValueStart,Valu
30545,6ac10689,GitHub,2df212a2,data/2df212a2/docs/6ac10689.rst,120,120,X,26,30,,,Password:Key:Secret
30547,6ac10689,GitHub,2df212a2,data/2df212a2/docs/6ac10689.rst,124,124,X,26,30,,,Password:Key:Secret
30548,7824b4fc,GitHub,2df212a2,data/2df212a2/test/7824b4fc.py,28,28,X,62,68,,,Credential:Key
31125,6f0a498c,GitHub,2df212a2,data/2df212a2/example/6f0a498c.rst,25,25,T,14,34,,AWS Client ID,AWS Client ID:Key
31125,6f0a498c,GitHub,2df212a2,data/2df212a2/example/6f0a498c.rst,25,25,T,14,34,,aws-id,AWS Client ID:Key
32689,7824b4fc,GitHub,2df212a2,data/2df212a2/test/7824b4fc.py,68,68,X,35,40,,,Token
32690,6ac10689,GitHub,2df212a2,data/2df212a2/docs/6ac10689.rst,62,62,F,26,39,,,Token
36742,7824b4fc,GitHub,2df212a2,data/2df212a2/test/7824b4fc.py,93,93,F,30,35,,,Token
Expand Down
2 changes: 1 addition & 1 deletion meta/39def7b4.csv
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ Id,FileID,Domain,RepoName,FilePath,LineStart,LineEnd,GroundTruth,ValueStart,Valu
42648,c21b3945,GitHub,39def7b4,data/39def7b4/spec/api/record/c21b3945.rb,123,123,F,,,,,API
42649,52694a75,GitHub,39def7b4,data/39def7b4/spec/api/52694a75.rb,46,46,T,33,51,,,Credential
42650,52694a75,GitHub,39def7b4,data/39def7b4/spec/api/52694a75.rb,52,52,T,33,51,,,Credential
42652,d97e408a,GitHub,39def7b4,data/39def7b4/spec/d97e408a.rb,119,119,T,58,78,,AWS Client ID,AWS Client ID
42652,d97e408a,GitHub,39def7b4,data/39def7b4/spec/d97e408a.rb,119,119,T,58,78,,aws-id,AWS Client ID
1238213,d97e408a,GitHub,39def7b4,data/39def7b4/spec/d97e408a.rb,119,119,T,58,119,,,Credential:AWS Multi
42659,f149a41a,GitHub,39def7b4,data/39def7b4/spec/f149a41a.rb,127,127,F,29,63,,,Credential:Twilio Credentials
42661,1f4966ff,GitHub,39def7b4,data/39def7b4/spec/api/1f4966ff.rb,33,33,F,,,,,API
Expand Down
2 changes: 1 addition & 1 deletion meta/653a7746.csv
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Id,FileID,Domain,RepoName,FilePath,LineStart,LineEnd,GroundTruth,ValueStart,Valu
87118,814ea24d,GitHub,653a7746,data/653a7746/test/secret/814ea24d.bats,175,175,F,29,36,,,Key
87119,814ea24d,GitHub,653a7746,data/653a7746/test/secret/814ea24d.bats,176,176,F,32,39,,,Secret:Key
87120,814ea24d,GitHub,653a7746,data/653a7746/test/secret/814ea24d.bats,177,177,F,27,37,,,Key
109493,7b3ed02b,GitHub,653a7746,data/653a7746/_/7b3ed02b.rst,168,168,F,47,67,,,AWS Multi
109493,7b3ed02b,GitHub,653a7746,data/653a7746/_/7b3ed02b.rst,168,168,T,47,67,,aws-id,AWS Client ID
1520903,d79cda41,GitHub,653a7746,data/653a7746/secret/d79cda41.1,673,673,F,,,,,CMD Secret
1520904,d79cda41,GitHub,653a7746,data/653a7746/secret/d79cda41.1,677,677,F,,,,,CMD Secret
1520905,d79cda41,GitHub,653a7746,data/653a7746/secret/d79cda41.1,682,682,F,,,,,CMD Secret
Expand Down
Loading
Loading