circle-ir 4.9.13 → 4.9.14
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 +25 -5
- package/dist/analysis/config-loader.js.map +1 -1
- package/dist/analysis/passes/sink-filter-pass.d.ts.map +1 -1
- package/dist/analysis/passes/sink-filter-pass.js +131 -4
- package/dist/analysis/passes/sink-filter-pass.js.map +1 -1
- package/dist/analysis/passes/taint-propagation-pass.d.ts +48 -0
- package/dist/analysis/passes/taint-propagation-pass.d.ts.map +1 -1
- package/dist/analysis/passes/taint-propagation-pass.js +166 -1
- package/dist/analysis/passes/taint-propagation-pass.js.map +1 -1
- package/dist/browser/circle-ir.js +197 -17
- package/dist/core/circle-ir-core.cjs +33 -5
- package/dist/core/circle-ir-core.js +33 -5
- package/dist/core/extractors/calls.js +19 -0
- package/dist/core/extractors/calls.js.map +1 -1
- 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,EAuwB1C,CAAC;AA+KF,eAAO,MAAM,aAAa,EAAE,WAAW,
|
|
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,EAuwB1C,CAAC;AA+KF,eAAO,MAAM,aAAa,EAAE,WAAW,EAymEtC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,gBAAgB,EAgjBhD,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB,EAAE,kBAAkB,EAiDtD,CAAC;AAEF;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,WAAW,CAO9C;AAMD;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,EAAE,UAAU,EA8F5C,CAAC"}
|
|
@@ -984,9 +984,27 @@ export const DEFAULT_SINKS = [
|
|
|
984
984
|
// Command Injection (CWE-78)
|
|
985
985
|
{ method: 'exec', class: 'Runtime', type: 'command_injection', cwe: 'CWE-78', severity: 'critical', arg_positions: [0, 1] },
|
|
986
986
|
{ method: 'start', class: 'ProcessBuilder', type: 'command_injection', cwe: 'CWE-78', severity: 'critical', arg_positions: [] },
|
|
987
|
-
// ProcessBuilder constructor
|
|
988
|
-
|
|
989
|
-
|
|
987
|
+
// ProcessBuilder constructor + command(): cognium-dev#351 — BOTH take
|
|
988
|
+
// `String...` varargs (or a single List<String>), and EVERY element is a
|
|
989
|
+
// command token, so no position is safe. Pinning these to `[0]` missed the
|
|
990
|
+
// canonical shell-wrapper shape, where the payload is the last argument:
|
|
991
|
+
//
|
|
992
|
+
// new ProcessBuilder("bash", "-c", tainted) // payload at position 2
|
|
993
|
+
// pb.command("bash", "-c", tainted)
|
|
994
|
+
//
|
|
995
|
+
// `Runtime.exec(String[])` with the identical array already fired, so the
|
|
996
|
+
// taint was available and only the sink model was wrong.
|
|
997
|
+
//
|
|
998
|
+
// The positions are enumerated rather than left `[]` because the two layers
|
|
999
|
+
// that read this field disagree about what an empty array means:
|
|
1000
|
+
// `isInDangerousPosition` (taint-matcher) does `arg_positions.includes(pos)`,
|
|
1001
|
+
// so `[]` matches NOTHING, while the sink-reachability loop in
|
|
1002
|
+
// taint-propagation treats `length === 0` as "any argument".
|
|
1003
|
+
// `ProcessBuilder.start` gets away with `[]` only because it takes no
|
|
1004
|
+
// arguments at all. Enumerating is unambiguous in both, and matches how the
|
|
1005
|
+
// logging sinks in this file already spell it.
|
|
1006
|
+
{ method: 'ProcessBuilder', class: 'constructor', type: 'command_injection', cwe: 'CWE-78', severity: 'critical', arg_positions: [0, 1, 2, 3, 4, 5, 6, 7] },
|
|
1007
|
+
{ method: 'command', class: 'ProcessBuilder', type: 'command_injection', cwe: 'CWE-78', severity: 'critical', arg_positions: [0, 1, 2, 3, 4, 5, 6, 7] },
|
|
990
1008
|
// Commons Exec
|
|
991
1009
|
// Note: bare class 'Executor' removed — it collided with java.util.concurrent.Executor
|
|
992
1010
|
// (Executor.execute(Runnable) is not command injection). Apache Commons Exec users
|
|
@@ -2263,8 +2281,10 @@ export const DEFAULT_SINKS = [
|
|
|
2263
2281
|
// =========================================================================
|
|
2264
2282
|
// Java CWE-Bench Enhancement Patterns (Collection/Builder)
|
|
2265
2283
|
// =========================================================================
|
|
2266
|
-
// Collection-based command injection (ProcessBuilder with List)
|
|
2267
|
-
|
|
2284
|
+
// Collection-based command injection (ProcessBuilder with List) — the
|
|
2285
|
+
// `ProcessBuilder.command` entry lives with the other ProcessBuilder sinks
|
|
2286
|
+
// above; a second copy here only risked the two drifting apart, which is
|
|
2287
|
+
// what happened (cognium-dev#351).
|
|
2268
2288
|
// ProcessBuilder.inheritIO removed in 3.83.0 (#124): no args, no command
|
|
2269
2289
|
// string flows into it. See note above next to the Process-related cluster.
|
|
2270
2290
|
// Jenkins DSL patterns
|