circle-ir 3.176.0 → 3.177.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.
@@ -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,EA6hB1C,CAAC;AAmGF,eAAO,MAAM,aAAa,EAAE,WAAW,EAwuDtC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,gBAAgB,EAwThD,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB,EAAE,kBAAkB,EAiDtD,CAAC;AAEF;;GAEG;AACH,wBAAgB,gBAAgB,I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;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,EAAE,UAAU,EA8F5C,CAAC"}
@@ -602,6 +602,76 @@ const OPEN_REDIRECT_FRAMEWORK_SINKS = [
602
602
  { method: 'Redirect', class: 'Ctx', type: 'open_redirect', cwe: 'CWE-601', severity: 'medium', arg_positions: [0], languages: ['go'] },
603
603
  ];
604
604
  // =========================================================================
605
+ // cognium-dev #240 ship 2 — extend deserialization (CWE-502) framework
606
+ // coverage across Python (pickle / marshal / dill / jsonpickle) and Go
607
+ // (encoding/gob, gopkg.in/yaml). Java coverage (readObject / XStream /
608
+ // ObjectMapper / Yaml SnakeYAML / Kryo / XMLDecoder) is already extensive
609
+ // via DEFAULT_SINKS below; JS/TS `node-serialize.unserialize` added here.
610
+ //
611
+ // Spread into DEFAULT_SINKS below (per the ship-1 pattern).
612
+ // =========================================================================
613
+ const DESERIALIZATION_FRAMEWORK_SINKS = [
614
+ // --- Python: stdlib + popular third-party --------------------------------
615
+ // pickle: known-dangerous, any unpickle on untrusted bytes is RCE.
616
+ { method: 'loads', class: 'pickle', type: 'deserialization', cwe: 'CWE-502', severity: 'critical', arg_positions: [0], languages: ['python'] },
617
+ { method: 'load', class: 'pickle', type: 'deserialization', cwe: 'CWE-502', severity: 'critical', arg_positions: [0], languages: ['python'] },
618
+ // cPickle alias (Python 2 name, still around in older codebases).
619
+ { method: 'loads', class: 'cPickle', type: 'deserialization', cwe: 'CWE-502', severity: 'critical', arg_positions: [0], languages: ['python'] },
620
+ { method: 'load', class: 'cPickle', type: 'deserialization', cwe: 'CWE-502', severity: 'critical', arg_positions: [0], languages: ['python'] },
621
+ // marshal: stdlib code-object deserializer. Loading a tainted bytestring
622
+ // as a code object followed by `exec` is arbitrary-code execution.
623
+ { method: 'loads', class: 'marshal', type: 'deserialization', cwe: 'CWE-502', severity: 'critical', arg_positions: [0], languages: ['python'] },
624
+ { method: 'load', class: 'marshal', type: 'deserialization', cwe: 'CWE-502', severity: 'critical', arg_positions: [0], languages: ['python'] },
625
+ // dill: pickle superset — same RCE profile.
626
+ { method: 'loads', class: 'dill', type: 'deserialization', cwe: 'CWE-502', severity: 'critical', arg_positions: [0], languages: ['python'] },
627
+ { method: 'load', class: 'dill', type: 'deserialization', cwe: 'CWE-502', severity: 'critical', arg_positions: [0], languages: ['python'] },
628
+ // jsonpickle: JSON wrapper around pickle — trusts `py/object` marker.
629
+ { method: 'decode', class: 'jsonpickle', type: 'deserialization', cwe: 'CWE-502', severity: 'critical', arg_positions: [0], languages: ['python'] },
630
+ // --- Go: encoding/gob + yaml.Unmarshal -----------------------------------
631
+ // gob.NewDecoder(r).Decode(&v): tainted io.Reader → arbitrary Go values.
632
+ { method: 'Decode', class: 'Decoder', type: 'deserialization', cwe: 'CWE-502', severity: 'high', arg_positions: [0], languages: ['go'] },
633
+ // gopkg.in/yaml.v2 + v3 top-level function; interface{} target is unsafe.
634
+ { method: 'Unmarshal', class: 'yaml', type: 'deserialization', cwe: 'CWE-502', severity: 'high', arg_positions: [0], languages: ['go'] },
635
+ // --- JS/TS: node-serialize ------------------------------------------------
636
+ // Known-dangerous — accepts embedded IIFE that runs during deserialize.
637
+ { method: 'unserialize', class: 'nodeSerialize', type: 'deserialization', cwe: 'CWE-502', severity: 'critical', arg_positions: [0], languages: ['javascript', 'typescript'] },
638
+ ];
639
+ // =========================================================================
640
+ // cognium-dev #240 ship 2 — extend nosql_injection (CWE-943) framework
641
+ // coverage. JS/TS MongoDB Collection + Mongoose Model are already covered
642
+ // at line 1776+. This ship adds Python (pymongo), Java (Spring Data
643
+ // MongoTemplate + native MongoCollection), and Go (mongo-driver Collection).
644
+ //
645
+ // Spread into DEFAULT_SINKS below.
646
+ // =========================================================================
647
+ const NOSQL_FRAMEWORK_SINKS = [
648
+ // --- Python: pymongo Collection ------------------------------------------
649
+ // Every filter-taking Collection method; filter arg[0] is the query dict.
650
+ { method: 'find', class: 'Collection', type: 'nosql_injection', cwe: 'CWE-943', severity: 'high', arg_positions: [0], languages: ['python'] },
651
+ { method: 'find_one', class: 'Collection', type: 'nosql_injection', cwe: 'CWE-943', severity: 'high', arg_positions: [0], languages: ['python'] },
652
+ { method: 'aggregate', class: 'Collection', type: 'nosql_injection', cwe: 'CWE-943', severity: 'high', arg_positions: [0], languages: ['python'] },
653
+ { method: 'update_one', class: 'Collection', type: 'nosql_injection', cwe: 'CWE-943', severity: 'high', arg_positions: [0, 1], languages: ['python'] },
654
+ { method: 'update_many', class: 'Collection', type: 'nosql_injection', cwe: 'CWE-943', severity: 'high', arg_positions: [0, 1], languages: ['python'] },
655
+ { method: 'delete_one', class: 'Collection', type: 'nosql_injection', cwe: 'CWE-943', severity: 'high', arg_positions: [0], languages: ['python'] },
656
+ { method: 'delete_many', class: 'Collection', type: 'nosql_injection', cwe: 'CWE-943', severity: 'high', arg_positions: [0], languages: ['python'] },
657
+ { method: 'count_documents', class: 'Collection', type: 'nosql_injection', cwe: 'CWE-943', severity: 'high', arg_positions: [0], languages: ['python'] },
658
+ // --- Java: Spring Data MongoTemplate + native MongoCollection ------------
659
+ { method: 'find', class: 'MongoTemplate', type: 'nosql_injection', cwe: 'CWE-943', severity: 'high', arg_positions: [0], languages: ['java'] },
660
+ { method: 'findOne', class: 'MongoTemplate', type: 'nosql_injection', cwe: 'CWE-943', severity: 'high', arg_positions: [0], languages: ['java'] },
661
+ { method: 'findAll', class: 'MongoTemplate', type: 'nosql_injection', cwe: 'CWE-943', severity: 'high', arg_positions: [0], languages: ['java'] },
662
+ { method: 'find', class: 'MongoCollection', type: 'nosql_injection', cwe: 'CWE-943', severity: 'high', arg_positions: [0], languages: ['java'] },
663
+ { method: 'aggregate', class: 'MongoCollection', type: 'nosql_injection', cwe: 'CWE-943', severity: 'high', arg_positions: [0], languages: ['java'] },
664
+ // --- Go: go.mongodb.org/mongo-driver Collection --------------------------
665
+ // These fire once Go local-receiver type resolution lands (see
666
+ // taint-matcher.ts + #240 ship 2 Go receiver work). Same gate as the
667
+ // gin/fiber Ctx sinks in ship 1.
668
+ { method: 'Find', class: 'Collection', type: 'nosql_injection', cwe: 'CWE-943', severity: 'high', arg_positions: [1], languages: ['go'] },
669
+ { method: 'FindOne', class: 'Collection', type: 'nosql_injection', cwe: 'CWE-943', severity: 'high', arg_positions: [1], languages: ['go'] },
670
+ { method: 'UpdateOne', class: 'Collection', type: 'nosql_injection', cwe: 'CWE-943', severity: 'high', arg_positions: [1, 2], languages: ['go'] },
671
+ { method: 'UpdateMany', class: 'Collection', type: 'nosql_injection', cwe: 'CWE-943', severity: 'high', arg_positions: [1, 2], languages: ['go'] },
672
+ { method: 'DeleteOne', class: 'Collection', type: 'nosql_injection', cwe: 'CWE-943', severity: 'high', arg_positions: [1], languages: ['go'] },
673
+ ];
674
+ // =========================================================================
605
675
  // cognium-dev #240 ship 1 — extend trust_boundary (CWE-501) framework coverage
606
676
  //
607
677
  // Extracted from DEFAULT_SINKS (see note above). Spread into DEFAULT_SINKS
@@ -2297,6 +2367,11 @@ export const DEFAULT_SINKS = [
2297
2367
  // inference complexity limit (TS2590). See ~lines 661-752.
2298
2368
  ...OPEN_REDIRECT_FRAMEWORK_SINKS,
2299
2369
  ...TRUST_BOUNDARY_FRAMEWORK_SINKS,
2370
+ // cognium-dev #240 ship 2 — extended framework sinks for
2371
+ // deserialization (CWE-502) and nosql_injection (CWE-943). Same
2372
+ // pattern: constants defined near the ship-1 blocks and spread here.
2373
+ ...DESERIALIZATION_FRAMEWORK_SINKS,
2374
+ ...NOSQL_FRAMEWORK_SINKS,
2300
2375
  ];
2301
2376
  export const DEFAULT_SANITIZERS = [
2302
2377
  // SQL Injection - proper parameter binding sanitizes input