circle-ir 3.132.0 → 3.134.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/passes/language-sources-pass.d.ts +67 -0
- package/dist/analysis/passes/language-sources-pass.d.ts.map +1 -1
- package/dist/analysis/passes/language-sources-pass.js +882 -0
- package/dist/analysis/passes/language-sources-pass.js.map +1 -1
- package/dist/browser/circle-ir.js +686 -0
- package/package.json +1 -1
|
@@ -321,4 +321,71 @@ export declare function findRustAppendHeaderTupleOpenRedirectFindings(code: stri
|
|
|
321
321
|
* never fires on literal-only assignments.
|
|
322
322
|
*/
|
|
323
323
|
export declare function findJsDomOpenRedirectFindings(code: string, file: string): SastFinding[];
|
|
324
|
+
/**
|
|
325
|
+
* Sprint 83 detector A — Go `plugin.Open(<tainted>)` / `plugin.Lookup(...)`.
|
|
326
|
+
* Loading a Go plugin executes the loaded module's init() functions and
|
|
327
|
+
* makes its exported symbols callable, which is a code-injection sink
|
|
328
|
+
* equivalent to dynamic library loading. Fires when the path argument
|
|
329
|
+
* traces back to an `*http.Request` extractor (FormValue / URL.Query /
|
|
330
|
+
* PostFormValue / Header.Get / Cookie) within the same function.
|
|
331
|
+
*/
|
|
332
|
+
export declare function findGoPluginOpenCodeInjectionFindings(code: string, file: string): SastFinding[];
|
|
333
|
+
/**
|
|
334
|
+
* Sprint 83 detector B — JS indirect eval forms.
|
|
335
|
+
* Configured `eval` sink matches direct `eval(x)` but misses:
|
|
336
|
+
* - `(0, eval)(x)` comma-operator indirect call
|
|
337
|
+
* - `globalThis.eval(x)` / `global.eval(x)` / `window.eval(x)` / `self.eval(x)`
|
|
338
|
+
* - aliased eval: `const f = eval; f(x)` then `f(taint)`
|
|
339
|
+
* Fires when the argument traces back to req.body / req.query / req.params /
|
|
340
|
+
* req.headers / req.cookies (Express/Koa-style request extractor).
|
|
341
|
+
*/
|
|
342
|
+
export declare function findJsIndirectEvalCodeInjectionFindings(code: string, file: string): SastFinding[];
|
|
343
|
+
/**
|
|
344
|
+
* Sprint 83 detector C — Python `code` stdlib REPL / compile_command.
|
|
345
|
+
* `code.InteractiveInterpreter().runsource(s)`, `runcode(c)`, `push(line)` and
|
|
346
|
+
* `code.InteractiveConsole().push(line)`, plus `code.compile_command(s)` —
|
|
347
|
+
* all execute or compile arbitrary Python source. Fires when the argument
|
|
348
|
+
* traces back to a Flask `request.*` extractor; gated on `import code`
|
|
349
|
+
* to avoid colliding with user-defined `code` variables.
|
|
350
|
+
*/
|
|
351
|
+
export declare function findPythonInteractiveInterpreterCodeInjectionFindings(code: string, file: string): SastFinding[];
|
|
352
|
+
/**
|
|
353
|
+
* Sprint 83 detector D — Rust eval-crate / dynamic-load sinks.
|
|
354
|
+
* Rust has no language-level eval; the canonical sinks are:
|
|
355
|
+
* - `evalexpr::eval(...)` (and `_with_context|_boolean|_int|_float|_string|_tuple|_empty`)
|
|
356
|
+
* - `libloading::Library::new(...)` (dynamic library load)
|
|
357
|
+
* - `mlua::Lua::new().load(<src>).{exec,eval,call}(...)` / rlua equivalent
|
|
358
|
+
* Fires when the argument traces back to an Actix-web extractor: a plain
|
|
359
|
+
* `body: String|Bytes`, a `web::Query<T>` / `web::Path<T>` / `web::Form<T>` /
|
|
360
|
+
* `web::Json<T>` / `HttpRequest` param, or `axum::body::Bytes`/`String` etc.
|
|
361
|
+
*/
|
|
362
|
+
export declare function findRustEvalCrateCodeInjectionFindings(code: string, file: string): SastFinding[];
|
|
363
|
+
/**
|
|
364
|
+
* Sprint 84 detector A (#189) — Go MongoDB driver nosql_injection.
|
|
365
|
+
* The Go MongoDB driver call shape `coll.FindOne(ctx, bson.M{"k": <taint>})`
|
|
366
|
+
* (and siblings: Find / InsertOne / InsertMany / UpdateOne / UpdateMany /
|
|
367
|
+
* DeleteOne / DeleteMany / FindOneAndUpdate / FindOneAndDelete /
|
|
368
|
+
* FindOneAndReplace / Aggregate) is not modeled by configured sinks (those
|
|
369
|
+
* cover Node.js Mongo only). Fires when the filter argument (after `ctx`)
|
|
370
|
+
* references a value transitively derived from `*http.Request` extractors
|
|
371
|
+
* (URL.Query().Get / FormValue / PostFormValue / Header.Get / Cookie).
|
|
372
|
+
*/
|
|
373
|
+
export declare function findGoMongoNosqlInjectionFindings(code: string, file: string): SastFinding[];
|
|
374
|
+
/**
|
|
375
|
+
* Sprint 84 detector B (#189) — Java Mongo driver nosql_injection.
|
|
376
|
+
* Mongo Java driver shape `users.find(eq("k", <taint>))` (and siblings)
|
|
377
|
+
* is not modeled by configured sinks (those cover Node.js Mongo only).
|
|
378
|
+
* Fires when the receiver call payload references a value transitively
|
|
379
|
+
* derived from servlet request extractors (request.getParameter /
|
|
380
|
+
* getHeader / getCookies / getReader / getQueryString / getPart).
|
|
381
|
+
*/
|
|
382
|
+
export declare function findJavaMongoNosqlInjectionFindings(code: string, file: string): SastFinding[];
|
|
383
|
+
/**
|
|
384
|
+
* Sprint 84 detector C (#189) — Python mongoengine `$where` JS-string injection.
|
|
385
|
+
* The shape `User.objects(__raw__={'$where': "this.x == '" + n + "'"})`
|
|
386
|
+
* (and aliases via `$where` key with string concat / f-string) bypasses
|
|
387
|
+
* the configured nosql sinks. Fires when the `$where` value references
|
|
388
|
+
* a value transitively derived from Flask/Django/FastAPI request input.
|
|
389
|
+
*/
|
|
390
|
+
export declare function findPythonMongoengineWhereNosqlInjectionFindings(code: string, file: string): SastFinding[];
|
|
324
391
|
//# sourceMappingURL=language-sources-pass.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"language-sources-pass.d.ts","sourceRoot":"","sources":["../../../src/analysis/passes/language-sources-pass.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,EAAwB,WAAW,EAAO,MAAM,sBAAsB,CAAC;AAC3H,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAqB9E,eAAO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