cognium-dev 3.191.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.
Files changed (2) hide show
  1. package/dist/cli.js +25 -1
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -24977,6 +24977,7 @@ class LanguageSourcesPass {
24977
24977
  }
24978
24978
  additionalSanitizers.push(...findBashRegexAllowlistSanitizers(code));
24979
24979
  additionalSanitizers.push(...findBashRealpathPrefixGuardSanitizers(code));
24980
+ additionalSanitizers.push(...findBashShellQuoteSanitizers(code));
24980
24981
  }
24981
24982
  if (language === "go") {
24982
24983
  additionalSanitizers.push(...findGoMapAllowlistGuardSanitizers(code));
@@ -26426,6 +26427,29 @@ function hasIntegrityVerifierAnywhere(lines) {
26426
26427
  }
26427
26428
  return false;
26428
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
+ }
26429
26453
  function findBashRegexAllowlistSanitizers(code) {
26430
26454
  const sanitizers = [];
26431
26455
  const lines = code.split(`
@@ -45980,7 +46004,7 @@ var colors = {
45980
46004
  };
45981
46005
 
45982
46006
  // src/version.ts
45983
- var version = "3.191.0";
46007
+ var version = "3.192.0";
45984
46008
 
45985
46009
  // src/formatters.ts
45986
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.191.0",
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.191.0"
69
+ "circle-ir": "^3.192.0"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@types/node": "^25.5.0",