Skip to content

Commit

Permalink
Rollback BM
Browse files Browse the repository at this point in the history
  • Loading branch information
babenek committed Aug 7, 2024
1 parent d7f65c1 commit 95d12f3
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 103 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ jobs:
- name: Checkout CredData
uses: actions/checkout@v4
with:
repository: babenek/CredData
ref: auxiliary
repository: Samsung/CredData

- name: Markup hashing
run: |
Expand Down Expand Up @@ -73,8 +72,7 @@ jobs:
- name: Checkout CredData
uses: actions/checkout@v4
with:
repository: babenek/CredData
ref: auxiliary
repository: Samsung/CredData

- name: Markup hashing
run: |
Expand Down Expand Up @@ -171,8 +169,7 @@ jobs:
- name: Checkout CredData
uses: actions/checkout@v4
with:
repository: babenek/CredData
ref: auxiliary
repository: Samsung/CredData

- name: Markup hashing
run: |
Expand Down Expand Up @@ -353,8 +350,7 @@ jobs:
- name: Checkout CredData
uses: actions/checkout@v4
with:
repository: babenek/CredData
ref: auxiliary
repository: Samsung/CredData

- name: Markup hashing
run: |
Expand Down
62 changes: 31 additions & 31 deletions tests/data/depth_3.json
Original file line number Diff line number Diff line change
Expand Up @@ -10784,33 +10784,6 @@
}
]
},
{
"api_validation": "NOT_AVAILABLE",
"ml_validation": "VALIDATED_KEY",
"ml_probability": 0.989,
"rule": "URL Credentials",
"severity": "high",
"confidence": "moderate",
"line_data_list": [
{
"line": "email_as_login = \"smtps://[email protected]:[email protected]:465\";",
"line_num": 3,
"path": "tests/samples/url_cred.js",
"info": "tests/samples/url_cred.js|RAW",
"value": "FnD83JZs",
"value_start": 44,
"value_end": 52,
"variable": "smtps://",
"variable_start": 18,
"variable_end": 26,
"entropy_validation": {
"iterator": "BASE64_CHARS",
"entropy": 3.0,
"valid": false
}
}
]
},
{
"api_validation": "NOT_AVAILABLE",
"ml_validation": "VALIDATED_KEY",
Expand All @@ -10821,7 +10794,7 @@
"line_data_list": [
{
"line": "url = \"https://secure.com/83675/39084?Credential=546DFS64N90P3AW7DX%2Fkeep%26cut\";",
"line_num": 5,
"line_num": 3,
"path": "tests/samples/url_cred.js",
"info": "tests/samples/url_cred.js|RAW",
"value": "546DFS64N90P3AW7DX%2Fkeep",
Expand All @@ -10848,7 +10821,7 @@
"line_data_list": [
{
"line": "// \"fp://no.host.real/any/path/to/nowhere/\",\"key\":\"[email protected]\"",
"line_num": 9,
"line_num": 7,
"path": "tests/samples/url_cred.js",
"info": "tests/samples/url_cred.js|RAW",
"value": "[email protected]",
Expand All @@ -10875,7 +10848,7 @@
"line_data_list": [
{
"line": "39084?Credential=546DFS64N90P3AW7DX&key=3487263-2384579834-234732875-345&hasToBefound=2",
"line_num": 12,
"line_num": 10,
"path": "tests/samples/url_cred.js",
"info": "tests/samples/url_cred.js|RAW",
"value": "3487263-2384579834-234732875-345",
Expand All @@ -10902,7 +10875,7 @@
"line_data_list": [
{
"line": "39084?Credential=546DFS64N90P3AW7DX&key=3487263-2384579834-234732875-345&hasToBefound=2",
"line_num": 12,
"line_num": 10,
"path": "tests/samples/url_cred.js",
"info": "tests/samples/url_cred.js|RAW",
"value": "546DFS64N90P3AW7DX",
Expand All @@ -10919,6 +10892,33 @@
}
]
},
{
"api_validation": "NOT_AVAILABLE",
"ml_validation": "VALIDATED_KEY",
"ml_probability": 0.989,
"rule": "URL Credentials",
"severity": "high",
"confidence": "moderate",
"line_data_list": [
{
"line": "email_as_login = \"smtps://[email protected]:[email protected]:465\";",
"line_num": 13,
"path": "tests/samples/url_cred.js",
"info": "tests/samples/url_cred.js|RAW",
"value": "FnD83JZs",
"value_start": 44,
"value_end": 52,
"variable": "smtps://",
"variable_start": 18,
"variable_end": 26,
"entropy_validation": {
"iterator": "BASE64_CHARS",
"entropy": 3.0,
"valid": false
}
}
]
},
{
"api_validation": "NOT_AVAILABLE",
"ml_validation": "NOT_AVAILABLE",
Expand Down
62 changes: 31 additions & 31 deletions tests/data/ml_threshold.json
Original file line number Diff line number Diff line change
Expand Up @@ -9846,33 +9846,6 @@
}
]
},
{
"api_validation": "NOT_AVAILABLE",
"ml_validation": "VALIDATED_KEY",
"ml_probability": 0.989,
"rule": "URL Credentials",
"severity": "high",
"confidence": "moderate",
"line_data_list": [
{
"line": "email_as_login = \"smtps://[email protected]:[email protected]:465\";",
"line_num": 3,
"path": "tests/samples/url_cred.js",
"info": "",
"value": "FnD83JZs",
"value_start": 44,
"value_end": 52,
"variable": "smtps://",
"variable_start": 18,
"variable_end": 26,
"entropy_validation": {
"iterator": "BASE64_CHARS",
"entropy": 3.0,
"valid": false
}
}
]
},
{
"api_validation": "NOT_AVAILABLE",
"ml_validation": "VALIDATED_KEY",
Expand All @@ -9883,7 +9856,7 @@
"line_data_list": [
{
"line": "url = \"https://secure.com/83675/39084?Credential=546DFS64N90P3AW7DX%2Fkeep%26cut\";",
"line_num": 5,
"line_num": 3,
"path": "tests/samples/url_cred.js",
"info": "",
"value": "546DFS64N90P3AW7DX%2Fkeep",
Expand All @@ -9910,7 +9883,7 @@
"line_data_list": [
{
"line": "// \"fp://no.host.real/any/path/to/nowhere/\",\"key\":\"[email protected]\"",
"line_num": 9,
"line_num": 7,
"path": "tests/samples/url_cred.js",
"info": "",
"value": "[email protected]",
Expand All @@ -9937,7 +9910,7 @@
"line_data_list": [
{
"line": "39084?Credential=546DFS64N90P3AW7DX&key=3487263-2384579834-234732875-345&hasToBefound=2",
"line_num": 12,
"line_num": 10,
"path": "tests/samples/url_cred.js",
"info": "",
"value": "3487263-2384579834-234732875-345",
Expand All @@ -9964,7 +9937,7 @@
"line_data_list": [
{
"line": "39084?Credential=546DFS64N90P3AW7DX&key=3487263-2384579834-234732875-345&hasToBefound=2",
"line_num": 12,
"line_num": 10,
"path": "tests/samples/url_cred.js",
"info": "",
"value": "546DFS64N90P3AW7DX",
Expand All @@ -9981,6 +9954,33 @@
}
]
},
{
"api_validation": "NOT_AVAILABLE",
"ml_validation": "VALIDATED_KEY",
"ml_probability": 0.989,
"rule": "URL Credentials",
"severity": "high",
"confidence": "moderate",
"line_data_list": [
{
"line": "email_as_login = \"smtps://[email protected]:[email protected]:465\";",
"line_num": 13,
"path": "tests/samples/url_cred.js",
"info": "",
"value": "FnD83JZs",
"value_start": 44,
"value_end": 52,
"variable": "smtps://",
"variable_start": 18,
"variable_end": 26,
"entropy_validation": {
"iterator": "BASE64_CHARS",
"entropy": 3.0,
"valid": false
}
}
]
},
{
"api_validation": "NOT_AVAILABLE",
"ml_validation": "NOT_AVAILABLE",
Expand Down
62 changes: 31 additions & 31 deletions tests/data/output.json
Original file line number Diff line number Diff line change
Expand Up @@ -8766,33 +8766,6 @@
}
]
},
{
"api_validation": "NOT_AVAILABLE",
"ml_validation": "VALIDATED_KEY",
"ml_probability": 0.989,
"rule": "URL Credentials",
"severity": "high",
"confidence": "moderate",
"line_data_list": [
{
"line": "email_as_login = \"smtps://[email protected]:[email protected]:465\";",
"line_num": 3,
"path": "tests/samples/url_cred.js",
"info": "",
"value": "FnD83JZs",
"value_start": 44,
"value_end": 52,
"variable": "smtps://",
"variable_start": 18,
"variable_end": 26,
"entropy_validation": {
"iterator": "BASE64_CHARS",
"entropy": 3.0,
"valid": false
}
}
]
},
{
"api_validation": "NOT_AVAILABLE",
"ml_validation": "VALIDATED_KEY",
Expand All @@ -8803,7 +8776,7 @@
"line_data_list": [
{
"line": "url = \"https://secure.com/83675/39084?Credential=546DFS64N90P3AW7DX%2Fkeep%26cut\";",
"line_num": 5,
"line_num": 3,
"path": "tests/samples/url_cred.js",
"info": "",
"value": "546DFS64N90P3AW7DX%2Fkeep",
Expand All @@ -8830,7 +8803,7 @@
"line_data_list": [
{
"line": "// \"fp://no.host.real/any/path/to/nowhere/\",\"key\":\"[email protected]\"",
"line_num": 9,
"line_num": 7,
"path": "tests/samples/url_cred.js",
"info": "",
"value": "[email protected]",
Expand All @@ -8857,7 +8830,7 @@
"line_data_list": [
{
"line": "39084?Credential=546DFS64N90P3AW7DX&key=3487263-2384579834-234732875-345&hasToBefound=2",
"line_num": 12,
"line_num": 10,
"path": "tests/samples/url_cred.js",
"info": "",
"value": "3487263-2384579834-234732875-345",
Expand All @@ -8884,7 +8857,7 @@
"line_data_list": [
{
"line": "39084?Credential=546DFS64N90P3AW7DX&key=3487263-2384579834-234732875-345&hasToBefound=2",
"line_num": 12,
"line_num": 10,
"path": "tests/samples/url_cred.js",
"info": "",
"value": "546DFS64N90P3AW7DX",
Expand All @@ -8901,6 +8874,33 @@
}
]
},
{
"api_validation": "NOT_AVAILABLE",
"ml_validation": "VALIDATED_KEY",
"ml_probability": 0.989,
"rule": "URL Credentials",
"severity": "high",
"confidence": "moderate",
"line_data_list": [
{
"line": "email_as_login = \"smtps://[email protected]:[email protected]:465\";",
"line_num": 13,
"path": "tests/samples/url_cred.js",
"info": "",
"value": "FnD83JZs",
"value_start": 44,
"value_end": 52,
"variable": "smtps://",
"variable_start": 18,
"variable_end": 26,
"entropy_validation": {
"iterator": "BASE64_CHARS",
"entropy": 3.0,
"valid": false
}
}
]
},
{
"api_validation": "NOT_AVAILABLE",
"ml_validation": "NOT_AVAILABLE",
Expand Down
4 changes: 2 additions & 2 deletions tests/samples/url_cred.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
const connection_url = require('dbconnection://ad%6Din:5WdF4f2jE76a@db-host-local');

email_as_login = "smtps://[email protected]:[email protected]:465";

url = "https://secure.com/83675/39084?Credential=546DFS64N90P3AW7DX%2Fkeep%26cut";

// note:[email protected]
Expand All @@ -11,3 +9,5 @@ url = "https://secure.com/83675/39084?Credential=546DFS64N90P3AW7DX%2Fkeep%26cut
/* partially line to sanitize url-like items
39084?Credential=546DFS64N90P3AW7DX&key=3487263-2384579834-234732875-345&hasToBefound=2
*/

email_as_login = "smtps://[email protected]:[email protected]:465";

0 comments on commit 95d12f3

Please sign in to comment.