cognium-dev 3.146.0 → 3.147.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 +33 -1
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -12318,6 +12318,38 @@ function isSafeGoExecCommandCall(call, pattern, language) {
|
|
|
12318
12318
|
]);
|
|
12319
12319
|
if (SHELL_PROGRAMS.has(program))
|
|
12320
12320
|
return false;
|
|
12321
|
+
const PACKAGE_MANAGER_EXEC_SUBCOMMANDS = {
|
|
12322
|
+
go: new Set(["install", "run", "get"]),
|
|
12323
|
+
npm: new Set(["install", "i", "exec"]),
|
|
12324
|
+
npx: new Set(["*"]),
|
|
12325
|
+
pip: new Set(["install"]),
|
|
12326
|
+
pip3: new Set(["install"]),
|
|
12327
|
+
gem: new Set(["install"]),
|
|
12328
|
+
cargo: new Set(["install", "run"]),
|
|
12329
|
+
yarn: new Set(["add", "install", "exec", "dlx"]),
|
|
12330
|
+
pnpm: new Set(["add", "install", "exec", "dlx"])
|
|
12331
|
+
};
|
|
12332
|
+
const pmSubcommands = PACKAGE_MANAGER_EXEC_SUBCOMMANDS[program];
|
|
12333
|
+
if (pmSubcommands !== undefined) {
|
|
12334
|
+
const subcommandArgPos = pattern.method === "CommandContext" ? 2 : 1;
|
|
12335
|
+
const subcommandArg = call.arguments.find((a) => a.position === subcommandArgPos);
|
|
12336
|
+
if (!subcommandArg)
|
|
12337
|
+
return false;
|
|
12338
|
+
let subcommand;
|
|
12339
|
+
if (subcommandArg.literal !== null && subcommandArg.literal !== undefined) {
|
|
12340
|
+
subcommand = String(subcommandArg.literal);
|
|
12341
|
+
} else {
|
|
12342
|
+
const expr = (subcommandArg.expression ?? "").trim();
|
|
12343
|
+
if (expr.startsWith('"') || expr.startsWith("`") || expr.startsWith("'")) {
|
|
12344
|
+
subcommand = expr.slice(1, -1);
|
|
12345
|
+
}
|
|
12346
|
+
}
|
|
12347
|
+
if (subcommand === undefined)
|
|
12348
|
+
return false;
|
|
12349
|
+
if (pmSubcommands.has("*") || pmSubcommands.has(subcommand)) {
|
|
12350
|
+
return false;
|
|
12351
|
+
}
|
|
12352
|
+
}
|
|
12321
12353
|
return true;
|
|
12322
12354
|
}
|
|
12323
12355
|
function isSafeJSChildProcessCall(call, pattern, language) {
|
|
@@ -42230,7 +42262,7 @@ var colors = {
|
|
|
42230
42262
|
};
|
|
42231
42263
|
|
|
42232
42264
|
// src/version.ts
|
|
42233
|
-
var version = "3.
|
|
42265
|
+
var version = "3.147.0";
|
|
42234
42266
|
|
|
42235
42267
|
// src/formatters.ts
|
|
42236
42268
|
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.147.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.147.0"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@types/node": "^25.5.0",
|