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
|
@@ -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,mBAAmB,EACnB,kBAAkB,EAClB,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;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,mBAAmB,EAAE,GAC7B,kBAAkB,EAAE,CAQtB;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,cAAc,EAAE,MAAM,EAAE,EACxB,YAAY,EAAE,MAAM,EAAE,EACtB,qBAAqB,GAAE,MAAM,EAAO,GACnC,WAAW,CAYb;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,aAAa,EAymB1C,CAAC;AA+KF,eAAO,MAAM,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G;AACH,eAAO,MAAM,oBAAoB,EAAE,UAAU,EA8F5C,CAAC"}
|
|
@@ -2478,10 +2478,49 @@ export const DEFAULT_SINKS = [
|
|
|
2478
2478
|
export const DEFAULT_SANITIZERS = [
|
|
2479
2479
|
// SQL Injection - proper parameter binding sanitizes input
|
|
2480
2480
|
// Note: prepareStatement alone is NOT a sanitizer - it's a sink when used with concatenation
|
|
2481
|
+
//
|
|
2482
|
+
// Full PreparedStatement setter coverage (cognium-dev #213 seventh slice).
|
|
2483
|
+
// Every JDBC PreparedStatement.setXxx binds a parameter placeholder via
|
|
2484
|
+
// the driver wire protocol — the SQL text is fixed, only the value slot
|
|
2485
|
+
// varies. Prior coverage was setString/setInt/setLong only; extending
|
|
2486
|
+
// to the full JDBC 4.x setter surface so real Java apps using date/
|
|
2487
|
+
// decimal/object/binary bindings credit as sanitized.
|
|
2481
2488
|
{ method: 'setString', class: 'PreparedStatement', removes: ['sql_injection'] },
|
|
2489
|
+
{ method: 'setNString', class: 'PreparedStatement', removes: ['sql_injection'] },
|
|
2482
2490
|
{ method: 'setInt', class: 'PreparedStatement', removes: ['sql_injection'] },
|
|
2483
2491
|
{ method: 'setLong', class: 'PreparedStatement', removes: ['sql_injection'] },
|
|
2492
|
+
{ method: 'setShort', class: 'PreparedStatement', removes: ['sql_injection'] },
|
|
2493
|
+
{ method: 'setByte', class: 'PreparedStatement', removes: ['sql_injection'] },
|
|
2494
|
+
{ method: 'setBoolean', class: 'PreparedStatement', removes: ['sql_injection'] },
|
|
2495
|
+
{ method: 'setDouble', class: 'PreparedStatement', removes: ['sql_injection'] },
|
|
2496
|
+
{ method: 'setFloat', class: 'PreparedStatement', removes: ['sql_injection'] },
|
|
2497
|
+
{ method: 'setBigDecimal', class: 'PreparedStatement', removes: ['sql_injection'] },
|
|
2498
|
+
{ method: 'setBytes', class: 'PreparedStatement', removes: ['sql_injection'] },
|
|
2499
|
+
{ method: 'setDate', class: 'PreparedStatement', removes: ['sql_injection'] },
|
|
2500
|
+
{ method: 'setTime', class: 'PreparedStatement', removes: ['sql_injection'] },
|
|
2501
|
+
{ method: 'setTimestamp', class: 'PreparedStatement', removes: ['sql_injection'] },
|
|
2502
|
+
{ method: 'setObject', class: 'PreparedStatement', removes: ['sql_injection'] },
|
|
2503
|
+
{ method: 'setNull', class: 'PreparedStatement', removes: ['sql_injection'] },
|
|
2504
|
+
{ method: 'setArray', class: 'PreparedStatement', removes: ['sql_injection'] },
|
|
2505
|
+
{ method: 'setBlob', class: 'PreparedStatement', removes: ['sql_injection'] },
|
|
2506
|
+
{ method: 'setClob', class: 'PreparedStatement', removes: ['sql_injection'] },
|
|
2507
|
+
{ method: 'setNClob', class: 'PreparedStatement', removes: ['sql_injection'] },
|
|
2508
|
+
{ method: 'setRef', class: 'PreparedStatement', removes: ['sql_injection'] },
|
|
2509
|
+
{ method: 'setRowId', class: 'PreparedStatement', removes: ['sql_injection'] },
|
|
2510
|
+
{ method: 'setSQLXML', class: 'PreparedStatement', removes: ['sql_injection'] },
|
|
2511
|
+
{ method: 'setURL', class: 'PreparedStatement', removes: ['sql_injection'] },
|
|
2512
|
+
{ method: 'setBinaryStream', class: 'PreparedStatement', removes: ['sql_injection'] },
|
|
2513
|
+
{ method: 'setCharacterStream', class: 'PreparedStatement', removes: ['sql_injection'] },
|
|
2514
|
+
{ method: 'setAsciiStream', class: 'PreparedStatement', removes: ['sql_injection'] },
|
|
2515
|
+
{ method: 'setNCharacterStream', class: 'PreparedStatement', removes: ['sql_injection'] },
|
|
2516
|
+
// JPA / Hibernate Query.setParameter — covered above; add TypedQuery
|
|
2517
|
+
// (same interface but distinct type name).
|
|
2484
2518
|
{ method: 'setParameter', class: 'Query', removes: ['sql_injection'] },
|
|
2519
|
+
{ method: 'setParameter', class: 'TypedQuery', removes: ['sql_injection'] },
|
|
2520
|
+
// Spring JdbcTemplate `NamedParameterJdbcTemplate.update / queryForObject`
|
|
2521
|
+
// parameterized shapes use SqlParameterSource.addValue — the addValue
|
|
2522
|
+
// call binds the parameter safely.
|
|
2523
|
+
{ method: 'addValue', class: 'MapSqlParameterSource', removes: ['sql_injection'] },
|
|
2485
2524
|
{ annotation: 'Param', removes: ['sql_injection'] },
|
|
2486
2525
|
// XSS
|
|
2487
2526
|
{ method: 'escapeHtml', removes: ['xss'] },
|
|
@@ -2500,6 +2539,48 @@ export const DEFAULT_SANITIZERS = [
|
|
|
2500
2539
|
{ method: 'render', class: 'Template', removes: ['xss'] }, // Rust askama auto-escapes
|
|
2501
2540
|
{ method: 'encodeForJavaScript', removes: ['xss'] },
|
|
2502
2541
|
{ method: 'encodeForCSS', removes: ['xss'] },
|
|
2542
|
+
// Additional Java XSS sanitizers (cognium-dev #213 seventh slice).
|
|
2543
|
+
//
|
|
2544
|
+
// Guava `HtmlEscapers.htmlEscaper().escape(x)` — the `.escape` call
|
|
2545
|
+
// on the returned Escaper is caught by the generic `escape` rule
|
|
2546
|
+
// above, but explicit registration makes intent clear.
|
|
2547
|
+
// Spring `HtmlUtils.htmlEscape(x)` — htmlEscape already covered
|
|
2548
|
+
// above (bare method name).
|
|
2549
|
+
// Apache Commons Text `StringEscapeUtils.escapeJson / escapeXml11 /
|
|
2550
|
+
// escapeEcmaScript / escapeCsv / escapeXsi`.
|
|
2551
|
+
// OWASP HTML Sanitizer `PolicyFactory.sanitize(html)`.
|
|
2552
|
+
{ method: 'escape', class: 'Escaper', removes: ['xss'] },
|
|
2553
|
+
{ method: 'escape', class: 'HtmlEscapers', removes: ['xss'] },
|
|
2554
|
+
{ method: 'escapeJson', class: 'StringEscapeUtils', removes: ['xss'] },
|
|
2555
|
+
{ method: 'escapeEcmaScript', class: 'StringEscapeUtils', removes: ['xss'] },
|
|
2556
|
+
{ method: 'escapeXml11', class: 'StringEscapeUtils', removes: ['xss'] },
|
|
2557
|
+
{ method: 'escapeXml10', class: 'StringEscapeUtils', removes: ['xss'] },
|
|
2558
|
+
{ method: 'escapeCsv', class: 'StringEscapeUtils', removes: ['xss'] },
|
|
2559
|
+
{ method: 'escapeXsi', class: 'StringEscapeUtils', removes: ['xss'] },
|
|
2560
|
+
{ method: 'escapeJava', class: 'StringEscapeUtils', removes: ['xss'] },
|
|
2561
|
+
// Bare escapeJson / escapeEcmaScript / escapeCsv aliases — common
|
|
2562
|
+
// when statically imported.
|
|
2563
|
+
{ method: 'escapeJson', removes: ['xss'] },
|
|
2564
|
+
{ method: 'escapeEcmaScript', removes: ['xss'] },
|
|
2565
|
+
{ method: 'escapeCsv', removes: ['xss'] },
|
|
2566
|
+
// OWASP HTML sanitizer (`com.googlecode.owasp-java-html-sanitizer`).
|
|
2567
|
+
{ method: 'sanitize', class: 'PolicyFactory', removes: ['xss'] },
|
|
2568
|
+
// Java Base64 / Hex / MessageDigest — encoded output is binary-safe
|
|
2569
|
+
// (cognium-dev #213 seventh slice). None of these carry attacker
|
|
2570
|
+
// shell/SQL/HTML metacharacters through the encoding — Base64 emits
|
|
2571
|
+
// [A-Za-z0-9+/=], Hex emits [0-9a-f], MessageDigest.digest returns
|
|
2572
|
+
// opaque bytes usually toHex/toBase64-encoded downstream.
|
|
2573
|
+
{ method: 'encodeToString', class: 'Encoder', removes: ['sql_injection', 'command_injection', 'xss', 'path_traversal', 'code_injection'] },
|
|
2574
|
+
{ method: 'encode', class: 'Encoder', removes: ['sql_injection', 'command_injection', 'xss', 'path_traversal', 'code_injection'] },
|
|
2575
|
+
{ method: 'encodeHexString', class: 'Hex', removes: ['sql_injection', 'command_injection', 'xss', 'path_traversal', 'code_injection'] },
|
|
2576
|
+
{ method: 'digest', class: 'MessageDigest', removes: ['sql_injection', 'command_injection', 'xss', 'path_traversal', 'code_injection'] },
|
|
2577
|
+
// Bare aliases for encoder chains — `Base64.getEncoder().encodeToString(x)`
|
|
2578
|
+
// has a call-expression receiver (`Base64.getEncoder()`) that the Java IR
|
|
2579
|
+
// rarely resolves to `Encoder`. Same story for `Hex.encodeHexString(x)`
|
|
2580
|
+
// when Hex is imported. These bare-method names are dominated by their
|
|
2581
|
+
// encoding use in practice; false-positive risk is low.
|
|
2582
|
+
{ method: 'encodeToString', removes: ['sql_injection', 'command_injection', 'xss', 'path_traversal', 'code_injection'] },
|
|
2583
|
+
{ method: 'encodeHexString', removes: ['sql_injection', 'command_injection', 'xss', 'path_traversal', 'code_injection'] },
|
|
2503
2584
|
// cognium-dev #249 3.162.0: `open_redirect` restored to the URL-encoder
|
|
2504
2585
|
// sanitizer cluster. Sprint 82 (#189) reclassified `sendRedirect` from
|
|
2505
2586
|
// `ssrf` → `open_redirect` (config-loader.ts:1296-1299) without updating
|