cognium-dev 3.190.0 → 3.192.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +39 -2
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -10665,6 +10665,14 @@ var DEFAULT_SOURCES = [
|
|
|
10665
10665
|
{ method: "text", class: "Request", type: "http_body", severity: "high", return_tainted: true },
|
|
10666
10666
|
{ property: "query", object: "request", type: "http_param", severity: "high", property_tainted: true },
|
|
10667
10667
|
{ property: "match_info", object: "request", type: "http_path", severity: "high", property_tainted: true },
|
|
10668
|
+
{ property: "rel_url", object: "request", type: "http_body", severity: "high", property_tainted: true },
|
|
10669
|
+
{ property: "remote", object: "request", type: "network_input", severity: "high", property_tainted: true },
|
|
10670
|
+
{ property: "raw_headers", object: "request", type: "http_header", severity: "high", property_tainted: true },
|
|
10671
|
+
{ property: "transport", object: "request", type: "network_input", severity: "medium", property_tainted: true },
|
|
10672
|
+
{ method: "get_json", class: "Request", type: "http_body", severity: "high", return_tainted: true },
|
|
10673
|
+
{ method: "get_data", class: "Request", type: "http_body", severity: "high", return_tainted: true },
|
|
10674
|
+
{ method: "form", class: "Request", type: "http_param", severity: "high", return_tainted: true },
|
|
10675
|
+
{ method: "files", class: "Request", type: "file_input", severity: "high", return_tainted: true },
|
|
10668
10676
|
{ method: "query_string", class: "HttpRequest", type: "http_param", severity: "high", return_tainted: true },
|
|
10669
10677
|
{ method: "match_info", class: "HttpRequest", type: "http_param", severity: "high", return_tainted: true },
|
|
10670
10678
|
{ method: "into_inner", class: "Path", type: "http_param", severity: "high", return_tainted: true },
|
|
@@ -24881,7 +24889,12 @@ var PYTHON_TAINTED_PATTERNS2 = [
|
|
|
24881
24889
|
{ pattern: /\binput\s*\(/, type: "io_input" },
|
|
24882
24890
|
{ pattern: /\.receive_text\s*\(/, type: "network_input" },
|
|
24883
24891
|
{ pattern: /\.receive_bytes\s*\(/, type: "network_input" },
|
|
24884
|
-
{ pattern: /\.receive_json\s*\(/, type: "http_body" }
|
|
24892
|
+
{ pattern: /\.receive_json\s*\(/, type: "http_body" },
|
|
24893
|
+
{ pattern: /\brequest\.rel_url\b/, type: "http_body" },
|
|
24894
|
+
{ pattern: /\brequest\.remote\b/, type: "network_input" },
|
|
24895
|
+
{ pattern: /\brequest\.match_info\b/, type: "http_path" },
|
|
24896
|
+
{ pattern: /\.get_json\s*\(/, type: "http_body" },
|
|
24897
|
+
{ pattern: /\.get_data\s*\(/, type: "http_body" }
|
|
24885
24898
|
];
|
|
24886
24899
|
|
|
24887
24900
|
class LanguageSourcesPass {
|
|
@@ -24964,6 +24977,7 @@ class LanguageSourcesPass {
|
|
|
24964
24977
|
}
|
|
24965
24978
|
additionalSanitizers.push(...findBashRegexAllowlistSanitizers(code));
|
|
24966
24979
|
additionalSanitizers.push(...findBashRealpathPrefixGuardSanitizers(code));
|
|
24980
|
+
additionalSanitizers.push(...findBashShellQuoteSanitizers(code));
|
|
24967
24981
|
}
|
|
24968
24982
|
if (language === "go") {
|
|
24969
24983
|
additionalSanitizers.push(...findGoMapAllowlistGuardSanitizers(code));
|
|
@@ -26413,6 +26427,29 @@ function hasIntegrityVerifierAnywhere(lines) {
|
|
|
26413
26427
|
}
|
|
26414
26428
|
return false;
|
|
26415
26429
|
}
|
|
26430
|
+
function findBashShellQuoteSanitizers(code) {
|
|
26431
|
+
const sanitizers = [];
|
|
26432
|
+
const lines = code.split(`
|
|
26433
|
+
`);
|
|
26434
|
+
const PRINTF_Q_RE = /\$\(\s*printf\s+['"]%q['"]\s+["']?\$/;
|
|
26435
|
+
const AT_Q_RE = /\$\{[A-Za-z_][A-Za-z0-9_]*@Q\}/;
|
|
26436
|
+
for (let i2 = 0;i2 < lines.length; i2++) {
|
|
26437
|
+
const line = lines[i2];
|
|
26438
|
+
if (line.trimStart().startsWith("#"))
|
|
26439
|
+
continue;
|
|
26440
|
+
if (!PRINTF_Q_RE.test(line) && !AT_Q_RE.test(line))
|
|
26441
|
+
continue;
|
|
26442
|
+
for (let l = i2 + 1;l <= lines.length; l++) {
|
|
26443
|
+
sanitizers.push({
|
|
26444
|
+
type: "shell_quote",
|
|
26445
|
+
method: PRINTF_Q_RE.test(line) ? "printf '%q'" : "${var@Q}",
|
|
26446
|
+
line: l,
|
|
26447
|
+
sanitizes: ["command_injection", "code_injection"]
|
|
26448
|
+
});
|
|
26449
|
+
}
|
|
26450
|
+
}
|
|
26451
|
+
return sanitizers;
|
|
26452
|
+
}
|
|
26416
26453
|
function findBashRegexAllowlistSanitizers(code) {
|
|
26417
26454
|
const sanitizers = [];
|
|
26418
26455
|
const lines = code.split(`
|
|
@@ -45967,7 +46004,7 @@ var colors = {
|
|
|
45967
46004
|
};
|
|
45968
46005
|
|
|
45969
46006
|
// src/version.ts
|
|
45970
|
-
var version = "3.
|
|
46007
|
+
var version = "3.192.0";
|
|
45971
46008
|
|
|
45972
46009
|
// src/formatters.ts
|
|
45973
46010
|
var LIBRARY_API_SURFACE_TAG2 = "library-api-surface:caller-responsibility";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cognium-dev",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.192.0",
|
|
4
4
|
"description": "Static Application Security Testing CLI for detecting security vulnerabilities via taint tracking",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@cognium/project-profile-detect": "^1.1.0",
|
|
69
|
-
"circle-ir": "^3.
|
|
69
|
+
"circle-ir": "^3.192.0"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@types/node": "^25.5.0",
|