cognium-dev 3.23.1 → 3.23.3
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 +23 -1
- package/package.json +3 -4
package/dist/cli.js
CHANGED
|
@@ -9017,6 +9017,7 @@ var DEFAULT_SOURCES = [
|
|
|
9017
9017
|
{ annotation: "FormParam", type: "http_param", severity: "high", param_tainted: true },
|
|
9018
9018
|
{ annotation: "PathParam", type: "http_path", severity: "medium", param_tainted: true },
|
|
9019
9019
|
{ annotation: "HeaderParam", type: "http_header", severity: "high", param_tainted: true },
|
|
9020
|
+
{ method_annotation: "DataBoundConstructor", type: "http_param", severity: "high" },
|
|
9020
9021
|
{ method: "getenv", class: "System", type: "env_input", severity: "medium", return_tainted: true },
|
|
9021
9022
|
{ method: "getProperty", class: "System", type: "env_input", severity: "medium", return_tainted: true },
|
|
9022
9023
|
{ method: "getInitParameter", class: "ServletConfig", type: "http_param", severity: "medium", return_tainted: true },
|
|
@@ -9377,6 +9378,7 @@ var DEFAULT_SINKS = [
|
|
|
9377
9378
|
{ method: "getResource", class: "ServletContext", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0] },
|
|
9378
9379
|
{ method: "getResourceAsStream", class: "ServletContext", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0] },
|
|
9379
9380
|
{ method: "getRealPath", class: "ServletContext", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0] },
|
|
9381
|
+
{ method: "child", class: "SCMFileSystem", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0] },
|
|
9380
9382
|
{ method: "externalStaticFileLocation", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0] },
|
|
9381
9383
|
{ method: "staticFileLocation", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0] },
|
|
9382
9384
|
{ method: "getEntry", class: "ZipFile", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0] },
|
|
@@ -10323,6 +10325,26 @@ function findSources(calls, types, patterns) {
|
|
|
10323
10325
|
}
|
|
10324
10326
|
}
|
|
10325
10327
|
}
|
|
10328
|
+
for (const type of types) {
|
|
10329
|
+
for (const method of type.methods) {
|
|
10330
|
+
for (const pattern of patterns) {
|
|
10331
|
+
if (!pattern.method_annotation)
|
|
10332
|
+
continue;
|
|
10333
|
+
if (!matchesAnnotation(method.annotations, pattern.method_annotation))
|
|
10334
|
+
continue;
|
|
10335
|
+
for (const param of method.parameters) {
|
|
10336
|
+
const paramLine = param.line ?? method.start_line;
|
|
10337
|
+
sources.push({
|
|
10338
|
+
type: pattern.type,
|
|
10339
|
+
location: `@${pattern.method_annotation} ${param.name} in ${method.name}`,
|
|
10340
|
+
severity: pattern.severity,
|
|
10341
|
+
line: paramLine,
|
|
10342
|
+
confidence: 1
|
|
10343
|
+
});
|
|
10344
|
+
}
|
|
10345
|
+
}
|
|
10346
|
+
}
|
|
10347
|
+
}
|
|
10326
10348
|
const RUST_EXTRACTOR_TYPES = /^(?:Json|Form|Query|Path|Extension|Multipart)(?:<|$)|^(?:Body|Bytes)$/;
|
|
10327
10349
|
for (const type of types) {
|
|
10328
10350
|
for (const method of type.methods) {
|
|
@@ -25713,7 +25735,7 @@ var colors = {
|
|
|
25713
25735
|
};
|
|
25714
25736
|
|
|
25715
25737
|
// src/version.ts
|
|
25716
|
-
var version = "3.23.
|
|
25738
|
+
var version = "3.23.3";
|
|
25717
25739
|
|
|
25718
25740
|
// src/formatters.ts
|
|
25719
25741
|
var SINK_SEVERITY = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cognium-dev",
|
|
3
|
-
"version": "3.23.
|
|
3
|
+
"version": "3.23.3",
|
|
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",
|
|
@@ -16,8 +16,7 @@
|
|
|
16
16
|
"typecheck": "tsc --noEmit",
|
|
17
17
|
"version": "node -e \"const v = require('./package.json').version; require('fs').writeFileSync('src/version.ts', '/**\\n * Version information\\n *\\n * Kept in sync with package.json via the \\`version\\` npm lifecycle script.\\n * Do not edit manually — use \\`npm version patch|minor|major\\` instead.\\n */\\nexport const version = \\x27' + v + '\\x27;\\n')\" && git add src/version.ts",
|
|
18
18
|
"dogfood": "bun run src/cli.ts scan src/ -q",
|
|
19
|
-
"prepublishOnly": "bun run build"
|
|
20
|
-
"release": "bash release.sh"
|
|
19
|
+
"prepublishOnly": "bun run build"
|
|
21
20
|
},
|
|
22
21
|
"keywords": [
|
|
23
22
|
"security",
|
|
@@ -66,7 +65,7 @@
|
|
|
66
65
|
"registry": "https://registry.npmjs.org/"
|
|
67
66
|
},
|
|
68
67
|
"dependencies": {
|
|
69
|
-
"circle-ir": "^3.23.
|
|
68
|
+
"circle-ir": "^3.23.3"
|
|
70
69
|
},
|
|
71
70
|
"devDependencies": {
|
|
72
71
|
"@types/node": "^25.5.0",
|