circle-ir 3.80.0 → 3.82.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 (39) hide show
  1. package/configs/sinks/xss.yaml +2 -1
  2. package/dist/analysis/config-loader.d.ts.map +1 -1
  3. package/dist/analysis/config-loader.js +26 -4
  4. package/dist/analysis/config-loader.js.map +1 -1
  5. package/dist/analysis/passes/_credential-helpers.d.ts +40 -0
  6. package/dist/analysis/passes/_credential-helpers.d.ts.map +1 -0
  7. package/dist/analysis/passes/_credential-helpers.js +152 -0
  8. package/dist/analysis/passes/_credential-helpers.js.map +1 -0
  9. package/dist/analysis/passes/cleartext-credential-transport-pass.d.ts +42 -0
  10. package/dist/analysis/passes/cleartext-credential-transport-pass.d.ts.map +1 -0
  11. package/dist/analysis/passes/cleartext-credential-transport-pass.js +196 -0
  12. package/dist/analysis/passes/cleartext-credential-transport-pass.js.map +1 -0
  13. package/dist/analysis/passes/info-disclosure-stacktrace-pass.d.ts +48 -0
  14. package/dist/analysis/passes/info-disclosure-stacktrace-pass.d.ts.map +1 -0
  15. package/dist/analysis/passes/info-disclosure-stacktrace-pass.js +222 -0
  16. package/dist/analysis/passes/info-disclosure-stacktrace-pass.js.map +1 -0
  17. package/dist/analysis/passes/plaintext-password-storage-pass.d.ts +47 -0
  18. package/dist/analysis/passes/plaintext-password-storage-pass.d.ts.map +1 -0
  19. package/dist/analysis/passes/plaintext-password-storage-pass.js +159 -0
  20. package/dist/analysis/passes/plaintext-password-storage-pass.js.map +1 -0
  21. package/dist/analysis/passes/unrestricted-file-upload-pass.d.ts +46 -0
  22. package/dist/analysis/passes/unrestricted-file-upload-pass.d.ts.map +1 -0
  23. package/dist/analysis/passes/unrestricted-file-upload-pass.js +193 -0
  24. package/dist/analysis/passes/unrestricted-file-upload-pass.js.map +1 -0
  25. package/dist/analysis/passes/weak-password-encoding-pass.d.ts +40 -0
  26. package/dist/analysis/passes/weak-password-encoding-pass.d.ts.map +1 -0
  27. package/dist/analysis/passes/weak-password-encoding-pass.js +157 -0
  28. package/dist/analysis/passes/weak-password-encoding-pass.js.map +1 -0
  29. package/dist/analysis/passes/weak-password-hash-pass.d.ts +49 -0
  30. package/dist/analysis/passes/weak-password-hash-pass.d.ts.map +1 -0
  31. package/dist/analysis/passes/weak-password-hash-pass.js +225 -0
  32. package/dist/analysis/passes/weak-password-hash-pass.js.map +1 -0
  33. package/dist/analyzer.d.ts.map +1 -1
  34. package/dist/analyzer.js +18 -0
  35. package/dist/analyzer.js.map +1 -1
  36. package/dist/browser/circle-ir.js +912 -4
  37. package/dist/core/circle-ir-core.cjs +26 -4
  38. package/dist/core/circle-ir-core.js +26 -4
  39. package/package.json +1 -1
@@ -418,13 +418,14 @@
418
418
  },
419
419
  {
420
420
  "method": "write",
421
+ "class": "ServletOutputStream",
421
422
  "type": "xss",
422
423
  "cwe": "CWE-79",
423
424
  "severity": "high",
424
425
  "arg_positions": [
425
426
  0
426
427
  ],
427
- "note": "Auto-mined from CVE analysis"
428
+ "note": "Servlet response output stream — class-scoped (Sprint 28 #110)"
428
429
  },
429
430
  {
430
431
  "method": "newInstance",
@@ -1 +1 @@
1
- {"version":3,"file":"config-loader.d.ts","sourceRoot":"","sources":["../../src/analysis/config-loader.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,UAAU,EACV,WAAW,EACX,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,UAAU,EACX,MAAM,oBAAoB,CAAC;AAE5B;;;GAGG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,CAAC,CAEjD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,aAAa,EAAE,CAiB1E;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG;IACtD,KAAK,EAAE,WAAW,EAAE,CAAC;IACr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CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,gBAAgB,EA+QhD,CAAC;AAEF;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,WAAW,CAM9C;AAMD;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,EAAE,UAAU,EA8F5C,CAAC"}
@@ -775,7 +775,12 @@ export const DEFAULT_SINKS = [
775
775
  // Class-less XSS patterns for cases where receiver type is inferred
776
776
  { method: 'println', type: 'xss', cwe: 'CWE-79', severity: 'medium', arg_positions: [0] },
777
777
  { method: 'print', type: 'xss', cwe: 'CWE-79', severity: 'medium', arg_positions: [0] },
778
- { method: 'write', type: 'xss', cwe: 'CWE-79', severity: 'medium', arg_positions: [0] },
778
+ // NOTE: the unscoped { method: 'write', type: 'xss' } entry was removed in
779
+ // Sprint 28 (#110). It mistyped every non-XSS .write() across all languages
780
+ // (fs.writeFile, open().write, bcrypt callbacks, credential file writes,
781
+ // node ClientRequest.write, etc.) as xss. Real HTML writers are covered
782
+ // by class-scoped entries: PrintWriter.write (line 843), ServletOutputStream.write
783
+ // (line 849), JspWriter.write (xss.yaml), Response.write (nodejs.json).
779
784
  { method: 'append', class: 'StringBuilder', type: 'xss', cwe: 'CWE-79', severity: 'medium', arg_positions: [0] },
780
785
  { method: 'append', class: 'StringBuffer', type: 'xss', cwe: 'CWE-79', severity: 'medium', arg_positions: [0] },
781
786
  // Wiki/CMS XSS sinks (JSPWiki, Confluence, etc.)
@@ -1961,9 +1966,26 @@ export const DEFAULT_SANITIZERS = [
1961
1966
  // JSON.parse (data is validated against JSON grammar, prevents XSS/code injection)
1962
1967
  { method: 'parse', class: 'JSON', removes: ['xss', 'code_injection'] },
1963
1968
  // Type coercion (removes string-based injections)
1964
- { method: 'parseInt', removes: ['sql_injection', 'nosql_injection', 'command_injection', 'xss'] },
1965
- { method: 'parseFloat', removes: ['sql_injection', 'nosql_injection', 'command_injection'] },
1966
- { method: 'Number', removes: ['sql_injection', 'nosql_injection', 'command_injection'] },
1969
+ // Sprint 29 (#113): include external_taint_escape a numeric cast cannot
1970
+ // carry an unvalidated string payload across a function boundary.
1971
+ { method: 'parseInt', removes: ['sql_injection', 'nosql_injection', 'command_injection', 'xss', 'external_taint_escape', 'path_traversal', 'code_injection'] },
1972
+ { method: 'parseFloat', removes: ['sql_injection', 'nosql_injection', 'command_injection', 'external_taint_escape', 'path_traversal', 'code_injection'] },
1973
+ { method: 'Number', removes: ['sql_injection', 'nosql_injection', 'command_injection', 'external_taint_escape', 'path_traversal', 'code_injection'] },
1974
+ // Sprint 29 (#113): bounds-clamp Math.min / Math.max — when used to bound
1975
+ // a numeric/size value (e.g. `Math.min(size, MAX_BYTES)`), the result is
1976
+ // safely bounded and cannot resource-exhaust downstream. Only suppress
1977
+ // external_taint_escape — these helpers do NOT sanitize string injection.
1978
+ { method: 'min', class: 'Math', removes: ['external_taint_escape'] },
1979
+ { method: 'max', class: 'Math', removes: ['external_taint_escape'] },
1980
+ // Sprint 29 (#113): allow-list / membership guards — when an external value
1981
+ // is tested against an allow-list (`ALLOWED.includes(x)`, `set.has(x)`,
1982
+ // `list.contains(x)`) before being forwarded, it cannot escape unbounded.
1983
+ // Only suppress `external_taint_escape`; real string-injection sinks should
1984
+ // still rely on their own escaping.
1985
+ { method: 'includes', removes: ['external_taint_escape'] },
1986
+ { method: 'has', removes: ['external_taint_escape'] },
1987
+ { method: 'contains', removes: ['external_taint_escape'] },
1988
+ { method: 'indexOf', removes: ['external_taint_escape'] },
1967
1989
  // Path sanitization
1968
1990
  { method: 'basename', class: 'path', removes: ['path_traversal'] },
1969
1991
  { method: 'normalize', class: 'path', removes: ['path_traversal'] },