circle-ir 4.18.1 → 4.19.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 (35) hide show
  1. package/dist/analysis/config-loader.js +22 -22
  2. package/dist/analysis/config-loader.js.map +1 -1
  3. package/dist/analysis/interprocedural.d.ts +6 -0
  4. package/dist/analysis/interprocedural.d.ts.map +1 -1
  5. package/dist/analysis/interprocedural.js +53 -6
  6. package/dist/analysis/interprocedural.js.map +1 -1
  7. package/dist/analysis/js-helper-return.d.ts +12 -0
  8. package/dist/analysis/js-helper-return.d.ts.map +1 -0
  9. package/dist/analysis/js-helper-return.js +64 -0
  10. package/dist/analysis/js-helper-return.js.map +1 -0
  11. package/dist/analysis/passes/interprocedural-pass.d.ts.map +1 -1
  12. package/dist/analysis/passes/interprocedural-pass.js +8 -6
  13. package/dist/analysis/passes/interprocedural-pass.js.map +1 -1
  14. package/dist/analysis/passes/language-sources-pass.d.ts.map +1 -1
  15. package/dist/analysis/passes/language-sources-pass.js +40 -1
  16. package/dist/analysis/passes/language-sources-pass.js.map +1 -1
  17. package/dist/analysis/passes/resource-leak-pass.d.ts.map +1 -1
  18. package/dist/analysis/passes/resource-leak-pass.js +5 -1
  19. package/dist/analysis/passes/resource-leak-pass.js.map +1 -1
  20. package/dist/analysis/passes/sink-filter-pass.d.ts.map +1 -1
  21. package/dist/analysis/passes/sink-filter-pass.js +38 -1
  22. package/dist/analysis/passes/sink-filter-pass.js.map +1 -1
  23. package/dist/analysis/taint-matcher.d.ts.map +1 -1
  24. package/dist/analysis/taint-matcher.js +68 -2
  25. package/dist/analysis/taint-matcher.js.map +1 -1
  26. package/dist/browser/circle-ir.js +229 -41
  27. package/dist/core/circle-ir-core.cjs +140 -29
  28. package/dist/core/circle-ir-core.js +140 -29
  29. package/dist/core/extractors/dfg.js +46 -7
  30. package/dist/core/extractors/dfg.js.map +1 -1
  31. package/dist/resolution/cross-file.d.ts +2 -0
  32. package/dist/resolution/cross-file.d.ts.map +1 -1
  33. package/dist/resolution/cross-file.js +22 -0
  34. package/dist/resolution/cross-file.js.map +1 -1
  35. package/package.json +1 -1
@@ -1441,7 +1441,7 @@ export const DEFAULT_SINKS = [
1441
1441
  { method: 'renderHTML', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [0] },
1442
1442
  { method: 'parseHTML', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [0] },
1443
1443
  // HTML sanitizer/validator sinks (AntiSamy, OWASP HTML Sanitizer, etc.)
1444
- { method: 'scan', class: 'AntiSamy', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [0] },
1444
+ { method: 'scan', class: 'AntiSamy', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [0], languages: ['java'] },
1445
1445
  { method: 'isValid', class: 'SafeHtmlValidator', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [0] },
1446
1446
  { method: 'sanitize', class: 'PolicyFactory', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [0] },
1447
1447
  { method: 'validate', type: 'xss', cwe: 'CWE-79', severity: 'medium', arg_positions: [0] },
@@ -1457,8 +1457,8 @@ export const DEFAULT_SINKS = [
1457
1457
  { method: 'writeAttribute', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [0, 1] },
1458
1458
  // AntiSamy specific (SAX filters)
1459
1459
  { method: 'startElement', class: 'MagicSAXFilter', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [0, 1, 2] },
1460
- { method: 'scan', class: 'AntiSamyDOMScanner', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [0] },
1461
- { method: 'scan', class: 'AntiSamySAXScanner', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [0] },
1460
+ { method: 'scan', class: 'AntiSamyDOMScanner', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [0], languages: ['java'] },
1461
+ { method: 'scan', class: 'AntiSamySAXScanner', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [0], languages: ['java'] },
1462
1462
  // Hibernate Validator
1463
1463
  { method: 'getFragmentAsDocument', class: 'SafeHtmlValidator', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [0] },
1464
1464
  // JSPWiki specific
@@ -1508,15 +1508,15 @@ export const DEFAULT_SINKS = [
1508
1508
  { method: 'getValidListItem', class: 'DefaultValidator', type: 'xss', cwe: 'CWE-79', severity: 'medium', arg_positions: [0, 1] },
1509
1509
  { method: 'isValidURI', class: 'DefaultValidator', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [0, 1] },
1510
1510
  // AntiSamy test/processing methods
1511
- { method: 'scriptAttacks', class: 'AntiSamyTest', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [] },
1512
- { method: 'imgAttacks', class: 'AntiSamyTest', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [] },
1513
- { method: 'hrefAttacks', class: 'AntiSamyTest', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [] },
1514
- { method: 'cssAttacks', class: 'AntiSamyTest', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [] },
1515
- { method: 'IllegalXML', class: 'AntiSamyTest', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [] },
1516
- { method: 'testIssue2', class: 'AntiSamyTest', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [] },
1517
- { method: 'issue41', class: 'AntiSamyTest', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [] },
1518
- { method: 'testGithubIssue151', class: 'AntiSamyTest', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [] },
1519
- { method: 'processStyleTag', class: 'AntiSamyDOMScanner', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [0] },
1511
+ { method: 'scriptAttacks', class: 'AntiSamyTest', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [], languages: ['java'] },
1512
+ { method: 'imgAttacks', class: 'AntiSamyTest', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [], languages: ['java'] },
1513
+ { method: 'hrefAttacks', class: 'AntiSamyTest', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [], languages: ['java'] },
1514
+ { method: 'cssAttacks', class: 'AntiSamyTest', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [], languages: ['java'] },
1515
+ { method: 'IllegalXML', class: 'AntiSamyTest', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [], languages: ['java'] },
1516
+ { method: 'testIssue2', class: 'AntiSamyTest', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [], languages: ['java'] },
1517
+ { method: 'issue41', class: 'AntiSamyTest', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [], languages: ['java'] },
1518
+ { method: 'testGithubIssue151', class: 'AntiSamyTest', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [], languages: ['java'] },
1519
+ { method: 'processStyleTag', class: 'AntiSamyDOMScanner', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [0], languages: ['java'] },
1520
1520
  // JSON Sanitizer
1521
1521
  { method: 'sanitizeString', class: 'JsonSanitizer', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [0] },
1522
1522
  { method: 'testIssue13', class: 'JsonSanitizerTest', type: 'xss', cwe: 'CWE-79', severity: 'high', arg_positions: [] },
@@ -2341,16 +2341,16 @@ export const DEFAULT_SINKS = [
2341
2341
  { method: 'parse', class: 'sax', type: 'xxe', cwe: 'CWE-611', severity: 'high', arg_positions: [0] },
2342
2342
  { method: 'XMLParser', class: 'lxml', type: 'xxe', cwe: 'CWE-611', severity: 'high', arg_positions: [0] },
2343
2343
  // Python LDAP Injection
2344
- { method: 'search', class: 'ldap', type: 'ldap_injection', cwe: 'CWE-90', severity: 'high', arg_positions: [0, 2] },
2345
- { method: 'search_s', class: 'ldap', type: 'ldap_injection', cwe: 'CWE-90', severity: 'high', arg_positions: [0, 2] },
2346
- { method: 'search_ext', class: 'ldap', type: 'ldap_injection', cwe: 'CWE-90', severity: 'high', arg_positions: [0, 2] },
2347
- { method: 'search_ext_s', class: 'ldap', type: 'ldap_injection', cwe: 'CWE-90', severity: 'high', arg_positions: [0, 2] },
2344
+ { method: 'search', class: 'ldap', type: 'ldap_injection', cwe: 'CWE-90', severity: 'high', arg_positions: [0, 2], languages: ['python'] },
2345
+ { method: 'search_s', class: 'ldap', type: 'ldap_injection', cwe: 'CWE-90', severity: 'high', arg_positions: [0, 2], languages: ['python'] },
2346
+ { method: 'search_ext', class: 'ldap', type: 'ldap_injection', cwe: 'CWE-90', severity: 'high', arg_positions: [0, 2], languages: ['python'] },
2347
+ { method: 'search_ext_s', class: 'ldap', type: 'ldap_injection', cwe: 'CWE-90', severity: 'high', arg_positions: [0, 2], languages: ['python'] },
2348
2348
  // ldap3 library (different API from python-ldap)
2349
- { method: 'search', class: 'Connection', type: 'ldap_injection', cwe: 'CWE-90', severity: 'high', arg_positions: [0, 1] },
2350
- { method: 'extend', class: 'Connection', type: 'ldap_injection', cwe: 'CWE-90', severity: 'high', arg_positions: [0] },
2351
- { method: 'modify', class: 'Connection', type: 'ldap_injection', cwe: 'CWE-90', severity: 'high', arg_positions: [0] },
2352
- { method: 'add', class: 'Connection', type: 'ldap_injection', cwe: 'CWE-90', severity: 'high', arg_positions: [0] },
2353
- { method: 'delete', class: 'Connection', type: 'ldap_injection', cwe: 'CWE-90', severity: 'high', arg_positions: [0] },
2349
+ { method: 'search', class: 'Connection', type: 'ldap_injection', cwe: 'CWE-90', severity: 'high', arg_positions: [0, 1], languages: ['python'] },
2350
+ { method: 'extend', class: 'Connection', type: 'ldap_injection', cwe: 'CWE-90', severity: 'high', arg_positions: [0], languages: ['python'] },
2351
+ { method: 'modify', class: 'Connection', type: 'ldap_injection', cwe: 'CWE-90', severity: 'high', arg_positions: [0], languages: ['python'] },
2352
+ { method: 'add', class: 'Connection', type: 'ldap_injection', cwe: 'CWE-90', severity: 'high', arg_positions: [0], languages: ['python'] },
2353
+ { method: 'delete', class: 'Connection', type: 'ldap_injection', cwe: 'CWE-90', severity: 'high', arg_positions: [0], languages: ['python'] },
2354
2354
  // Python Trust Boundary (CWE-501)
2355
2355
  // The vulnerability is storing untrusted data in session that gets trusted later
2356
2356
  { method: '__setitem__', class: 'session', type: 'trust_boundary', cwe: 'CWE-501', severity: 'medium', arg_positions: [1] },
@@ -2441,7 +2441,7 @@ export const DEFAULT_SINKS = [
2441
2441
  { method: 'put', class: 'VelocityContext', type: 'xss', cwe: 'CWE-79', severity: 'medium', arg_positions: [1] },
2442
2442
  { method: 'setVariable', class: 'Context', type: 'xss', cwe: 'CWE-79', severity: 'medium', arg_positions: [1] },
2443
2443
  // HTML sanitizer bypass markers (known CVE patterns)
2444
- { method: 'clean', class: 'AntiSamy', type: 'xss', cwe: 'CWE-79', severity: 'medium', arg_positions: [0] },
2444
+ { method: 'clean', class: 'AntiSamy', type: 'xss', cwe: 'CWE-79', severity: 'medium', arg_positions: [0], languages: ['java'] },
2445
2445
  { method: 'getValidSafeHTML', class: 'ESAPI', type: 'xss', cwe: 'CWE-79', severity: 'medium', arg_positions: [0] },
2446
2446
  // NOTE (cognium-dev#270): `HttpServletRequest`/`HttpSession.getAttribute()`
2447
2447
  // were registered here as xss sinks to model "attribute reflection XSS", but