circle-ir 3.52.0 → 3.53.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.
@@ -668,22 +668,6 @@
668
668
  "arg_positions": [0],
669
669
  "note": "Unzip operation - zip slip"
670
670
  },
671
- {
672
- "method": "getPath",
673
- "class": "ZipEntry",
674
- "type": "path_traversal",
675
- "cwe": "CWE-022",
676
- "severity": "high",
677
- "note": "Zip entry path - may contain ../"
678
- },
679
- {
680
- "method": "getName",
681
- "class": "ZipEntry",
682
- "type": "path_traversal",
683
- "cwe": "CWE-022",
684
- "severity": "high",
685
- "note": "Zip entry name - may contain ../"
686
- },
687
671
  {
688
672
  "method": "getEnvironment",
689
673
  "class": "ConfigServicePropertySourceLocator",
@@ -144,6 +144,38 @@
144
144
  "return_tainted": true,
145
145
  "note": "File content as InputStream"
146
146
  },
147
+ {
148
+ "method": "getName",
149
+ "class": "ZipEntry",
150
+ "type": "file_input",
151
+ "severity": "high",
152
+ "return_tainted": true,
153
+ "note": "Zip entry name - may contain ../ (Zip-Slip CWE-22, issue #52)"
154
+ },
155
+ {
156
+ "method": "getName",
157
+ "class": "ZipArchiveEntry",
158
+ "type": "file_input",
159
+ "severity": "high",
160
+ "return_tainted": true,
161
+ "note": "Apache Commons Compress zip entry name - may contain ../ (Zip-Slip)"
162
+ },
163
+ {
164
+ "method": "getName",
165
+ "class": "TarArchiveEntry",
166
+ "type": "file_input",
167
+ "severity": "high",
168
+ "return_tainted": true,
169
+ "note": "Apache Commons Compress tar entry name - may contain ../ (Tar-Slip)"
170
+ },
171
+ {
172
+ "method": "getName",
173
+ "class": "ArchiveEntry",
174
+ "type": "file_input",
175
+ "severity": "high",
176
+ "return_tainted": true,
177
+ "note": "Generic archive entry name - may contain ../ (Zip/Tar-Slip)"
178
+ },
147
179
  {
148
180
  "method": "getProperty",
149
181
  "class": "Properties",
@@ -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;IACrB,UAAU,EAAE,gBAAgB,EAAE,CAAC;CAChC,CAcA;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,cAAc,EAAE,MAAM,EAAE,EACxB,YAAY,EAAE,MAAM,EAAE,GACrB,WAAW,CAQb;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,aAAa,EA4a1C,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,WAAW,EA8wCtC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,gBAAgB,EAoMhD,CAAC;AAEF;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,WAAW,CAM9C;AAMD;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,EAAE,UAAU,EA8F5C,CAAC"}
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;IACrB,UAAU,EAAE,gBAAgB,EAAE,CAAC;CAChC,CAcA;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,cAAc,EAAE,MAAM,EAAE,EACxB,YAAY,EAAE,MAAM,EAAE,GACrB,WAAW,CAQb;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,aAAa,EAob1C,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,WAAW,EA8wCtC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,gBAAgB,EAoMhD,CAAC;AAEF;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,WAAW,CAM9C;AAMD;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,EAAE,UAAU,EA8F5C,CAAC"}
@@ -176,6 +176,13 @@ export const DEFAULT_SOURCES = [
176
176
  { method: 'getFileName', class: 'BodyPart', type: 'file_input', severity: 'high', return_tainted: true },
177
177
  { method: 'getFileName', class: 'MimeBodyPart', type: 'file_input', severity: 'high', return_tainted: true },
178
178
  { method: 'getDisposition', class: 'Part', type: 'file_input', severity: 'medium', return_tainted: true },
179
+ // Archive entry names (Zip-Slip / Tar-Slip CWE-22, issue #52)
180
+ // entry.getName() returns a path that may contain ../ — flowing into File()/FileOutputStream()
181
+ // is a classic Zip-Slip vulnerability.
182
+ { method: 'getName', class: 'ZipEntry', type: 'file_input', severity: 'high', return_tainted: true },
183
+ { method: 'getName', class: 'ZipArchiveEntry', type: 'file_input', severity: 'high', return_tainted: true },
184
+ { method: 'getName', class: 'TarArchiveEntry', type: 'file_input', severity: 'high', return_tainted: true },
185
+ { method: 'getName', class: 'ArchiveEntry', type: 'file_input', severity: 'high', return_tainted: true },
179
186
  // Command line arguments
180
187
  { method: 'getArgs', type: 'io_input', severity: 'high', return_tainted: true },
181
188
  { method: 'getOptionValue', class: 'CommandLine', type: 'io_input', severity: 'high', return_tainted: true },
@@ -610,7 +617,7 @@ export const DEFAULT_SINKS = [
610
617
  { method: 'staticFileLocation', type: 'path_traversal', cwe: 'CWE-22', severity: 'high', arg_positions: [0] },
611
618
  // Zip/archive handling
612
619
  { method: 'getEntry', class: 'ZipFile', type: 'path_traversal', cwe: 'CWE-22', severity: 'high', arg_positions: [0] },
613
- { method: 'getName', class: 'ZipEntry', type: 'path_traversal', cwe: 'CWE-22', severity: 'high', arg_positions: [] },
620
+ // ZipEntry.getName moved to file_sources.yaml as a taint SOURCE (type=archive_entry, issue #52)
614
621
  // Resource loading classes (various frameworks)
615
622
  { method: 'ClassPathResource', class: 'constructor', type: 'path_traversal', cwe: 'CWE-22', severity: 'high', arg_positions: [0] },
616
623
  { method: 'FileSystemResource', class: 'constructor', type: 'path_traversal', cwe: 'CWE-22', severity: 'high', arg_positions: [0] },