circle-ir 3.187.0 → 3.189.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 +88 -0
- package/dist/analysis/config-loader.js.map +1 -1
- package/dist/browser/circle-ir.js +116 -1
- package/dist/core/circle-ir-core.cjs +116 -1
- package/dist/core/circle-ir-core.js +116 -1
- package/dist/core/extractors/dfg.js +24 -0
- package/dist/core/extractors/dfg.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,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AC"}
|
|
@@ -406,6 +406,29 @@ export const DEFAULT_SOURCES = [
|
|
|
406
406
|
{ annotation: 'Cookie', type: 'http_cookie', severity: 'high', param_tainted: true },
|
|
407
407
|
{ annotation: 'Form', type: 'http_param', severity: 'high', param_tainted: true },
|
|
408
408
|
{ annotation: 'File', type: 'file_input', severity: 'high', param_tainted: true },
|
|
409
|
+
// NestJS controller param decorators (cognium-dev #213 eighth slice).
|
|
410
|
+
//
|
|
411
|
+
// NestJS shares @Body/@Query/@Headers/@Body decorator names with FastAPI
|
|
412
|
+
// and Spring (covered above) but adds a few unique ones:
|
|
413
|
+
// @Param('id') id: string — route path parameter
|
|
414
|
+
// @Req() / @Request() req: Request — the whole request object
|
|
415
|
+
// @Session() session: Session — session data
|
|
416
|
+
// @Ip() ip: string — client IP
|
|
417
|
+
// @HostParam('subdomain') sub: string — subdomain of `host` config
|
|
418
|
+
// @UploadedFile() file: any — multer-uploaded file
|
|
419
|
+
// @UploadedFiles() files: any[] — multer multi-file
|
|
420
|
+
// @Next() — not a source (Express next-fn)
|
|
421
|
+
// Registered without a `languages:` filter so they also credit the shared
|
|
422
|
+
// decorator names in TypeScript (nestjs is TS-first) and any JS project
|
|
423
|
+
// adopting the convention.
|
|
424
|
+
{ annotation: 'Param', type: 'http_path', severity: 'high', param_tainted: true },
|
|
425
|
+
{ annotation: 'Req', type: 'http_body', severity: 'high', param_tainted: true },
|
|
426
|
+
{ annotation: 'Request', type: 'http_body', severity: 'high', param_tainted: true },
|
|
427
|
+
{ annotation: 'Session', type: 'http_cookie', severity: 'high', param_tainted: true },
|
|
428
|
+
{ annotation: 'Ip', type: 'network_input', severity: 'high', param_tainted: true },
|
|
429
|
+
{ annotation: 'HostParam', type: 'http_path', severity: 'high', param_tainted: true },
|
|
430
|
+
{ annotation: 'UploadedFile', type: 'file_input', severity: 'high', param_tainted: true },
|
|
431
|
+
{ annotation: 'UploadedFiles', type: 'file_input', severity: 'high', param_tainted: true },
|
|
409
432
|
// FastAPI Request object
|
|
410
433
|
{ method: 'json', class: 'Request', type: 'http_body', severity: 'high', return_tainted: true },
|
|
411
434
|
{ method: 'form', class: 'Request', type: 'http_param', severity: 'high', return_tainted: true },
|
|
@@ -507,6 +530,71 @@ export const DEFAULT_SOURCES = [
|
|
|
507
530
|
{ method_annotation: 'GraphQLMutation', type: 'http_body', severity: 'high', languages: ['java'] },
|
|
508
531
|
{ annotation: 'InputArgument', type: 'http_param', severity: 'high', param_tainted: true, languages: ['java'] },
|
|
509
532
|
{ annotation: 'GraphQLArgument', type: 'http_param', severity: 'high', param_tainted: true, languages: ['java'] },
|
|
533
|
+
// --- Go web framework sources (cognium-dev #213 ninth slice) ---
|
|
534
|
+
//
|
|
535
|
+
// Gin `c.Query("id")` / `c.Param("id")` / `c.PostForm("k")` /
|
|
536
|
+
// `c.GetHeader("H")` / `c.Cookie("c")` / `c.FormFile("f")`.
|
|
537
|
+
// Also body binders: `c.BindJSON(&d)` / `c.ShouldBindJSON(&d)` /
|
|
538
|
+
// `c.Bind(&d)`. Class-scoped to `Context` — the Go local-receiver
|
|
539
|
+
// resolver from #240 3.177.0 puts the resolved type into the
|
|
540
|
+
// `receiver` field so class-matching works for `func h(c *gin.Context)`.
|
|
541
|
+
//
|
|
542
|
+
// Echo `c.QueryParam("id")` / `c.QueryParams()` / `c.Param("id")` /
|
|
543
|
+
// `c.FormValue("k")` / `c.FormParams()` / `c.Request().Header` /
|
|
544
|
+
// `c.Cookie("c")` / `c.Bind(&d)`.
|
|
545
|
+
//
|
|
546
|
+
// Fiber `c.Query("id")` / `c.Params("id")` / `c.FormValue("k")` /
|
|
547
|
+
// `c.Cookies("c")` / `c.Get("H")` / `c.Body()` / `c.BodyParser(&d)`.
|
|
548
|
+
// Distinct receiver type `*fiber.Ctx` — separate class entries.
|
|
549
|
+
//
|
|
550
|
+
// Chi `chi.URLParam(r, "id")` — package-level call, matched via
|
|
551
|
+
// bare-import resolution in matchesSourcePattern.
|
|
552
|
+
//
|
|
553
|
+
// Beego `ctx.Input.Query(...)` — `Input` is a struct, so `.Query`
|
|
554
|
+
// matches on `Input` class.
|
|
555
|
+
//
|
|
556
|
+
// Gorilla mux `mux.Vars(r)` — returns map of path vars.
|
|
557
|
+
{ method: 'Query', class: 'Context', type: 'http_param', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
558
|
+
{ method: 'Param', class: 'Context', type: 'http_path', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
559
|
+
{ method: 'PostForm', class: 'Context', type: 'http_body', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
560
|
+
{ method: 'GetHeader', class: 'Context', type: 'http_header', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
561
|
+
{ method: 'Cookie', class: 'Context', type: 'http_cookie', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
562
|
+
{ method: 'FormFile', class: 'Context', type: 'file_input', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
563
|
+
{ method: 'BindJSON', class: 'Context', type: 'http_body', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
564
|
+
{ method: 'ShouldBindJSON', class: 'Context', type: 'http_body', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
565
|
+
{ method: 'Bind', class: 'Context', type: 'http_body', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
566
|
+
{ method: 'BindQuery', class: 'Context', type: 'http_param', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
567
|
+
{ method: 'ShouldBindQuery', class: 'Context', type: 'http_param', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
568
|
+
{ method: 'BindUri', class: 'Context', type: 'http_path', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
569
|
+
{ method: 'ShouldBindUri', class: 'Context', type: 'http_path', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
570
|
+
{ method: 'MultipartForm', class: 'Context', type: 'http_body', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
571
|
+
// Echo — QueryParam/QueryParams are Echo-distinctive.
|
|
572
|
+
{ method: 'QueryParam', class: 'Context', type: 'http_param', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
573
|
+
{ method: 'QueryParams', class: 'Context', type: 'http_param', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
574
|
+
{ method: 'FormValue', class: 'Context', type: 'http_body', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
575
|
+
{ method: 'FormParams', class: 'Context', type: 'http_body', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
576
|
+
{ method: 'FormFile', class: 'Context', type: 'file_input', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
577
|
+
// Fiber — receiver type is `*fiber.Ctx`, distinct class name.
|
|
578
|
+
{ method: 'Query', class: 'Ctx', type: 'http_param', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
579
|
+
{ method: 'Params', class: 'Ctx', type: 'http_path', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
580
|
+
{ method: 'FormValue', class: 'Ctx', type: 'http_body', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
581
|
+
{ method: 'FormFile', class: 'Ctx', type: 'file_input', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
582
|
+
{ method: 'Cookies', class: 'Ctx', type: 'http_cookie', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
583
|
+
{ method: 'Get', class: 'Ctx', type: 'http_header', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
584
|
+
{ method: 'Body', class: 'Ctx', type: 'http_body', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
585
|
+
{ method: 'BodyParser', class: 'Ctx', type: 'http_body', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
586
|
+
{ method: 'QueryParser', class: 'Ctx', type: 'http_param', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
587
|
+
{ method: 'ParamsParser', class: 'Ctx', type: 'http_path', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
588
|
+
// Chi package-level path param.
|
|
589
|
+
{ method: 'URLParam', class: 'chi', type: 'http_path', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
590
|
+
{ method: 'URLParamFromCtx', class: 'chi', type: 'http_path', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
591
|
+
// Gorilla mux path vars.
|
|
592
|
+
{ method: 'Vars', class: 'mux', type: 'http_path', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
593
|
+
// Beego — `ctx.Input.Query(...)` etc. `Input` is a struct field on Context.
|
|
594
|
+
{ method: 'Query', class: 'Input', type: 'http_param', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
595
|
+
{ method: 'Param', class: 'Input', type: 'http_path', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
596
|
+
{ method: 'Header', class: 'Input', type: 'http_header', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
597
|
+
{ method: 'Cookie', class: 'Input', type: 'http_cookie', severity: 'high', return_tainted: true, languages: ['go'] },
|
|
510
598
|
// --- gRPC request metadata (Python — grpcio) ---
|
|
511
599
|
// `context.invocation_metadata()` returns the caller-supplied metadata tuple.
|
|
512
600
|
// No `class` filter — receiver names vary (`context`, `ctx`, `servicer_context`).
|