circle-ir 3.81.0 → 3.83.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 +35 -10
- package/dist/analysis/config-loader.js.map +1 -1
- package/dist/analysis/passes/info-disclosure-stacktrace-pass.d.ts +48 -0
- package/dist/analysis/passes/info-disclosure-stacktrace-pass.d.ts.map +1 -0
- package/dist/analysis/passes/info-disclosure-stacktrace-pass.js +222 -0
- package/dist/analysis/passes/info-disclosure-stacktrace-pass.js.map +1 -0
- package/dist/analysis/passes/unrestricted-file-upload-pass.d.ts +46 -0
- package/dist/analysis/passes/unrestricted-file-upload-pass.d.ts.map +1 -0
- package/dist/analysis/passes/unrestricted-file-upload-pass.js +193 -0
- package/dist/analysis/passes/unrestricted-file-upload-pass.js.map +1 -0
- package/dist/analyzer.d.ts.map +1 -1
- package/dist/analyzer.js +6 -0
- package/dist/analyzer.js.map +1 -1
- package/dist/browser/circle-ir.js +363 -10
- package/dist/core/circle-ir-core.cjs +35 -10
- package/dist/core/circle-ir-core.js +35 -10
- package/package.json +1 -1
|
@@ -10494,11 +10494,16 @@ var DEFAULT_SINKS = [
|
|
|
10494
10494
|
{ method: "setCommandline", class: "DefaultExecutor", type: "command_injection", cwe: "CWE-78", severity: "critical", arg_positions: [0] },
|
|
10495
10495
|
{ method: "parse", class: "CommandLine", type: "command_injection", cwe: "CWE-78", severity: "critical", arg_positions: [0] },
|
|
10496
10496
|
{ method: "addArgument", class: "CommandLine", type: "command_injection", cwe: "CWE-78", severity: "critical", arg_positions: [0] },
|
|
10497
|
-
// Process-related utilities
|
|
10498
|
-
|
|
10499
|
-
|
|
10500
|
-
|
|
10501
|
-
|
|
10497
|
+
// Process-related utilities — removed in 3.83.0 (#124):
|
|
10498
|
+
// - Process.waitFor() blocks on an already-spawned process; has no args,
|
|
10499
|
+
// no command string flows into it.
|
|
10500
|
+
// - ProcessBuilder.inheritIO() takes no args.
|
|
10501
|
+
// - ProcessBuilder.redirectOutput/redirectInput take a File destination/source,
|
|
10502
|
+
// not a command. If treated as sinks they would be path_traversal, not
|
|
10503
|
+
// command_injection — and even then the threat model is marginal.
|
|
10504
|
+
// The actual command-execution sinks (Runtime.exec, ProcessBuilder.start,
|
|
10505
|
+
// ProcessBuilder.command, ProcessBuilder(constructor)) remain configured
|
|
10506
|
+
// elsewhere in this file / in configs/sinks/command.yaml.
|
|
10502
10507
|
// Path Traversal (CWE-22)
|
|
10503
10508
|
// File: covers both File(String pathname) and File(parent, child). The 2-arg
|
|
10504
10509
|
// overload's child argument carries CVE-2018-8041 (Camel mail Content-Disposition
|
|
@@ -10827,7 +10832,9 @@ var DEFAULT_SINKS = [
|
|
|
10827
10832
|
{ method: "ok", class: "Response", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0] },
|
|
10828
10833
|
// Code Injection (CWE-94)
|
|
10829
10834
|
{ method: "eval", class: "ScriptEngine", type: "code_injection", cwe: "CWE-94", severity: "critical", arg_positions: [0] },
|
|
10830
|
-
|
|
10835
|
+
// Pattern.compile removed in 3.83.0 (#124): regex compilation does not execute
|
|
10836
|
+
// code. The real risk from a tainted regex is ReDoS, covered by the
|
|
10837
|
+
// `Pattern.compile` -> `redos` rule below (line ~1945).
|
|
10831
10838
|
// Expression Language injection (SpEL, OGNL, MVEL, EL)
|
|
10832
10839
|
{ method: "parseExpression", class: "ExpressionParser", type: "code_injection", cwe: "CWE-94", severity: "critical", arg_positions: [0] },
|
|
10833
10840
|
{ method: "parseExpression", class: "SpelExpressionParser", type: "code_injection", cwe: "CWE-94", severity: "critical", arg_positions: [0] },
|
|
@@ -11524,7 +11531,8 @@ var DEFAULT_SINKS = [
|
|
|
11524
11531
|
// =========================================================================
|
|
11525
11532
|
// Collection-based command injection (ProcessBuilder with List)
|
|
11526
11533
|
{ method: "command", class: "ProcessBuilder", type: "command_injection", cwe: "CWE-78", severity: "critical", arg_positions: [0] },
|
|
11527
|
-
|
|
11534
|
+
// ProcessBuilder.inheritIO removed in 3.83.0 (#124): no args, no command
|
|
11535
|
+
// string flows into it. See note above next to the Process-related cluster.
|
|
11528
11536
|
// Jenkins DSL patterns
|
|
11529
11537
|
{ method: "step", class: "StepExecution", type: "command_injection", cwe: "CWE-78", severity: "critical", arg_positions: [0] },
|
|
11530
11538
|
{ method: "invokeMethod", class: "Script", type: "command_injection", cwe: "CWE-78", severity: "critical", arg_positions: [0, 1] },
|
|
@@ -11895,9 +11903,26 @@ var DEFAULT_SANITIZERS = [
|
|
|
11895
11903
|
// JSON.parse (data is validated against JSON grammar, prevents XSS/code injection)
|
|
11896
11904
|
{ method: "parse", class: "JSON", removes: ["xss", "code_injection"] },
|
|
11897
11905
|
// Type coercion (removes string-based injections)
|
|
11898
|
-
|
|
11899
|
-
|
|
11900
|
-
{ method: "
|
|
11906
|
+
// Sprint 29 (#113): include external_taint_escape — a numeric cast cannot
|
|
11907
|
+
// carry an unvalidated string payload across a function boundary.
|
|
11908
|
+
{ method: "parseInt", removes: ["sql_injection", "nosql_injection", "command_injection", "xss", "external_taint_escape", "path_traversal", "code_injection"] },
|
|
11909
|
+
{ method: "parseFloat", removes: ["sql_injection", "nosql_injection", "command_injection", "external_taint_escape", "path_traversal", "code_injection"] },
|
|
11910
|
+
{ method: "Number", removes: ["sql_injection", "nosql_injection", "command_injection", "external_taint_escape", "path_traversal", "code_injection"] },
|
|
11911
|
+
// Sprint 29 (#113): bounds-clamp Math.min / Math.max — when used to bound
|
|
11912
|
+
// a numeric/size value (e.g. `Math.min(size, MAX_BYTES)`), the result is
|
|
11913
|
+
// safely bounded and cannot resource-exhaust downstream. Only suppress
|
|
11914
|
+
// external_taint_escape — these helpers do NOT sanitize string injection.
|
|
11915
|
+
{ method: "min", class: "Math", removes: ["external_taint_escape"] },
|
|
11916
|
+
{ method: "max", class: "Math", removes: ["external_taint_escape"] },
|
|
11917
|
+
// Sprint 29 (#113): allow-list / membership guards — when an external value
|
|
11918
|
+
// is tested against an allow-list (`ALLOWED.includes(x)`, `set.has(x)`,
|
|
11919
|
+
// `list.contains(x)`) before being forwarded, it cannot escape unbounded.
|
|
11920
|
+
// Only suppress `external_taint_escape`; real string-injection sinks should
|
|
11921
|
+
// still rely on their own escaping.
|
|
11922
|
+
{ method: "includes", removes: ["external_taint_escape"] },
|
|
11923
|
+
{ method: "has", removes: ["external_taint_escape"] },
|
|
11924
|
+
{ method: "contains", removes: ["external_taint_escape"] },
|
|
11925
|
+
{ method: "indexOf", removes: ["external_taint_escape"] },
|
|
11901
11926
|
// Path sanitization
|
|
11902
11927
|
{ method: "basename", class: "path", removes: ["path_traversal"] },
|
|
11903
11928
|
{ method: "normalize", class: "path", removes: ["path_traversal"] },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "circle-ir",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.83.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",
|