cognium-dev 3.161.0 → 3.162.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 +13 -8
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -10226,6 +10226,7 @@ var DEFAULT_SOURCES = [
10226
10226
  { method: "getPathWithinApplication", class: "WebUtils", type: "http_path", severity: "high", return_tainted: true },
10227
10227
  { method: "getRequestUri", class: "WebUtils", type: "http_path", severity: "high", return_tainted: true },
10228
10228
  { method: "decodeRequestString", class: "WebUtils", type: "http_path", severity: "high", return_tainted: true },
10229
+ { method: "decode", class: "URLDecoder", type: "http_path", severity: "high", return_tainted: true },
10229
10230
  { method: "getProtocol", class: "HttpServletRequest", type: "http_header", severity: "medium", return_tainted: true },
10230
10231
  { method: "getScheme", class: "HttpServletRequest", type: "http_header", severity: "medium", return_tainted: true },
10231
10232
  { method: "getAuthType", class: "HttpServletRequest", type: "http_header", severity: "medium", return_tainted: true },
@@ -11561,11 +11562,11 @@ var DEFAULT_SANITIZERS = [
11561
11562
  { method: "render", class: "Template", removes: ["xss"] },
11562
11563
  { method: "encodeForJavaScript", removes: ["xss"] },
11563
11564
  { method: "encodeForCSS", removes: ["xss"] },
11564
- { method: "encodeForURL", removes: ["xss", "ssrf"] },
11565
- { method: "encodeURL", removes: ["xss", "ssrf"] },
11566
- { method: "urlEncode", removes: ["xss", "ssrf"] },
11567
- { method: "escapeUrl", removes: ["xss", "ssrf"] },
11568
- { method: "escapeURL", removes: ["xss", "ssrf"] },
11565
+ { method: "encodeForURL", removes: ["xss", "ssrf", "open_redirect"] },
11566
+ { method: "encodeURL", removes: ["xss", "ssrf", "open_redirect"] },
11567
+ { method: "urlEncode", removes: ["xss", "ssrf", "open_redirect"] },
11568
+ { method: "escapeUrl", removes: ["xss", "ssrf", "open_redirect"] },
11569
+ { method: "escapeURL", removes: ["xss", "ssrf", "open_redirect"] },
11569
11570
  { method: "normalize", class: "Path", removes: ["path_traversal"] },
11570
11571
  { method: "getCanonicalPath", class: "File", removes: ["path_traversal"] },
11571
11572
  { method: "toRealPath", class: "Path", removes: ["path_traversal"] },
@@ -11591,7 +11592,7 @@ var DEFAULT_SANITIZERS = [
11591
11592
  { method: "setFeature", class: "SAXParserFactory", removes: ["xxe"] },
11592
11593
  { method: "setFeature", class: "XMLReader", removes: ["xxe"] },
11593
11594
  { method: "setProperty", class: "XMLReader", removes: ["xxe"] },
11594
- { method: "encode", class: "URLEncoder", removes: ["ssrf", "xss", "path_traversal"] },
11595
+ { method: "encode", class: "URLEncoder", removes: ["ssrf", "xss", "path_traversal", "open_redirect"] },
11595
11596
  { method: "validateURL", removes: ["ssrf"] },
11596
11597
  { method: "isAllowedHost", removes: ["ssrf"] },
11597
11598
  { method: "isInternalHost", removes: ["ssrf"] },
@@ -16088,7 +16089,7 @@ var KNOWN_SINK_TYPES = new Set([
16088
16089
  "crlf",
16089
16090
  "mass_assignment"
16090
16091
  ]);
16091
- function checkSanitized(_fromLine, toLine, sinkType, sanitizersByLine, ctx) {
16092
+ function checkSanitized(fromLine, toLine, sinkType, sanitizersByLine, ctx) {
16092
16093
  const isKnownSinkType = KNOWN_SINK_TYPES.has(sinkType);
16093
16094
  const sanitizersAtTarget = sanitizersByLine.get(toLine);
16094
16095
  if (sanitizersAtTarget && sanitizersAtTarget.length > 0) {
@@ -16107,6 +16108,8 @@ function checkSanitized(_fromLine, toLine, sinkType, sanitizersByLine, ctx) {
16107
16108
  for (const line of walk.lines) {
16108
16109
  if (line === toLine)
16109
16110
  continue;
16111
+ if (line < fromLine)
16112
+ continue;
16110
16113
  const sansAtLine = sanitizersByLine.get(line);
16111
16114
  if (!sansAtLine || sansAtLine.length === 0)
16112
16115
  continue;
@@ -32082,6 +32085,8 @@ class TaintPropagationPass {
32082
32085
  for (const line of walk.lines) {
32083
32086
  if (line === f.sink_line)
32084
32087
  continue;
32088
+ if (line < f.source_line)
32089
+ continue;
32085
32090
  const sansAtLine = sanitizersByLine.get(line);
32086
32091
  if (!sansAtLine || sansAtLine.length === 0)
32087
32092
  continue;
@@ -43841,7 +43846,7 @@ var colors = {
43841
43846
  };
43842
43847
 
43843
43848
  // src/version.ts
43844
- var version = "3.161.0";
43849
+ var version = "3.162.0";
43845
43850
 
43846
43851
  // src/formatters.ts
43847
43852
  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.161.0",
3
+ "version": "3.162.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.161.0"
69
+ "circle-ir": "^3.162.0"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@types/node": "^25.5.0",