circle-ir 3.79.0 → 3.81.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 (37) 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 +17 -5
  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/insecure-cookie-pass.d.ts.map +1 -1
  14. package/dist/analysis/passes/insecure-cookie-pass.js +10 -5
  15. package/dist/analysis/passes/insecure-cookie-pass.js.map +1 -1
  16. package/dist/analysis/passes/plaintext-password-storage-pass.d.ts +47 -0
  17. package/dist/analysis/passes/plaintext-password-storage-pass.d.ts.map +1 -0
  18. package/dist/analysis/passes/plaintext-password-storage-pass.js +159 -0
  19. package/dist/analysis/passes/plaintext-password-storage-pass.js.map +1 -0
  20. package/dist/analysis/passes/scan-secrets-pass.d.ts.map +1 -1
  21. package/dist/analysis/passes/scan-secrets-pass.js +88 -0
  22. package/dist/analysis/passes/scan-secrets-pass.js.map +1 -1
  23. package/dist/analysis/passes/weak-password-encoding-pass.d.ts +40 -0
  24. package/dist/analysis/passes/weak-password-encoding-pass.d.ts.map +1 -0
  25. package/dist/analysis/passes/weak-password-encoding-pass.js +157 -0
  26. package/dist/analysis/passes/weak-password-encoding-pass.js.map +1 -0
  27. package/dist/analysis/passes/weak-password-hash-pass.d.ts +49 -0
  28. package/dist/analysis/passes/weak-password-hash-pass.d.ts.map +1 -0
  29. package/dist/analysis/passes/weak-password-hash-pass.js +225 -0
  30. package/dist/analysis/passes/weak-password-hash-pass.js.map +1 -0
  31. package/dist/analyzer.d.ts.map +1 -1
  32. package/dist/analyzer.js +12 -0
  33. package/dist/analyzer.js.map +1 -1
  34. package/dist/browser/circle-ir.js +621 -7
  35. package/dist/core/circle-ir-core.cjs +17 -5
  36. package/dist/core/circle-ir-core.js +17 -5
  37. package/package.json +1 -1
@@ -10759,7 +10759,12 @@ var DEFAULT_SINKS = [
10759
10759
  // Class-less XSS patterns for cases where receiver type is inferred
10760
10760
  { method: "println", type: "xss", cwe: "CWE-79", severity: "medium", arg_positions: [0] },
10761
10761
  { method: "print", type: "xss", cwe: "CWE-79", severity: "medium", arg_positions: [0] },
10762
- { method: "write", type: "xss", cwe: "CWE-79", severity: "medium", arg_positions: [0] },
10762
+ // NOTE: the unscoped { method: 'write', type: 'xss' } entry was removed in
10763
+ // Sprint 28 (#110). It mistyped every non-XSS .write() across all languages
10764
+ // (fs.writeFile, open().write, bcrypt callbacks, credential file writes,
10765
+ // node ClientRequest.write, etc.) as xss. Real HTML writers are covered
10766
+ // by class-scoped entries: PrintWriter.write (line 843), ServletOutputStream.write
10767
+ // (line 849), JspWriter.write (xss.yaml), Response.write (nodejs.json).
10763
10768
  { method: "append", class: "StringBuilder", type: "xss", cwe: "CWE-79", severity: "medium", arg_positions: [0] },
10764
10769
  { method: "append", class: "StringBuffer", type: "xss", cwe: "CWE-79", severity: "medium", arg_positions: [0] },
10765
10770
  // Wiki/CMS XSS sinks (JSPWiki, Confluence, etc.)
@@ -11118,10 +11123,17 @@ var DEFAULT_SINKS = [
11118
11123
  // These patterns are detected by call-site literal inspection, not taint flow,
11119
11124
  // so they are NOT registered here as sinks (they could never match a "tainted
11120
11125
  // value flowing into a sink" because the bad value is a hard-coded constant).
11121
- // Trust Boundary (CWE-501) - using untrusted data as session attribute NAME
11122
- // The vulnerability is attacker controlling which key to use, not the value
11123
- { method: "setAttribute", class: "HttpSession", type: "trust_boundary", cwe: "CWE-501", severity: "medium", arg_positions: [0] },
11124
- { method: "putValue", class: "HttpSession", type: "trust_boundary", cwe: "CWE-501", severity: "medium", arg_positions: [0] },
11126
+ // Trust Boundary (CWE-501) tainted VALUE crossing into shared session
11127
+ // state. OWASP/CWE-501 treats `session.setAttribute("k", taintedValue)` as
11128
+ // the violation: untrusted data enters server-side state where downstream
11129
+ // code reads it as if trusted. Both arg positions are flagged so either a
11130
+ // tainted key (rare) or tainted value (the OWASP shape, 83 cases) trips
11131
+ // the sink. (cognium-dev #117)
11132
+ { method: "setAttribute", class: "HttpSession", type: "trust_boundary", cwe: "CWE-501", severity: "medium", arg_positions: [0, 1] },
11133
+ { method: "putValue", class: "HttpSession", type: "trust_boundary", cwe: "CWE-501", severity: "medium", arg_positions: [0, 1] },
11134
+ // ServletContext + request scopes — same trust-boundary semantics.
11135
+ { method: "setAttribute", class: "ServletContext", type: "trust_boundary", cwe: "CWE-501", severity: "medium", arg_positions: [0, 1] },
11136
+ { method: "setAttribute", class: "HttpServletRequest", type: "trust_boundary", cwe: "CWE-501", severity: "low", arg_positions: [0, 1] },
11125
11137
  // Additional XSS patterns (JDOM/XML output)
11126
11138
  { method: "outputElementContent", class: "XMLOutputter", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0] },
11127
11139
  { method: "output", class: "XMLOutputter", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0] },
@@ -10693,7 +10693,12 @@ var DEFAULT_SINKS = [
10693
10693
  // Class-less XSS patterns for cases where receiver type is inferred
10694
10694
  { method: "println", type: "xss", cwe: "CWE-79", severity: "medium", arg_positions: [0] },
10695
10695
  { method: "print", type: "xss", cwe: "CWE-79", severity: "medium", arg_positions: [0] },
10696
- { method: "write", type: "xss", cwe: "CWE-79", severity: "medium", arg_positions: [0] },
10696
+ // NOTE: the unscoped { method: 'write', type: 'xss' } entry was removed in
10697
+ // Sprint 28 (#110). It mistyped every non-XSS .write() across all languages
10698
+ // (fs.writeFile, open().write, bcrypt callbacks, credential file writes,
10699
+ // node ClientRequest.write, etc.) as xss. Real HTML writers are covered
10700
+ // by class-scoped entries: PrintWriter.write (line 843), ServletOutputStream.write
10701
+ // (line 849), JspWriter.write (xss.yaml), Response.write (nodejs.json).
10697
10702
  { method: "append", class: "StringBuilder", type: "xss", cwe: "CWE-79", severity: "medium", arg_positions: [0] },
10698
10703
  { method: "append", class: "StringBuffer", type: "xss", cwe: "CWE-79", severity: "medium", arg_positions: [0] },
10699
10704
  // Wiki/CMS XSS sinks (JSPWiki, Confluence, etc.)
@@ -11052,10 +11057,17 @@ var DEFAULT_SINKS = [
11052
11057
  // These patterns are detected by call-site literal inspection, not taint flow,
11053
11058
  // so they are NOT registered here as sinks (they could never match a "tainted
11054
11059
  // value flowing into a sink" because the bad value is a hard-coded constant).
11055
- // Trust Boundary (CWE-501) - using untrusted data as session attribute NAME
11056
- // The vulnerability is attacker controlling which key to use, not the value
11057
- { method: "setAttribute", class: "HttpSession", type: "trust_boundary", cwe: "CWE-501", severity: "medium", arg_positions: [0] },
11058
- { method: "putValue", class: "HttpSession", type: "trust_boundary", cwe: "CWE-501", severity: "medium", arg_positions: [0] },
11060
+ // Trust Boundary (CWE-501) tainted VALUE crossing into shared session
11061
+ // state. OWASP/CWE-501 treats `session.setAttribute("k", taintedValue)` as
11062
+ // the violation: untrusted data enters server-side state where downstream
11063
+ // code reads it as if trusted. Both arg positions are flagged so either a
11064
+ // tainted key (rare) or tainted value (the OWASP shape, 83 cases) trips
11065
+ // the sink. (cognium-dev #117)
11066
+ { method: "setAttribute", class: "HttpSession", type: "trust_boundary", cwe: "CWE-501", severity: "medium", arg_positions: [0, 1] },
11067
+ { method: "putValue", class: "HttpSession", type: "trust_boundary", cwe: "CWE-501", severity: "medium", arg_positions: [0, 1] },
11068
+ // ServletContext + request scopes — same trust-boundary semantics.
11069
+ { method: "setAttribute", class: "ServletContext", type: "trust_boundary", cwe: "CWE-501", severity: "medium", arg_positions: [0, 1] },
11070
+ { method: "setAttribute", class: "HttpServletRequest", type: "trust_boundary", cwe: "CWE-501", severity: "low", arg_positions: [0, 1] },
11059
11071
  // Additional XSS patterns (JDOM/XML output)
11060
11072
  { method: "outputElementContent", class: "XMLOutputter", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0] },
11061
11073
  { method: "output", class: "XMLOutputter", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0] },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "circle-ir",
3
- "version": "3.79.0",
3
+ "version": "3.81.0",
4
4
  "description": "High-performance Static Application Security Testing (SAST) library for detecting security vulnerabilities through taint analysis",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",