Skip to content

Commit

Permalink
Corrections (#170)
Browse files Browse the repository at this point in the history
* AWS Multi true

* corrections

* False cases

* 3 templates for true

* Fix for 35 symbols of secret
  • Loading branch information
babenek authored Sep 13, 2024
1 parent a89e689 commit 567e5cd
Show file tree
Hide file tree
Showing 12 changed files with 45 additions and 33 deletions.
36 changes: 18 additions & 18 deletions .ci/benchmark.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
META MD5 95bae3c3ad425d8f2073a121701a71d4
DATA MD5 4ecb4c9436742b6b281ce7977066099d
DATA: 16344639 interested lines. MARKUP: 62814 items
META MD5 f019321883fa9315afcd43fa085b5bf9
DATA MD5 de85ea0a77bd333be6a0d8422b835df4
DATA: 16344639 interested lines. MARKUP: 62823 items
FileType FileNumber ValidLines Positives Negatives Templates
--------------- ------------ ------------ ----------- ----------- -----------
194 28318 71 418 90
Expand Down Expand Up @@ -85,8 +85,8 @@ FileType FileNumber ValidLines Positives Negatives Templat
.java 621 134132 362 1363 172
.jenkinsfile 1 58 2 6
.jinja2 1 64 2
.js 659 536413 532 2496 331
.json 851 13046493 1076 10908 140
.js 659 536413 531 2497 331
.json 851 13046493 1077 10907 140
.jsp 13 3202 1 40
.jsx 7 857 19
.jwt 1 1 2
Expand All @@ -108,12 +108,12 @@ FileType FileNumber ValidLines Positives Negatives Templat
.lock 24 160912 142
.log 2 199 38 52
.lua 10 1924 37 3
.m 16 13358 14 159 3
.m 16 13358 19 161 3
.manifest 3 102 9 6
.markdown 3 139 3 1
.markerb 3 12 3
.marko 1 21 2
.md 674 149300 738 2389 621
.md 674 149300 740 2388 621
.mdx 3 549 7
.mjml 1 18 1
.mjs 22 4424 75 340
Expand All @@ -125,7 +125,7 @@ FileType FileNumber ValidLines Positives Negatives Templat
.mqh 1 1023 2
.msg 1 26644 1 1
.mysql 1 36 2
.ndjson 2 5006 75 242 2
.ndjson 2 5006 75 243 2
.nix 4 211 12
.nolint 1 2 1
.odd 1 1281 43
Expand Down Expand Up @@ -179,7 +179,7 @@ FileType FileNumber ValidLines Positives Negatives Templat
.scala 40 5071 22 101
.scss 16 8553 32 1
.secrets 1 11 1
.sh 143 21525 58 480 26
.sh 143 21525 60 480 24
.slim 1 153 1 2
.smali 1 775 18
.snap 3 1708 9 30 2
Expand All @@ -198,7 +198,7 @@ FileType FileNumber ValidLines Positives Negatives Templat
.test 2 24 24 1 4
.testsettings 1 21 1 10
.tf 21 1377 2 30 2
.tfstate 4 307 22 11 4
.tfstate 4 307 26 7 4
.tfvars 1 31 3 2
.tl 2 2161 161 2
.tmpl 5 336 3 9
Expand All @@ -209,7 +209,7 @@ FileType FileNumber ValidLines Positives Negatives Templat
.ts 583 106730 157 1800 203
.tsx 54 7914 1 114 5
.ttar 1 452 1
.txt 440 78102 5284 6357 49
.txt 440 78102 5287 6354 49
.utf8 1 77 2
.vsixmanifest 1 36 1
.vsmdi 1 6 2
Expand All @@ -219,16 +219,16 @@ FileType FileNumber ValidLines Positives Negatives Templat
.xib 11 503 169
.xsl 1 311 1
.yaml 137 19004 125 345 42
.yml 419 36169 558 887 377
.yml 419 36169 559 889 376
.zsh 6 872 12
.zsh-theme 1 97 1
TOTAL: 10254 16344639 12204 50504 5107
TOTAL: 10254 16344639 12221 50501 5104
credsweeper result_cnt : 0, lost_cnt : 0, true_cnt : 0, false_cnt : 0
Rules Positives Negatives Templates Reported TP FP TN FN FPR FNR ACC PRC RCL F1
------------------------------ ----------- ----------- ----------- ---------- ---- ---- ----- ----- -------- -------- -------- ----- -------- ----
API 130 3166 188 0 0 3354 130 0.000000 1.000000 0.962687 0.000000
AWS Client ID 168 21 0 0 0 21 168 0.000000 1.000000 0.111111 0.000000
AWS Multi 75 16 0 0 0 16 75 0.000000 1.000000 0.175824 0.000000
AWS Multi 82 10 0 0 0 10 82 0.000000 1.000000 0.108696 0.000000
AWS S3 Bucket 67 23 0 0 0 23 67 0.000000 1.000000 0.255556 0.000000
Atlassian Old PAT token 27 308 3 0 0 311 27 0.000000 1.000000 0.920118 0.000000
Auth 414 2739 82 0 0 2821 414 0.000000 1.000000 0.872025 0.000000
Expand Down Expand Up @@ -257,17 +257,17 @@ Grafana Provisioned API Key 22 1 0
JSON Web Token 170 61 0 0 0 61 170 0.000000 1.000000 0.264069 0.000000
Jira / Confluence PAT token 0 4 0 0 0 4 0 0.000000 1.000000
Jira 2FA 15 6 1 0 0 7 15 0.000000 1.000000 0.318182 0.000000
Key 3906 15720 485 0 0 16205 3906 0.000000 1.000000 0.805778 0.000000
Key 3909 15717 485 0 0 16202 3909 0.000000 1.000000 0.805629 0.000000
Nonce 91 49 0 0 0 49 91 0.000000 1.000000 0.350000 0.000000
Other 8 8292 1 0 0 8293 8 0.000000 1.000000 0.999036 0.000000
PEM Private Key 1019 1483 0 0 0 1483 1019 0.000000 1.000000 0.592726 0.000000
Password 1862 7531 2683 0 0 10214 1862 0.000000 1.000000 0.845810 0.000000
Password 1869 7535 2680 0 0 10215 1869 0.000000 1.000000 0.845333 0.000000
Salt 47 76 1 0 0 77 47 0.000000 1.000000 0.620968 0.000000
Secret 1297 1576 802 0 0 2378 1297 0.000000 1.000000 0.647075 0.000000
Seed 1 6 0 0 0 6 1 0.000000 1.000000 0.857143 0.000000
Slack Token 4 1 0 0 0 1 4 0.000000 1.000000 0.200000 0.000000
Token 643 4168 454 0 0 4622 643 0.000000 1.000000 0.877873 0.000000
Token 643 4170 454 0 0 4624 643 0.000000 1.000000 0.877919 0.000000
Twilio API Key 0 5 2 0 0 7 0 0.000000 1.000000
URL Credentials 210 156 216 0 0 372 210 0.000000 1.000000 0.639175 0.000000
UUID 1069 265 0 0 0 265 1069 0.000000 1.000000 0.198651 0.000000
12204 50504 5107 0 0 0 50504 12204 0.000000 1.000000 0.805384 0.000000
12221 50501 5104 0 0 0 50501 12221 0.000000 1.000000 0.805156 0.000000
2 changes: 1 addition & 1 deletion meta/288eaba8.csv
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Id,FileID,Domain,RepoName,FilePath,LineStart,LineEnd,GroundTruth,WithWords,Value
29927,cb05e4cb,GitHub,288eaba8,data/288eaba8/test/cb05e4cb.js,62,62,T,T,17,29,F,F,CharsOnly,,,Secret,3.02,12,F,F,F,Password
29932,d2417b18,GitHub,288eaba8,data/288eaba8/test/d2417b18.js,11,11,T,T,17,38,F,F,Any,,,Secret,3.22,21,F,F,F,Password
30690,e370d734,GitHub,288eaba8,data/288eaba8/test/e370d734.js,141,141,T,T,24,37,F,F,Any,,,Secret,1.71,13,F,F,F,Password
30875,e370d734,GitHub,288eaba8,data/288eaba8/test/e370d734.js,149,149,T,F,64,74,F,F,,,,,0.0,0,F,F,F,Password
30875,e370d734,GitHub,288eaba8,data/288eaba8/test/e370d734.js,149,149,T,F,64,79,F,F,,,,,0.0,0,F,F,F,Password
31159,0d52ab5c,GitHub,288eaba8,data/288eaba8/src/0d52ab5c.yml,74,74,T,T,26,34,F,F,CharsOnly,,,Secret,2.5,8,F,F,F,Password
31168,0d52ab5c,GitHub,288eaba8,data/288eaba8/src/0d52ab5c.yml,34,34,Template,T,28,44,F,F,CharsOnly,,,Secret,2.98,16,F,F,F,Password
31170,0d52ab5c,GitHub,288eaba8,data/288eaba8/src/0d52ab5c.yml,37,37,T,T,23,35,F,F,CharsOnly,,,Secret,3.02,12,F,F,F,Password
Expand Down
6 changes: 3 additions & 3 deletions meta/2ba83c6a.csv
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ Id,FileID,Domain,RepoName,FilePath,LineStart,LineEnd,GroundTruth,WithWords,Value
26708,601c914b,GitHub,2ba83c6a,data/2ba83c6a/other/601c914b.pod,22,22,F,F,,,F,F,,,,,0,0,F,F,F,Key
27187,73a06946,GitHub,2ba83c6a,data/2ba83c6a/src/73a06946.pl,40,40,T,T,72,77,T,F,Any,,,Unknown,2.32,5,F,F,F,Password
27201,773ee5d9,GitHub,2ba83c6a,data/2ba83c6a/test/773ee5d9.csv,93,93,F,F,0,238,F,F,,,,,0,0,F,F,F,Password
27239,911dde03,GitHub,2ba83c6a,data/2ba83c6a/test/911dde03.txt,10948,10948,F,F,6,54,F,F,,,,,0.0,0,F,F,F,Key
27239,911dde03,GitHub,2ba83c6a,data/2ba83c6a/test/911dde03.txt,10948,10948,T,F,6,54,F,F,,,,,0.0,0,F,F,F,Key
27342,eb0705d8,GitHub,2ba83c6a,data/2ba83c6a/other/eb0705d8.pod,460,460,T,F,23,39,F,F,Any,,,Secret,3.88,16,F,F,F,Key
138189,eb0705d8,GitHub,2ba83c6a,data/2ba83c6a/other/eb0705d8.pod,460,460,F,F,54,-1,F,F,,,,,0.0,0,F,F,F,Other
27386,dc676919,GitHub,2ba83c6a,data/2ba83c6a/test/dc676919.txt,1,1,F,F,32,37,F,F,,,,,0,0,F,F,F,Secret
Expand All @@ -938,8 +938,8 @@ Id,FileID,Domain,RepoName,FilePath,LineStart,LineEnd,GroundTruth,WithWords,Value
27524,a3cf7bc8,GitHub,2ba83c6a,data/2ba83c6a/test/a3cf7bc8.txt,270,270,F,F,6,18,F,F,,,,,0.0,0,F,F,F,Key
27531,242e213c,GitHub,2ba83c6a,data/2ba83c6a/other/242e213c.in,132,132,Template,F,63,69,F,F,Any,,,Unknown,2.25,6,F,F,F,Key
27532,242e213c,GitHub,2ba83c6a,data/2ba83c6a/other/242e213c.in,127,127,Template,F,63,69,F,F,Any,,,Unknown,2.25,6,F,F,F,Key
27534,911dde03,GitHub,2ba83c6a,data/2ba83c6a/test/911dde03.txt,15888,15888,F,F,6,70,F,F,,,,,0.0,0,F,F,F,Key
27557,911dde03,GitHub,2ba83c6a,data/2ba83c6a/test/911dde03.txt,17563,17563,F,F,6,38,F,F,,,,,0.0,0,F,F,F,Key
27534,911dde03,GitHub,2ba83c6a,data/2ba83c6a/test/911dde03.txt,15888,15888,T,F,6,70,F,F,,,,,0.0,0,F,F,F,Key
27557,911dde03,GitHub,2ba83c6a,data/2ba83c6a/test/911dde03.txt,17563,17563,T,F,6,38,F,F,,,,,0.0,0,F,F,F,Key
27560,2c37d376,GitHub,2ba83c6a,data/2ba83c6a/test/2c37d376.cnf,6,6,Template,T,13,22,F,F,Any,,,Secret,2.07,9,F,F,F,Secret
27566,b9ce04bc,GitHub,2ba83c6a,data/2ba83c6a/test/b9ce04bc.txt,303,303,F,F,6,26,F,F,,,,,0,0,F,F,F,Key
27568,b9ce04bc,GitHub,2ba83c6a,data/2ba83c6a/test/b9ce04bc.txt,298,298,F,F,6,19,F,F,,,,,0.0,0,F,F,F,Key
Expand Down
2 changes: 2 additions & 0 deletions meta/387016a6.csv
Original file line number Diff line number Diff line change
Expand Up @@ -1113,3 +1113,5 @@ Id,FileID,Domain,RepoName,FilePath,LineStart,LineEnd,GroundTruth,WithWords,Value
1027484,89ce63c9,GitHub,387016a6,data/387016a6/test/89ce63c9.yml,336,336,T,T,39,71,F,F,Any,,,Secret,3.2,15,F,F,F,Auth
1027485,89ce63c9,GitHub,387016a6,data/387016a6/test/89ce63c9.yml,348,348,T,T,39,71,F,F,Any,,,Secret,3.2,15,F,F,F,Auth
1238210,499a20a4,GitHub,387016a6,data/387016a6/src/499a20a4.asciidoc,187,187,F,F,,,F,F,,,,,0.0,0,F,F,F,Token
1479639,ce086542,GitHub,387016a6,data/387016a6/test/ce086542.yml,397,397,F,F,49,84,F,F,,,,,0.0,0,F,F,F,Token
1479640,ce086542,GitHub,387016a6,data/387016a6/test/ce086542.yml,410,410,F,F,49,84,F,F,,,,,0.0,0,F,F,F,Token
2 changes: 1 addition & 1 deletion meta/472d4c24.csv
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Id,FileID,Domain,RepoName,FilePath,LineStart,LineEnd,GroundTruth,WithWords,Value
41974,46b38b01,GitHub,472d4c24,data/472d4c24/src/46b38b01.rb,1843,1843,F,F,,,F,F,,,,,0,0,F,F,F,Password
42717,3310bdc3,GitHub,472d4c24,data/472d4c24/src/3310bdc3.rb,46,46,F,F,,,F,F,,,,,0,0,F,F,F,Password:Salt
42718,3310bdc3,GitHub,472d4c24,data/472d4c24/src/3310bdc3.rb,317,317,F,F,,,F,F,,,,,0,0,F,F,F,Password
47192,faff1af3,GitHub,472d4c24,data/472d4c24/test/faff1af3.yml,98,98,Template,F,22,30,F,F,CharsOnly,,,Secret,2.0,8,F,F,F,Password
47192,faff1af3,GitHub,472d4c24,data/472d4c24/test/faff1af3.yml,98,98,T,F,22,30,F,F,CharsOnly,,,Secret,2.0,8,F,F,F,Password
47502,e246815b,GitHub,472d4c24,data/472d4c24/test/e246815b.rb,19,19,F,F,,,F,F,,,,,0,0,F,F,F,Bitbucket Client ID
47503,e246815b,GitHub,472d4c24,data/472d4c24/test/e246815b.rb,30,30,F,F,,,F,F,,,,,0,0,F,F,F,Bitbucket Client ID
47556,4beb1f7a,GitHub,472d4c24,data/472d4c24/test/4beb1f7a.rb,45,45,T,F,19,27,F,F,CharsOnly,,,Secret,2.0,8,F,F,F,Password
Expand Down
8 changes: 8 additions & 0 deletions meta/50595139.csv
Original file line number Diff line number Diff line change
Expand Up @@ -274,3 +274,11 @@ Id,FileID,Domain,RepoName,FilePath,LineStart,LineEnd,GroundTruth,WithWords,Value
1479626,28de09ab,GitHub,50595139,data/50595139/test/28de09ab.m,654,654,T,F,27,33,F,F,,,,,0.0,0,F,F,F,Password
1479629,28de09ab,GitHub,50595139,data/50595139/test/28de09ab.m,233,233,T,F,107,115,F,F,,,,,0.0,0,F,F,F,Password
1479630,28de09ab,GitHub,50595139,data/50595139/test/28de09ab.m,250,250,T,F,107,115,F,F,,,,,0.0,0,F,F,F,Password
1479631,28de09ab,GitHub,50595139,data/50595139/test/28de09ab.m,330,330,T,F,106,110,F,F,,,,,0.0,0,F,F,F,Password
1479633,28de09ab,GitHub,50595139,data/50595139/test/28de09ab.m,77,77,T,F,108,117,F,F,,,,,0.0,0,F,F,F,Password
1479634,28de09ab,GitHub,50595139,data/50595139/test/28de09ab.m,284,284,F,F,78,85,F,F,,,,,0.0,0,F,F,F,Password
1479635,28de09ab,GitHub,50595139,data/50595139/test/28de09ab.m,284,284,T,F,97,105,F,F,,,,,0.0,0,F,F,F,Password
1479636,28de09ab,GitHub,50595139,data/50595139/test/28de09ab.m,288,288,F,F,85,92,F,F,,,,,0.0,0,F,F,F,Password
1479637,28de09ab,GitHub,50595139,data/50595139/test/28de09ab.m,288,288,T,F,104,115,F,F,,,,,0.0,0,F,F,F,Password
1479638,28de09ab,GitHub,50595139,data/50595139/test/28de09ab.m,319,319,T,F,108,112,F,F,,,,,0.0,0,F,F,F,Password

8 changes: 4 additions & 4 deletions meta/71455799.csv
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ Id,FileID,Domain,RepoName,FilePath,LineStart,LineEnd,GroundTruth,WithWords,Value
114620,87378121,GitHub,71455799,data/71455799/test/87378121.tfstate,26,26,F,F,,,F,F,,,,,0.00,,F,F,F,Certificate
114621,23621a2f,GitHub,71455799,data/71455799/test/23621a2f.json,12,12,F,F,,,F,F,,,,,0.00,,F,F,F,Certificate
114622,23621a2f,GitHub,71455799,data/71455799/test/23621a2f.json,80,80,F,F,,,F,F,,,,,0.00,,F,F,F,Certificate
134785,e378fef4,GitHub,71455799,data/71455799/test/e378fef4.tfstate,20,23,F,F,,,F,F,,,,,0,0,F,F,F,AWS Multi
134786,e378fef4,GitHub,71455799,data/71455799/test/e378fef4.tfstate,38,41,F,F,,,F,F,,,,,0,0,F,F,F,AWS Multi
134787,e378fef4,GitHub,71455799,data/71455799/test/e378fef4.tfstate,65,68,F,F,,,F,F,,,,,0,0,F,F,F,AWS Multi
134788,e378fef4,GitHub,71455799,data/71455799/test/e378fef4.tfstate,83,86,F,F,,,F,F,,,,,0,0,F,F,F,AWS Multi
134785,e378fef4,GitHub,71455799,data/71455799/test/e378fef4.tfstate,20,23,T,F,19,63,F,F,,,,,0,0,F,F,F,AWS Multi
134786,e378fef4,GitHub,71455799,data/71455799/test/e378fef4.tfstate,38,41,T,F,19,63,F,F,,,,,0,0,F,F,F,AWS Multi
134787,e378fef4,GitHub,71455799,data/71455799/test/e378fef4.tfstate,65,68,T,F,19,63,F,F,,,,,0,0,F,F,F,AWS Multi
134788,e378fef4,GitHub,71455799,data/71455799/test/e378fef4.tfstate,83,86,T,F,19,63,F,F,,,,,0,0,F,F,F,AWS Multi
1339002,08a2c15d,GitHub,71455799,data/71455799/test/08a2c15d.tfstate,5,5,T,F,14,50,F,F,,,,,0.0,0,F,F,F,UUID
1339003,23621a2f,GitHub,71455799,data/71455799/test/23621a2f.json,32,32,T,F,58,94,F,F,,,,,0.0,0,F,F,F,UUID
1339004,23621a2f,GitHub,71455799,data/71455799/test/23621a2f.json,44,44,T,F,79,115,F,F,,,,,0.0,0,F,F,F,UUID
Expand Down
2 changes: 1 addition & 1 deletion meta/80815938.csv
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Id,FileID,Domain,RepoName,FilePath,LineStart,LineEnd,GroundTruth,WithWords,Value
34543,13e08bda,GitHub,80815938,data/80815938/test/13e08bda.js,902,902,F,T,30,50,F,F,Any,,,Token,3.11,20,F,F,F,Gitlab Feed Token:Password:Token
34569,ccfc9194,GitHub,80815938,data/80815938/test/ccfc9194.js,22,22,T,F,25,35,F,F,Any,,,Secret,2.13,10,F,F,F,Password
35180,ccfc9194,GitHub,80815938,data/80815938/test/ccfc9194.js,61,61,T,F,40,50,F,F,Any,,,Secret,2.13,10,F,F,F,Password
35181,f6916fde,GitHub,80815938,data/80815938/test/f6916fde.js,103,103,T,F,37,44,F,F,Any,,,Secret,2.01,7,F,F,F,Password
35181,f6916fde,GitHub,80815938,data/80815938/test/f6916fde.js,103,103,F,F,37,166,F,F,Any,,,Secret,2.01,7,F,F,F,Password
35182,f6916fde,GitHub,80815938,data/80815938/test/f6916fde.js,80,80,F,T,37,77,F,F,Any,,,Secret,3.72,40,F,F,F,Password
35188,f6916fde,GitHub,80815938,data/80815938/test/f6916fde.js,115,115,T,F,37,48,F,F,Any,,,Secret,1.57,11,F,F,F,Password
35189,f6916fde,GitHub,80815938,data/80815938/test/f6916fde.js,91,91,T,F,37,46,F,F,Any,,,Secret,1.76,9,F,F,F,Password
Expand Down
Loading

0 comments on commit 567e5cd

Please sign in to comment.