circle-ir 3.186.0 → 3.187.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.
- package/dist/analysis/config-loader.d.ts.map +1 -1
- package/dist/analysis/config-loader.js +81 -0
- package/dist/analysis/config-loader.js.map +1 -1
- package/dist/browser/circle-ir.js +81 -0
- package/dist/core/circle-ir-core.cjs +81 -0
- package/dist/core/circle-ir-core.js +81 -0
- package/package.json +1 -1
|
@@ -13239,10 +13239,49 @@ var DEFAULT_SINKS = [
|
|
|
13239
13239
|
var DEFAULT_SANITIZERS = [
|
|
13240
13240
|
// SQL Injection - proper parameter binding sanitizes input
|
|
13241
13241
|
// Note: prepareStatement alone is NOT a sanitizer - it's a sink when used with concatenation
|
|
13242
|
+
//
|
|
13243
|
+
// Full PreparedStatement setter coverage (cognium-dev #213 seventh slice).
|
|
13244
|
+
// Every JDBC PreparedStatement.setXxx binds a parameter placeholder via
|
|
13245
|
+
// the driver wire protocol — the SQL text is fixed, only the value slot
|
|
13246
|
+
// varies. Prior coverage was setString/setInt/setLong only; extending
|
|
13247
|
+
// to the full JDBC 4.x setter surface so real Java apps using date/
|
|
13248
|
+
// decimal/object/binary bindings credit as sanitized.
|
|
13242
13249
|
{ method: "setString", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
13250
|
+
{ method: "setNString", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
13243
13251
|
{ method: "setInt", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
13244
13252
|
{ method: "setLong", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
13253
|
+
{ method: "setShort", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
13254
|
+
{ method: "setByte", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
13255
|
+
{ method: "setBoolean", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
13256
|
+
{ method: "setDouble", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
13257
|
+
{ method: "setFloat", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
13258
|
+
{ method: "setBigDecimal", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
13259
|
+
{ method: "setBytes", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
13260
|
+
{ method: "setDate", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
13261
|
+
{ method: "setTime", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
13262
|
+
{ method: "setTimestamp", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
13263
|
+
{ method: "setObject", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
13264
|
+
{ method: "setNull", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
13265
|
+
{ method: "setArray", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
13266
|
+
{ method: "setBlob", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
13267
|
+
{ method: "setClob", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
13268
|
+
{ method: "setNClob", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
13269
|
+
{ method: "setRef", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
13270
|
+
{ method: "setRowId", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
13271
|
+
{ method: "setSQLXML", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
13272
|
+
{ method: "setURL", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
13273
|
+
{ method: "setBinaryStream", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
13274
|
+
{ method: "setCharacterStream", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
13275
|
+
{ method: "setAsciiStream", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
13276
|
+
{ method: "setNCharacterStream", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
13277
|
+
// JPA / Hibernate Query.setParameter — covered above; add TypedQuery
|
|
13278
|
+
// (same interface but distinct type name).
|
|
13245
13279
|
{ method: "setParameter", class: "Query", removes: ["sql_injection"] },
|
|
13280
|
+
{ method: "setParameter", class: "TypedQuery", removes: ["sql_injection"] },
|
|
13281
|
+
// Spring JdbcTemplate `NamedParameterJdbcTemplate.update / queryForObject`
|
|
13282
|
+
// parameterized shapes use SqlParameterSource.addValue — the addValue
|
|
13283
|
+
// call binds the parameter safely.
|
|
13284
|
+
{ method: "addValue", class: "MapSqlParameterSource", removes: ["sql_injection"] },
|
|
13246
13285
|
{ annotation: "Param", removes: ["sql_injection"] },
|
|
13247
13286
|
// XSS
|
|
13248
13287
|
{ method: "escapeHtml", removes: ["xss"] },
|
|
@@ -13268,6 +13307,48 @@ var DEFAULT_SANITIZERS = [
|
|
|
13268
13307
|
// Rust askama auto-escapes
|
|
13269
13308
|
{ method: "encodeForJavaScript", removes: ["xss"] },
|
|
13270
13309
|
{ method: "encodeForCSS", removes: ["xss"] },
|
|
13310
|
+
// Additional Java XSS sanitizers (cognium-dev #213 seventh slice).
|
|
13311
|
+
//
|
|
13312
|
+
// Guava `HtmlEscapers.htmlEscaper().escape(x)` — the `.escape` call
|
|
13313
|
+
// on the returned Escaper is caught by the generic `escape` rule
|
|
13314
|
+
// above, but explicit registration makes intent clear.
|
|
13315
|
+
// Spring `HtmlUtils.htmlEscape(x)` — htmlEscape already covered
|
|
13316
|
+
// above (bare method name).
|
|
13317
|
+
// Apache Commons Text `StringEscapeUtils.escapeJson / escapeXml11 /
|
|
13318
|
+
// escapeEcmaScript / escapeCsv / escapeXsi`.
|
|
13319
|
+
// OWASP HTML Sanitizer `PolicyFactory.sanitize(html)`.
|
|
13320
|
+
{ method: "escape", class: "Escaper", removes: ["xss"] },
|
|
13321
|
+
{ method: "escape", class: "HtmlEscapers", removes: ["xss"] },
|
|
13322
|
+
{ method: "escapeJson", class: "StringEscapeUtils", removes: ["xss"] },
|
|
13323
|
+
{ method: "escapeEcmaScript", class: "StringEscapeUtils", removes: ["xss"] },
|
|
13324
|
+
{ method: "escapeXml11", class: "StringEscapeUtils", removes: ["xss"] },
|
|
13325
|
+
{ method: "escapeXml10", class: "StringEscapeUtils", removes: ["xss"] },
|
|
13326
|
+
{ method: "escapeCsv", class: "StringEscapeUtils", removes: ["xss"] },
|
|
13327
|
+
{ method: "escapeXsi", class: "StringEscapeUtils", removes: ["xss"] },
|
|
13328
|
+
{ method: "escapeJava", class: "StringEscapeUtils", removes: ["xss"] },
|
|
13329
|
+
// Bare escapeJson / escapeEcmaScript / escapeCsv aliases — common
|
|
13330
|
+
// when statically imported.
|
|
13331
|
+
{ method: "escapeJson", removes: ["xss"] },
|
|
13332
|
+
{ method: "escapeEcmaScript", removes: ["xss"] },
|
|
13333
|
+
{ method: "escapeCsv", removes: ["xss"] },
|
|
13334
|
+
// OWASP HTML sanitizer (`com.googlecode.owasp-java-html-sanitizer`).
|
|
13335
|
+
{ method: "sanitize", class: "PolicyFactory", removes: ["xss"] },
|
|
13336
|
+
// Java Base64 / Hex / MessageDigest — encoded output is binary-safe
|
|
13337
|
+
// (cognium-dev #213 seventh slice). None of these carry attacker
|
|
13338
|
+
// shell/SQL/HTML metacharacters through the encoding — Base64 emits
|
|
13339
|
+
// [A-Za-z0-9+/=], Hex emits [0-9a-f], MessageDigest.digest returns
|
|
13340
|
+
// opaque bytes usually toHex/toBase64-encoded downstream.
|
|
13341
|
+
{ method: "encodeToString", class: "Encoder", removes: ["sql_injection", "command_injection", "xss", "path_traversal", "code_injection"] },
|
|
13342
|
+
{ method: "encode", class: "Encoder", removes: ["sql_injection", "command_injection", "xss", "path_traversal", "code_injection"] },
|
|
13343
|
+
{ method: "encodeHexString", class: "Hex", removes: ["sql_injection", "command_injection", "xss", "path_traversal", "code_injection"] },
|
|
13344
|
+
{ method: "digest", class: "MessageDigest", removes: ["sql_injection", "command_injection", "xss", "path_traversal", "code_injection"] },
|
|
13345
|
+
// Bare aliases for encoder chains — `Base64.getEncoder().encodeToString(x)`
|
|
13346
|
+
// has a call-expression receiver (`Base64.getEncoder()`) that the Java IR
|
|
13347
|
+
// rarely resolves to `Encoder`. Same story for `Hex.encodeHexString(x)`
|
|
13348
|
+
// when Hex is imported. These bare-method names are dominated by their
|
|
13349
|
+
// encoding use in practice; false-positive risk is low.
|
|
13350
|
+
{ method: "encodeToString", removes: ["sql_injection", "command_injection", "xss", "path_traversal", "code_injection"] },
|
|
13351
|
+
{ method: "encodeHexString", removes: ["sql_injection", "command_injection", "xss", "path_traversal", "code_injection"] },
|
|
13271
13352
|
// cognium-dev #249 3.162.0: `open_redirect` restored to the URL-encoder
|
|
13272
13353
|
// sanitizer cluster. Sprint 82 (#189) reclassified `sendRedirect` from
|
|
13273
13354
|
// `ssrf` → `open_redirect` (config-loader.ts:1296-1299) without updating
|
|
@@ -12634,10 +12634,49 @@ var DEFAULT_SINKS = [
|
|
|
12634
12634
|
var DEFAULT_SANITIZERS = [
|
|
12635
12635
|
// SQL Injection - proper parameter binding sanitizes input
|
|
12636
12636
|
// Note: prepareStatement alone is NOT a sanitizer - it's a sink when used with concatenation
|
|
12637
|
+
//
|
|
12638
|
+
// Full PreparedStatement setter coverage (cognium-dev #213 seventh slice).
|
|
12639
|
+
// Every JDBC PreparedStatement.setXxx binds a parameter placeholder via
|
|
12640
|
+
// the driver wire protocol — the SQL text is fixed, only the value slot
|
|
12641
|
+
// varies. Prior coverage was setString/setInt/setLong only; extending
|
|
12642
|
+
// to the full JDBC 4.x setter surface so real Java apps using date/
|
|
12643
|
+
// decimal/object/binary bindings credit as sanitized.
|
|
12637
12644
|
{ method: "setString", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12645
|
+
{ method: "setNString", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12638
12646
|
{ method: "setInt", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12639
12647
|
{ method: "setLong", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12648
|
+
{ method: "setShort", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12649
|
+
{ method: "setByte", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12650
|
+
{ method: "setBoolean", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12651
|
+
{ method: "setDouble", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12652
|
+
{ method: "setFloat", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12653
|
+
{ method: "setBigDecimal", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12654
|
+
{ method: "setBytes", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12655
|
+
{ method: "setDate", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12656
|
+
{ method: "setTime", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12657
|
+
{ method: "setTimestamp", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12658
|
+
{ method: "setObject", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12659
|
+
{ method: "setNull", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12660
|
+
{ method: "setArray", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12661
|
+
{ method: "setBlob", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12662
|
+
{ method: "setClob", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12663
|
+
{ method: "setNClob", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12664
|
+
{ method: "setRef", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12665
|
+
{ method: "setRowId", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12666
|
+
{ method: "setSQLXML", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12667
|
+
{ method: "setURL", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12668
|
+
{ method: "setBinaryStream", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12669
|
+
{ method: "setCharacterStream", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12670
|
+
{ method: "setAsciiStream", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12671
|
+
{ method: "setNCharacterStream", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12672
|
+
// JPA / Hibernate Query.setParameter — covered above; add TypedQuery
|
|
12673
|
+
// (same interface but distinct type name).
|
|
12640
12674
|
{ method: "setParameter", class: "Query", removes: ["sql_injection"] },
|
|
12675
|
+
{ method: "setParameter", class: "TypedQuery", removes: ["sql_injection"] },
|
|
12676
|
+
// Spring JdbcTemplate `NamedParameterJdbcTemplate.update / queryForObject`
|
|
12677
|
+
// parameterized shapes use SqlParameterSource.addValue — the addValue
|
|
12678
|
+
// call binds the parameter safely.
|
|
12679
|
+
{ method: "addValue", class: "MapSqlParameterSource", removes: ["sql_injection"] },
|
|
12641
12680
|
{ annotation: "Param", removes: ["sql_injection"] },
|
|
12642
12681
|
// XSS
|
|
12643
12682
|
{ method: "escapeHtml", removes: ["xss"] },
|
|
@@ -12663,6 +12702,48 @@ var DEFAULT_SANITIZERS = [
|
|
|
12663
12702
|
// Rust askama auto-escapes
|
|
12664
12703
|
{ method: "encodeForJavaScript", removes: ["xss"] },
|
|
12665
12704
|
{ method: "encodeForCSS", removes: ["xss"] },
|
|
12705
|
+
// Additional Java XSS sanitizers (cognium-dev #213 seventh slice).
|
|
12706
|
+
//
|
|
12707
|
+
// Guava `HtmlEscapers.htmlEscaper().escape(x)` — the `.escape` call
|
|
12708
|
+
// on the returned Escaper is caught by the generic `escape` rule
|
|
12709
|
+
// above, but explicit registration makes intent clear.
|
|
12710
|
+
// Spring `HtmlUtils.htmlEscape(x)` — htmlEscape already covered
|
|
12711
|
+
// above (bare method name).
|
|
12712
|
+
// Apache Commons Text `StringEscapeUtils.escapeJson / escapeXml11 /
|
|
12713
|
+
// escapeEcmaScript / escapeCsv / escapeXsi`.
|
|
12714
|
+
// OWASP HTML Sanitizer `PolicyFactory.sanitize(html)`.
|
|
12715
|
+
{ method: "escape", class: "Escaper", removes: ["xss"] },
|
|
12716
|
+
{ method: "escape", class: "HtmlEscapers", removes: ["xss"] },
|
|
12717
|
+
{ method: "escapeJson", class: "StringEscapeUtils", removes: ["xss"] },
|
|
12718
|
+
{ method: "escapeEcmaScript", class: "StringEscapeUtils", removes: ["xss"] },
|
|
12719
|
+
{ method: "escapeXml11", class: "StringEscapeUtils", removes: ["xss"] },
|
|
12720
|
+
{ method: "escapeXml10", class: "StringEscapeUtils", removes: ["xss"] },
|
|
12721
|
+
{ method: "escapeCsv", class: "StringEscapeUtils", removes: ["xss"] },
|
|
12722
|
+
{ method: "escapeXsi", class: "StringEscapeUtils", removes: ["xss"] },
|
|
12723
|
+
{ method: "escapeJava", class: "StringEscapeUtils", removes: ["xss"] },
|
|
12724
|
+
// Bare escapeJson / escapeEcmaScript / escapeCsv aliases — common
|
|
12725
|
+
// when statically imported.
|
|
12726
|
+
{ method: "escapeJson", removes: ["xss"] },
|
|
12727
|
+
{ method: "escapeEcmaScript", removes: ["xss"] },
|
|
12728
|
+
{ method: "escapeCsv", removes: ["xss"] },
|
|
12729
|
+
// OWASP HTML sanitizer (`com.googlecode.owasp-java-html-sanitizer`).
|
|
12730
|
+
{ method: "sanitize", class: "PolicyFactory", removes: ["xss"] },
|
|
12731
|
+
// Java Base64 / Hex / MessageDigest — encoded output is binary-safe
|
|
12732
|
+
// (cognium-dev #213 seventh slice). None of these carry attacker
|
|
12733
|
+
// shell/SQL/HTML metacharacters through the encoding — Base64 emits
|
|
12734
|
+
// [A-Za-z0-9+/=], Hex emits [0-9a-f], MessageDigest.digest returns
|
|
12735
|
+
// opaque bytes usually toHex/toBase64-encoded downstream.
|
|
12736
|
+
{ method: "encodeToString", class: "Encoder", removes: ["sql_injection", "command_injection", "xss", "path_traversal", "code_injection"] },
|
|
12737
|
+
{ method: "encode", class: "Encoder", removes: ["sql_injection", "command_injection", "xss", "path_traversal", "code_injection"] },
|
|
12738
|
+
{ method: "encodeHexString", class: "Hex", removes: ["sql_injection", "command_injection", "xss", "path_traversal", "code_injection"] },
|
|
12739
|
+
{ method: "digest", class: "MessageDigest", removes: ["sql_injection", "command_injection", "xss", "path_traversal", "code_injection"] },
|
|
12740
|
+
// Bare aliases for encoder chains — `Base64.getEncoder().encodeToString(x)`
|
|
12741
|
+
// has a call-expression receiver (`Base64.getEncoder()`) that the Java IR
|
|
12742
|
+
// rarely resolves to `Encoder`. Same story for `Hex.encodeHexString(x)`
|
|
12743
|
+
// when Hex is imported. These bare-method names are dominated by their
|
|
12744
|
+
// encoding use in practice; false-positive risk is low.
|
|
12745
|
+
{ method: "encodeToString", removes: ["sql_injection", "command_injection", "xss", "path_traversal", "code_injection"] },
|
|
12746
|
+
{ method: "encodeHexString", removes: ["sql_injection", "command_injection", "xss", "path_traversal", "code_injection"] },
|
|
12666
12747
|
// cognium-dev #249 3.162.0: `open_redirect` restored to the URL-encoder
|
|
12667
12748
|
// sanitizer cluster. Sprint 82 (#189) reclassified `sendRedirect` from
|
|
12668
12749
|
// `ssrf` → `open_redirect` (config-loader.ts:1296-1299) without updating
|
|
@@ -12568,10 +12568,49 @@ var DEFAULT_SINKS = [
|
|
|
12568
12568
|
var DEFAULT_SANITIZERS = [
|
|
12569
12569
|
// SQL Injection - proper parameter binding sanitizes input
|
|
12570
12570
|
// Note: prepareStatement alone is NOT a sanitizer - it's a sink when used with concatenation
|
|
12571
|
+
//
|
|
12572
|
+
// Full PreparedStatement setter coverage (cognium-dev #213 seventh slice).
|
|
12573
|
+
// Every JDBC PreparedStatement.setXxx binds a parameter placeholder via
|
|
12574
|
+
// the driver wire protocol — the SQL text is fixed, only the value slot
|
|
12575
|
+
// varies. Prior coverage was setString/setInt/setLong only; extending
|
|
12576
|
+
// to the full JDBC 4.x setter surface so real Java apps using date/
|
|
12577
|
+
// decimal/object/binary bindings credit as sanitized.
|
|
12571
12578
|
{ method: "setString", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12579
|
+
{ method: "setNString", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12572
12580
|
{ method: "setInt", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12573
12581
|
{ method: "setLong", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12582
|
+
{ method: "setShort", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12583
|
+
{ method: "setByte", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12584
|
+
{ method: "setBoolean", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12585
|
+
{ method: "setDouble", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12586
|
+
{ method: "setFloat", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12587
|
+
{ method: "setBigDecimal", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12588
|
+
{ method: "setBytes", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12589
|
+
{ method: "setDate", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12590
|
+
{ method: "setTime", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12591
|
+
{ method: "setTimestamp", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12592
|
+
{ method: "setObject", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12593
|
+
{ method: "setNull", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12594
|
+
{ method: "setArray", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12595
|
+
{ method: "setBlob", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12596
|
+
{ method: "setClob", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12597
|
+
{ method: "setNClob", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12598
|
+
{ method: "setRef", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12599
|
+
{ method: "setRowId", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12600
|
+
{ method: "setSQLXML", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12601
|
+
{ method: "setURL", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12602
|
+
{ method: "setBinaryStream", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12603
|
+
{ method: "setCharacterStream", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12604
|
+
{ method: "setAsciiStream", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12605
|
+
{ method: "setNCharacterStream", class: "PreparedStatement", removes: ["sql_injection"] },
|
|
12606
|
+
// JPA / Hibernate Query.setParameter — covered above; add TypedQuery
|
|
12607
|
+
// (same interface but distinct type name).
|
|
12574
12608
|
{ method: "setParameter", class: "Query", removes: ["sql_injection"] },
|
|
12609
|
+
{ method: "setParameter", class: "TypedQuery", removes: ["sql_injection"] },
|
|
12610
|
+
// Spring JdbcTemplate `NamedParameterJdbcTemplate.update / queryForObject`
|
|
12611
|
+
// parameterized shapes use SqlParameterSource.addValue — the addValue
|
|
12612
|
+
// call binds the parameter safely.
|
|
12613
|
+
{ method: "addValue", class: "MapSqlParameterSource", removes: ["sql_injection"] },
|
|
12575
12614
|
{ annotation: "Param", removes: ["sql_injection"] },
|
|
12576
12615
|
// XSS
|
|
12577
12616
|
{ method: "escapeHtml", removes: ["xss"] },
|
|
@@ -12597,6 +12636,48 @@ var DEFAULT_SANITIZERS = [
|
|
|
12597
12636
|
// Rust askama auto-escapes
|
|
12598
12637
|
{ method: "encodeForJavaScript", removes: ["xss"] },
|
|
12599
12638
|
{ method: "encodeForCSS", removes: ["xss"] },
|
|
12639
|
+
// Additional Java XSS sanitizers (cognium-dev #213 seventh slice).
|
|
12640
|
+
//
|
|
12641
|
+
// Guava `HtmlEscapers.htmlEscaper().escape(x)` — the `.escape` call
|
|
12642
|
+
// on the returned Escaper is caught by the generic `escape` rule
|
|
12643
|
+
// above, but explicit registration makes intent clear.
|
|
12644
|
+
// Spring `HtmlUtils.htmlEscape(x)` — htmlEscape already covered
|
|
12645
|
+
// above (bare method name).
|
|
12646
|
+
// Apache Commons Text `StringEscapeUtils.escapeJson / escapeXml11 /
|
|
12647
|
+
// escapeEcmaScript / escapeCsv / escapeXsi`.
|
|
12648
|
+
// OWASP HTML Sanitizer `PolicyFactory.sanitize(html)`.
|
|
12649
|
+
{ method: "escape", class: "Escaper", removes: ["xss"] },
|
|
12650
|
+
{ method: "escape", class: "HtmlEscapers", removes: ["xss"] },
|
|
12651
|
+
{ method: "escapeJson", class: "StringEscapeUtils", removes: ["xss"] },
|
|
12652
|
+
{ method: "escapeEcmaScript", class: "StringEscapeUtils", removes: ["xss"] },
|
|
12653
|
+
{ method: "escapeXml11", class: "StringEscapeUtils", removes: ["xss"] },
|
|
12654
|
+
{ method: "escapeXml10", class: "StringEscapeUtils", removes: ["xss"] },
|
|
12655
|
+
{ method: "escapeCsv", class: "StringEscapeUtils", removes: ["xss"] },
|
|
12656
|
+
{ method: "escapeXsi", class: "StringEscapeUtils", removes: ["xss"] },
|
|
12657
|
+
{ method: "escapeJava", class: "StringEscapeUtils", removes: ["xss"] },
|
|
12658
|
+
// Bare escapeJson / escapeEcmaScript / escapeCsv aliases — common
|
|
12659
|
+
// when statically imported.
|
|
12660
|
+
{ method: "escapeJson", removes: ["xss"] },
|
|
12661
|
+
{ method: "escapeEcmaScript", removes: ["xss"] },
|
|
12662
|
+
{ method: "escapeCsv", removes: ["xss"] },
|
|
12663
|
+
// OWASP HTML sanitizer (`com.googlecode.owasp-java-html-sanitizer`).
|
|
12664
|
+
{ method: "sanitize", class: "PolicyFactory", removes: ["xss"] },
|
|
12665
|
+
// Java Base64 / Hex / MessageDigest — encoded output is binary-safe
|
|
12666
|
+
// (cognium-dev #213 seventh slice). None of these carry attacker
|
|
12667
|
+
// shell/SQL/HTML metacharacters through the encoding — Base64 emits
|
|
12668
|
+
// [A-Za-z0-9+/=], Hex emits [0-9a-f], MessageDigest.digest returns
|
|
12669
|
+
// opaque bytes usually toHex/toBase64-encoded downstream.
|
|
12670
|
+
{ method: "encodeToString", class: "Encoder", removes: ["sql_injection", "command_injection", "xss", "path_traversal", "code_injection"] },
|
|
12671
|
+
{ method: "encode", class: "Encoder", removes: ["sql_injection", "command_injection", "xss", "path_traversal", "code_injection"] },
|
|
12672
|
+
{ method: "encodeHexString", class: "Hex", removes: ["sql_injection", "command_injection", "xss", "path_traversal", "code_injection"] },
|
|
12673
|
+
{ method: "digest", class: "MessageDigest", removes: ["sql_injection", "command_injection", "xss", "path_traversal", "code_injection"] },
|
|
12674
|
+
// Bare aliases for encoder chains — `Base64.getEncoder().encodeToString(x)`
|
|
12675
|
+
// has a call-expression receiver (`Base64.getEncoder()`) that the Java IR
|
|
12676
|
+
// rarely resolves to `Encoder`. Same story for `Hex.encodeHexString(x)`
|
|
12677
|
+
// when Hex is imported. These bare-method names are dominated by their
|
|
12678
|
+
// encoding use in practice; false-positive risk is low.
|
|
12679
|
+
{ method: "encodeToString", removes: ["sql_injection", "command_injection", "xss", "path_traversal", "code_injection"] },
|
|
12680
|
+
{ method: "encodeHexString", removes: ["sql_injection", "command_injection", "xss", "path_traversal", "code_injection"] },
|
|
12600
12681
|
// cognium-dev #249 3.162.0: `open_redirect` restored to the URL-encoder
|
|
12601
12682
|
// sanitizer cluster. Sprint 82 (#189) reclassified `sendRedirect` from
|
|
12602
12683
|
// `ssrf` → `open_redirect` (config-loader.ts:1296-1299) without updating
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "circle-ir",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.187.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",
|