Skip to content

Commit

Permalink
rollback ML model
Browse files Browse the repository at this point in the history
  • Loading branch information
babenek committed Aug 7, 2024
1 parent 29ae9a5 commit c9cfeb9
Show file tree
Hide file tree
Showing 12 changed files with 900 additions and 1,419 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Check ml_model.onnx integrity
if: ${{ always() && steps.code_checkout.conclusion == 'success' }}
run: |
md5sum --binary credsweeper/ml_model/ml_model.onnx | grep 70a864232576f9b88a08296a5e628208
md5sum --binary credsweeper/ml_model/ml_model.onnx | grep 62d92ab2f91a18e861d846a7b8a0c3a7
# # # Python setup

Expand Down
Binary file modified credsweeper/ml_model/ml_model.onnx
Binary file not shown.
13 changes: 2 additions & 11 deletions credsweeper/ml_model/model_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,6 @@
".adoc",
".asciidoc",
".axaml",
".backup",
".bash",
".bat",
".bats",
Expand All @@ -374,7 +373,6 @@
".cjs",
".cljc",
".cmd",
".cmm",
".cnf",
".coffee",
".conf",
Expand All @@ -396,7 +394,6 @@
".example",
".exs",
".ext",
".fsproj",
".g4",
".gml",
".gni",
Expand Down Expand Up @@ -431,7 +428,7 @@
".log",
".lua",
".m",
".manifest",
".map",
".markerb",
".md",
".mdx",
Expand All @@ -440,7 +437,6 @@
".ml",
".mlir",
".moo",
".msg",
".ndjson",
".nix",
".nolint",
Expand Down Expand Up @@ -478,7 +474,6 @@
".scala",
".secrets",
".sh",
".sln",
".snap",
".sql",
".storyboard",
Expand All @@ -489,7 +484,6 @@
".tdf",
".template",
".test",
".testsettings",
".tf",
".tfstate",
".tfvars",
Expand All @@ -500,9 +494,7 @@
".travis",
".ts",
".tsx",
".ttar",
".txt",
".vsmdi",
".vue",
".xaml",
".xib",
Expand Down Expand Up @@ -530,8 +522,7 @@
"Salt",
"Secret",
"Token",
"URL Credentials",
"UUID"
"URL Credentials"
]
}
}
Expand Down
10 changes: 5 additions & 5 deletions tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
NEGLIGIBLE_ML_THRESHOLD = 0.0001

# credentials count after scan
SAMPLES_CRED_COUNT: int = 360
SAMPLES_CRED_LINE_COUNT: int = 377
SAMPLES_CRED_COUNT: int = 363
SAMPLES_CRED_LINE_COUNT: int = 380

# credentials count after post-processing
SAMPLES_POST_CRED_COUNT: int = 332
SAMPLES_POST_CRED_COUNT: int = 321

# with option --doc
SAMPLES_IN_DOC = 416
SAMPLES_IN_DOC = 415

# archived credentials that are not found without --depth
SAMPLES_IN_DEEP_1 = SAMPLES_POST_CRED_COUNT + 24
SAMPLES_IN_DEEP_2 = SAMPLES_IN_DEEP_1 + 16
SAMPLES_IN_DEEP_2 = SAMPLES_IN_DEEP_1 + 17
SAMPLES_IN_DEEP_3 = SAMPLES_IN_DEEP_2 + 1

# well known string with all latin letters
Expand Down
10 changes: 5 additions & 5 deletions tests/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
"sort_output": True,
"json_filename": "ml_threshold.json",
"ml_threshold": NEGLIGIBLE_ML_THRESHOLD
}, {
"__cred_count": SAMPLES_IN_DEEP_3,
"sort_output": True,
"json_filename": "depth_3.json",
"depth": 3
}, {
"__cred_count": SAMPLES_IN_DOC,
"sort_output": True,
"json_filename": "doc.json",
"doc": True
}, {
"__cred_count": SAMPLES_IN_DEEP_3,
"sort_output": True,
"json_filename": "depth_3.json",
"depth": 3
}]
Loading

0 comments on commit c9cfeb9

Please sign in to comment.