diff --git a/semgrep_output_v1.atd b/semgrep_output_v1.atd index e7b2470c..5b9a5226 100644 --- a/semgrep_output_v1.atd +++ b/semgrep_output_v1.atd @@ -1218,6 +1218,7 @@ type features = { ~autofix: bool; ~deepsemgrep: bool; ~dependency_query: bool; + ~path_to_transitivity: bool; } type triage_ignored = { diff --git a/semgrep_output_v1.jsonschema b/semgrep_output_v1.jsonschema index 8c6f01c1..355ca226 100644 --- a/semgrep_output_v1.jsonschema +++ b/semgrep_output_v1.jsonschema @@ -948,7 +948,8 @@ "properties": { "autofix": { "type": "boolean" }, "deepsemgrep": { "type": "boolean" }, - "dependency_query": { "type": "boolean" } + "dependency_query": { "type": "boolean" }, + "path_to_transitivity": { "type": "boolean" } } }, "triage_ignored": { @@ -1030,6 +1031,7 @@ "autofix": { "type": "boolean" }, "deepsemgrep": { "type": "boolean" }, "dependency_query": { "type": "boolean" }, + "path_to_transitivity": { "type": "boolean" }, "triage_ignored_syntactic_ids": { "type": "array", "items": { "type": "string" } @@ -1184,6 +1186,7 @@ "autofix": { "type": "boolean" }, "deepsemgrep": { "type": "boolean" }, "dependency_query": { "type": "boolean" }, + "path_to_transitivity": { "type": "boolean" }, "ignored_files": { "type": "array", "items": { "type": "string" } }, "product_ignored_files": { "$ref": "#/definitions/product_ignored_files" @@ -1426,7 +1429,8 @@ "ignored_files": { "type": "array", "items": { "type": "string" } }, "autofix": { "type": "boolean" }, "deepsemgrep": { "type": "boolean" }, - "dependency_query": { "type": "boolean" } + "dependency_query": { "type": "boolean" }, + "path_to_transitivity": { "type": "boolean" } } }, "ci_env": { diff --git a/semgrep_output_v1.proto b/semgrep_output_v1.proto index a971b37b..4ef46d82 100644 --- a/semgrep_output_v1.proto +++ b/semgrep_output_v1.proto @@ -1,6 +1,6 @@ // Generated by jsonschema2protobuf. DO NOT EDIT! // Source file: semgrep_output_v1.jsonschema -// Source file sha256 digest: 3128533ce4295e9cf749fad9537838337aaeb44a78a3384f95e7f43238ca0562 +// Source file sha256 digest: 1dafd6316cd4beb7f32e2081510da5297aebe6a1990dd95e075b59899516a608 syntax = "proto3"; @@ -347,6 +347,7 @@ message Features { bool autofix = 82457874; bool deepsemgrep = 444846865; bool dependency_query = 471197362; + bool path_to_transitivity = 52910370; } message TriageIgnored { @@ -383,6 +384,7 @@ message ScanConfig { bool autofix = 82457874; bool deepsemgrep = 444846865; bool dependency_query = 471197362; + bool path_to_transitivity = 52910370; repeated string triage_ignored_syntactic_ids = 211590151; repeated string triage_ignored_match_based_ids = 327942260; repeated string ignored_files = 482076310; @@ -466,6 +468,7 @@ message EngineConfiguration { bool autofix = 82457874; bool deepsemgrep = 444846865; bool dependency_query = 471197362; + bool path_to_transitivity = 52910370; repeated string ignored_files = 482076310; repeated google.protobuf.Any product_ignored_files = 298217262; bool generic_slow_rollout = 78139686; @@ -587,6 +590,7 @@ message CiConfig { bool autofix = 82457874; bool deepsemgrep = 444846865; bool dependency_query = 471197362; + bool path_to_transitivity = 52910370; } message Edit { diff --git a/semgrep_output_v1.py b/semgrep_output_v1.py index f9778363..bad51331 100644 --- a/semgrep_output_v1.py +++ b/semgrep_output_v1.py @@ -3192,6 +3192,7 @@ class EngineConfiguration: autofix: bool = field(default_factory=lambda: False) deepsemgrep: bool = field(default_factory=lambda: False) dependency_query: bool = field(default_factory=lambda: False) + path_to_transitivity: bool = field(default_factory=lambda: False) ignored_files: List[str] = field(default_factory=lambda: []) product_ignored_files: Optional[ProductIgnoredFiles] = None generic_slow_rollout: bool = field(default_factory=lambda: False) @@ -3205,6 +3206,7 @@ def from_json(cls, x: Any) -> 'EngineConfiguration': autofix=_atd_read_bool(x['autofix']) if 'autofix' in x else False, deepsemgrep=_atd_read_bool(x['deepsemgrep']) if 'deepsemgrep' in x else False, dependency_query=_atd_read_bool(x['dependency_query']) if 'dependency_query' in x else False, + path_to_transitivity=_atd_read_bool(x['path_to_transitivity']) if 'path_to_transitivity' in x else False, ignored_files=_atd_read_list(_atd_read_string)(x['ignored_files']) if 'ignored_files' in x else [], product_ignored_files=ProductIgnoredFiles.from_json(x['product_ignored_files']) if 'product_ignored_files' in x else None, generic_slow_rollout=_atd_read_bool(x['generic_slow_rollout']) if 'generic_slow_rollout' in x else False, @@ -3219,6 +3221,7 @@ def to_json(self) -> Any: res['autofix'] = _atd_write_bool(self.autofix) res['deepsemgrep'] = _atd_write_bool(self.deepsemgrep) res['dependency_query'] = _atd_write_bool(self.dependency_query) + res['path_to_transitivity'] = _atd_write_bool(self.path_to_transitivity) res['ignored_files'] = _atd_write_list(_atd_write_string)(self.ignored_files) if self.product_ignored_files is not None: res['product_ignored_files'] = (lambda x: x.to_json())(self.product_ignored_files) @@ -3525,6 +3528,7 @@ class CiConfig: autofix: bool = field(default_factory=lambda: False) deepsemgrep: bool = field(default_factory=lambda: False) dependency_query: bool = field(default_factory=lambda: False) + path_to_transitivity: bool = field(default_factory=lambda: False) @classmethod def from_json(cls, x: Any) -> 'CiConfig': @@ -3536,6 +3540,7 @@ def from_json(cls, x: Any) -> 'CiConfig': autofix=_atd_read_bool(x['autofix']) if 'autofix' in x else False, deepsemgrep=_atd_read_bool(x['deepsemgrep']) if 'deepsemgrep' in x else False, dependency_query=_atd_read_bool(x['dependency_query']) if 'dependency_query' in x else False, + path_to_transitivity=_atd_read_bool(x['path_to_transitivity']) if 'path_to_transitivity' in x else False, ) else: _atd_bad_json('CiConfig', x) @@ -3548,6 +3553,7 @@ def to_json(self) -> Any: res['autofix'] = _atd_write_bool(self.autofix) res['deepsemgrep'] = _atd_write_bool(self.deepsemgrep) res['dependency_query'] = _atd_write_bool(self.dependency_query) + res['path_to_transitivity'] = _atd_write_bool(self.path_to_transitivity) return res @classmethod @@ -3698,6 +3704,7 @@ class ScanConfig: autofix: bool = field(default_factory=lambda: False) deepsemgrep: bool = field(default_factory=lambda: False) dependency_query: bool = field(default_factory=lambda: False) + path_to_transitivity: bool = field(default_factory=lambda: False) triage_ignored_syntactic_ids: List[str] = field(default_factory=lambda: []) triage_ignored_match_based_ids: List[str] = field(default_factory=lambda: []) ignored_files: List[str] = field(default_factory=lambda: []) @@ -3716,6 +3723,7 @@ def from_json(cls, x: Any) -> 'ScanConfig': autofix=_atd_read_bool(x['autofix']) if 'autofix' in x else False, deepsemgrep=_atd_read_bool(x['deepsemgrep']) if 'deepsemgrep' in x else False, dependency_query=_atd_read_bool(x['dependency_query']) if 'dependency_query' in x else False, + path_to_transitivity=_atd_read_bool(x['path_to_transitivity']) if 'path_to_transitivity' in x else False, triage_ignored_syntactic_ids=_atd_read_list(_atd_read_string)(x['triage_ignored_syntactic_ids']) if 'triage_ignored_syntactic_ids' in x else [], triage_ignored_match_based_ids=_atd_read_list(_atd_read_string)(x['triage_ignored_match_based_ids']) if 'triage_ignored_match_based_ids' in x else [], ignored_files=_atd_read_list(_atd_read_string)(x['ignored_files']) if 'ignored_files' in x else [], @@ -3736,6 +3744,7 @@ def to_json(self) -> Any: res['autofix'] = _atd_write_bool(self.autofix) res['deepsemgrep'] = _atd_write_bool(self.deepsemgrep) res['dependency_query'] = _atd_write_bool(self.dependency_query) + res['path_to_transitivity'] = _atd_write_bool(self.path_to_transitivity) res['triage_ignored_syntactic_ids'] = _atd_write_list(_atd_write_string)(self.triage_ignored_syntactic_ids) res['triage_ignored_match_based_ids'] = _atd_write_list(_atd_write_string)(self.triage_ignored_match_based_ids) res['ignored_files'] = _atd_write_list(_atd_write_string)(self.ignored_files) @@ -7233,6 +7242,7 @@ class Features: autofix: bool = field(default_factory=lambda: False) deepsemgrep: bool = field(default_factory=lambda: False) dependency_query: bool = field(default_factory=lambda: False) + path_to_transitivity: bool = field(default_factory=lambda: False) @classmethod def from_json(cls, x: Any) -> 'Features': @@ -7241,6 +7251,7 @@ def from_json(cls, x: Any) -> 'Features': autofix=_atd_read_bool(x['autofix']) if 'autofix' in x else False, deepsemgrep=_atd_read_bool(x['deepsemgrep']) if 'deepsemgrep' in x else False, dependency_query=_atd_read_bool(x['dependency_query']) if 'dependency_query' in x else False, + path_to_transitivity=_atd_read_bool(x['path_to_transitivity']) if 'path_to_transitivity' in x else False, ) else: _atd_bad_json('Features', x) @@ -7250,6 +7261,7 @@ def to_json(self) -> Any: res['autofix'] = _atd_write_bool(self.autofix) res['deepsemgrep'] = _atd_write_bool(self.deepsemgrep) res['dependency_query'] = _atd_write_bool(self.dependency_query) + res['path_to_transitivity'] = _atd_write_bool(self.path_to_transitivity) return res @classmethod diff --git a/semgrep_output_v1.ts b/semgrep_output_v1.ts index 606cd073..0da31341 100644 --- a/semgrep_output_v1.ts +++ b/semgrep_output_v1.ts @@ -535,6 +535,7 @@ export type Features = { autofix: boolean; deepsemgrep: boolean; dependency_query: boolean; + path_to_transitivity: boolean; } export type TriageIgnored = { @@ -578,6 +579,7 @@ export type ScanConfig = { autofix: boolean; deepsemgrep: boolean; dependency_query: boolean; + path_to_transitivity: boolean; triage_ignored_syntactic_ids: string[]; triage_ignored_match_based_ids: string[]; ignored_files: string[]; @@ -665,6 +667,7 @@ export type EngineConfiguration = { autofix: boolean; deepsemgrep: boolean; dependency_query: boolean; + path_to_transitivity: boolean; ignored_files: string[]; product_ignored_files?: ProductIgnoredFiles; generic_slow_rollout: boolean; @@ -790,6 +793,7 @@ export type CiConfig = { autofix: boolean; deepsemgrep: boolean; dependency_query: boolean; + path_to_transitivity: boolean; } export type CiEnv = Map @@ -2597,6 +2601,7 @@ export function writeFeatures(x: Features, context: any = x): any { 'autofix': _atd_write_field_with_default(_atd_write_bool, false, x.autofix, x), 'deepsemgrep': _atd_write_field_with_default(_atd_write_bool, false, x.deepsemgrep, x), 'dependency_query': _atd_write_field_with_default(_atd_write_bool, false, x.dependency_query, x), + 'path_to_transitivity': _atd_write_field_with_default(_atd_write_bool, false, x.path_to_transitivity, x), }; } @@ -2605,6 +2610,7 @@ export function readFeatures(x: any, context: any = x): Features { autofix: _atd_read_field_with_default(_atd_read_bool, false, x['autofix'], x), deepsemgrep: _atd_read_field_with_default(_atd_read_bool, false, x['deepsemgrep'], x), dependency_query: _atd_read_field_with_default(_atd_read_bool, false, x['dependency_query'], x), + path_to_transitivity: _atd_read_field_with_default(_atd_read_bool, false, x['path_to_transitivity'], x), }; } @@ -2714,6 +2720,7 @@ export function writeScanConfig(x: ScanConfig, context: any = x): any { 'autofix': _atd_write_field_with_default(_atd_write_bool, false, x.autofix, x), 'deepsemgrep': _atd_write_field_with_default(_atd_write_bool, false, x.deepsemgrep, x), 'dependency_query': _atd_write_field_with_default(_atd_write_bool, false, x.dependency_query, x), + 'path_to_transitivity': _atd_write_field_with_default(_atd_write_bool, false, x.path_to_transitivity, x), 'triage_ignored_syntactic_ids': _atd_write_field_with_default(_atd_write_array(_atd_write_string), [], x.triage_ignored_syntactic_ids, x), 'triage_ignored_match_based_ids': _atd_write_field_with_default(_atd_write_array(_atd_write_string), [], x.triage_ignored_match_based_ids, x), 'ignored_files': _atd_write_field_with_default(_atd_write_array(_atd_write_string), [], x.ignored_files, x), @@ -2732,6 +2739,7 @@ export function readScanConfig(x: any, context: any = x): ScanConfig { autofix: _atd_read_field_with_default(_atd_read_bool, false, x['autofix'], x), deepsemgrep: _atd_read_field_with_default(_atd_read_bool, false, x['deepsemgrep'], x), dependency_query: _atd_read_field_with_default(_atd_read_bool, false, x['dependency_query'], x), + path_to_transitivity: _atd_read_field_with_default(_atd_read_bool, false, x['path_to_transitivity'], x), triage_ignored_syntactic_ids: _atd_read_field_with_default(_atd_read_array(_atd_read_string), [], x['triage_ignored_syntactic_ids'], x), triage_ignored_match_based_ids: _atd_read_field_with_default(_atd_read_array(_atd_read_string), [], x['triage_ignored_match_based_ids'], x), ignored_files: _atd_read_field_with_default(_atd_read_array(_atd_read_string), [], x['ignored_files'], x), @@ -2937,6 +2945,7 @@ export function writeEngineConfiguration(x: EngineConfiguration, context: any = 'autofix': _atd_write_field_with_default(_atd_write_bool, false, x.autofix, x), 'deepsemgrep': _atd_write_field_with_default(_atd_write_bool, false, x.deepsemgrep, x), 'dependency_query': _atd_write_field_with_default(_atd_write_bool, false, x.dependency_query, x), + 'path_to_transitivity': _atd_write_field_with_default(_atd_write_bool, false, x.path_to_transitivity, x), 'ignored_files': _atd_write_field_with_default(_atd_write_array(_atd_write_string), [], x.ignored_files, x), 'product_ignored_files': _atd_write_optional_field(writeProductIgnoredFiles, x.product_ignored_files, x), 'generic_slow_rollout': _atd_write_field_with_default(_atd_write_bool, false, x.generic_slow_rollout, x), @@ -2950,6 +2959,7 @@ export function readEngineConfiguration(x: any, context: any = x): EngineConfigu autofix: _atd_read_field_with_default(_atd_read_bool, false, x['autofix'], x), deepsemgrep: _atd_read_field_with_default(_atd_read_bool, false, x['deepsemgrep'], x), dependency_query: _atd_read_field_with_default(_atd_read_bool, false, x['dependency_query'], x), + path_to_transitivity: _atd_read_field_with_default(_atd_read_bool, false, x['path_to_transitivity'], x), ignored_files: _atd_read_field_with_default(_atd_read_array(_atd_read_string), [], x['ignored_files'], x), product_ignored_files: _atd_read_optional_field(readProductIgnoredFiles, x['product_ignored_files'], x), generic_slow_rollout: _atd_read_field_with_default(_atd_read_bool, false, x['generic_slow_rollout'], x), @@ -3248,6 +3258,7 @@ export function writeCiConfig(x: CiConfig, context: any = x): any { 'autofix': _atd_write_field_with_default(_atd_write_bool, false, x.autofix, x), 'deepsemgrep': _atd_write_field_with_default(_atd_write_bool, false, x.deepsemgrep, x), 'dependency_query': _atd_write_field_with_default(_atd_write_bool, false, x.dependency_query, x), + 'path_to_transitivity': _atd_write_field_with_default(_atd_write_bool, false, x.path_to_transitivity, x), }; } @@ -3259,6 +3270,7 @@ export function readCiConfig(x: any, context: any = x): CiConfig { autofix: _atd_read_field_with_default(_atd_read_bool, false, x['autofix'], x), deepsemgrep: _atd_read_field_with_default(_atd_read_bool, false, x['deepsemgrep'], x), dependency_query: _atd_read_field_with_default(_atd_read_bool, false, x['dependency_query'], x), + path_to_transitivity: _atd_read_field_with_default(_atd_read_bool, false, x['path_to_transitivity'], x), }; } diff --git a/semgrep_output_v1_j.ml b/semgrep_output_v1_j.ml index 85b3d2f3..848e0c82 100644 --- a/semgrep_output_v1_j.ml +++ b/semgrep_output_v1_j.ml @@ -284,6 +284,7 @@ type engine_configuration = Semgrep_output_v1_t.engine_configuration = { autofix: bool; deepsemgrep: bool; dependency_query: bool; + path_to_transitivity: bool; ignored_files: string list; product_ignored_files: product_ignored_files option; generic_slow_rollout: bool; @@ -354,7 +355,8 @@ type ci_config = Semgrep_output_v1_t.ci_config = { ignored_files: string list; autofix: bool; deepsemgrep: bool; - dependency_query: bool + dependency_query: bool; + path_to_transitivity: bool } type action = Semgrep_output_v1_t.action @@ -375,6 +377,7 @@ type scan_config = Semgrep_output_v1_t.scan_config = { autofix: bool; deepsemgrep: bool; dependency_query: bool; + path_to_transitivity: bool; triage_ignored_syntactic_ids: string list; triage_ignored_match_based_ids: string list; ignored_files: string list; @@ -710,7 +713,8 @@ type function_call = Semgrep_output_v1_t.function_call type features = Semgrep_output_v1_t.features = { autofix: bool; deepsemgrep: bool; - dependency_query: bool + dependency_query: bool; + path_to_transitivity: bool } type deployment_config = Semgrep_output_v1_t.deployment_config = { @@ -10395,6 +10399,15 @@ let write_engine_configuration : _ -> engine_configuration -> _ = ( ob x.dependency_query; if !is_first then is_first := false + else + Buffer.add_char ob ','; + Buffer.add_string ob "\"path_to_transitivity\":"; + ( + Yojson.Safe.write_bool + ) + ob x.path_to_transitivity; + if !is_first then + is_first := false else Buffer.add_char ob ','; Buffer.add_string ob "\"ignored_files\":"; @@ -10455,6 +10468,7 @@ let read_engine_configuration = ( let field_autofix = ref (false) in let field_deepsemgrep = ref (false) in let field_dependency_query = ref (false) in + let field_path_to_transitivity = ref (false) in let field_ignored_files = ref ([]) in let field_product_ignored_files = ref (None) in let field_generic_slow_rollout = ref (false) in @@ -10487,7 +10501,7 @@ let read_engine_configuration = ( ) | 13 -> ( if String.unsafe_get s pos = 'i' && String.unsafe_get s (pos+1) = 'g' && String.unsafe_get s (pos+2) = 'n' && String.unsafe_get s (pos+3) = 'o' && String.unsafe_get s (pos+4) = 'r' && String.unsafe_get s (pos+5) = 'e' && String.unsafe_get s (pos+6) = 'd' && String.unsafe_get s (pos+7) = '_' && String.unsafe_get s (pos+8) = 'f' && String.unsafe_get s (pos+9) = 'i' && String.unsafe_get s (pos+10) = 'l' && String.unsafe_get s (pos+11) = 'e' && String.unsafe_get s (pos+12) = 's' then ( - 3 + 4 ) else ( -1 @@ -10503,23 +10517,37 @@ let read_engine_configuration = ( ) | 17 -> ( if String.unsafe_get s pos = 'h' && String.unsafe_get s (pos+1) = 'i' && String.unsafe_get s (pos+2) = 's' && String.unsafe_get s (pos+3) = 't' && String.unsafe_get s (pos+4) = 'o' && String.unsafe_get s (pos+5) = 'r' && String.unsafe_get s (pos+6) = 'i' && String.unsafe_get s (pos+7) = 'c' && String.unsafe_get s (pos+8) = 'a' && String.unsafe_get s (pos+9) = 'l' && String.unsafe_get s (pos+10) = '_' && String.unsafe_get s (pos+11) = 'c' && String.unsafe_get s (pos+12) = 'o' && String.unsafe_get s (pos+13) = 'n' && String.unsafe_get s (pos+14) = 'f' && String.unsafe_get s (pos+15) = 'i' && String.unsafe_get s (pos+16) = 'g' then ( - 6 + 7 ) else ( -1 ) ) | 20 -> ( - if String.unsafe_get s pos = 'g' && String.unsafe_get s (pos+1) = 'e' && String.unsafe_get s (pos+2) = 'n' && String.unsafe_get s (pos+3) = 'e' && String.unsafe_get s (pos+4) = 'r' && String.unsafe_get s (pos+5) = 'i' && String.unsafe_get s (pos+6) = 'c' && String.unsafe_get s (pos+7) = '_' && String.unsafe_get s (pos+8) = 's' && String.unsafe_get s (pos+9) = 'l' && String.unsafe_get s (pos+10) = 'o' && String.unsafe_get s (pos+11) = 'w' && String.unsafe_get s (pos+12) = '_' && String.unsafe_get s (pos+13) = 'r' && String.unsafe_get s (pos+14) = 'o' && String.unsafe_get s (pos+15) = 'l' && String.unsafe_get s (pos+16) = 'l' && String.unsafe_get s (pos+17) = 'o' && String.unsafe_get s (pos+18) = 'u' && String.unsafe_get s (pos+19) = 't' then ( - 5 - ) - else ( - -1 - ) + match String.unsafe_get s pos with + | 'g' -> ( + if String.unsafe_get s (pos+1) = 'e' && String.unsafe_get s (pos+2) = 'n' && String.unsafe_get s (pos+3) = 'e' && String.unsafe_get s (pos+4) = 'r' && String.unsafe_get s (pos+5) = 'i' && String.unsafe_get s (pos+6) = 'c' && String.unsafe_get s (pos+7) = '_' && String.unsafe_get s (pos+8) = 's' && String.unsafe_get s (pos+9) = 'l' && String.unsafe_get s (pos+10) = 'o' && String.unsafe_get s (pos+11) = 'w' && String.unsafe_get s (pos+12) = '_' && String.unsafe_get s (pos+13) = 'r' && String.unsafe_get s (pos+14) = 'o' && String.unsafe_get s (pos+15) = 'l' && String.unsafe_get s (pos+16) = 'l' && String.unsafe_get s (pos+17) = 'o' && String.unsafe_get s (pos+18) = 'u' && String.unsafe_get s (pos+19) = 't' then ( + 6 + ) + else ( + -1 + ) + ) + | 'p' -> ( + if String.unsafe_get s (pos+1) = 'a' && String.unsafe_get s (pos+2) = 't' && String.unsafe_get s (pos+3) = 'h' && String.unsafe_get s (pos+4) = '_' && String.unsafe_get s (pos+5) = 't' && String.unsafe_get s (pos+6) = 'o' && String.unsafe_get s (pos+7) = '_' && String.unsafe_get s (pos+8) = 't' && String.unsafe_get s (pos+9) = 'r' && String.unsafe_get s (pos+10) = 'a' && String.unsafe_get s (pos+11) = 'n' && String.unsafe_get s (pos+12) = 's' && String.unsafe_get s (pos+13) = 'i' && String.unsafe_get s (pos+14) = 't' && String.unsafe_get s (pos+15) = 'i' && String.unsafe_get s (pos+16) = 'v' && String.unsafe_get s (pos+17) = 'i' && String.unsafe_get s (pos+18) = 't' && String.unsafe_get s (pos+19) = 'y' then ( + 3 + ) + else ( + -1 + ) + ) + | _ -> ( + -1 + ) ) | 21 -> ( if String.unsafe_get s pos = 'p' && String.unsafe_get s (pos+1) = 'r' && String.unsafe_get s (pos+2) = 'o' && String.unsafe_get s (pos+3) = 'd' && String.unsafe_get s (pos+4) = 'u' && String.unsafe_get s (pos+5) = 'c' && String.unsafe_get s (pos+6) = 't' && String.unsafe_get s (pos+7) = '_' && String.unsafe_get s (pos+8) = 'i' && String.unsafe_get s (pos+9) = 'g' && String.unsafe_get s (pos+10) = 'n' && String.unsafe_get s (pos+11) = 'o' && String.unsafe_get s (pos+12) = 'r' && String.unsafe_get s (pos+13) = 'e' && String.unsafe_get s (pos+14) = 'd' && String.unsafe_get s (pos+15) = '_' && String.unsafe_get s (pos+16) = 'f' && String.unsafe_get s (pos+17) = 'i' && String.unsafe_get s (pos+18) = 'l' && String.unsafe_get s (pos+19) = 'e' && String.unsafe_get s (pos+20) = 's' then ( - 4 + 5 ) else ( -1 @@ -10527,7 +10555,7 @@ let read_engine_configuration = ( ) | 22 -> ( if String.unsafe_get s pos = 'a' && String.unsafe_get s (pos+1) = 'l' && String.unsafe_get s (pos+2) = 'w' && String.unsafe_get s (pos+3) = 'a' && String.unsafe_get s (pos+4) = 'y' && String.unsafe_get s (pos+5) = 's' && String.unsafe_get s (pos+6) = '_' && String.unsafe_get s (pos+7) = 's' && String.unsafe_get s (pos+8) = 'u' && String.unsafe_get s (pos+9) = 'p' && String.unsafe_get s (pos+10) = 'p' && String.unsafe_get s (pos+11) = 'r' && String.unsafe_get s (pos+12) = 'e' && String.unsafe_get s (pos+13) = 's' && String.unsafe_get s (pos+14) = 's' && String.unsafe_get s (pos+15) = '_' && String.unsafe_get s (pos+16) = 'e' && String.unsafe_get s (pos+17) = 'r' && String.unsafe_get s (pos+18) = 'r' && String.unsafe_get s (pos+19) = 'o' && String.unsafe_get s (pos+20) = 'r' && String.unsafe_get s (pos+21) = 's' then ( - 7 + 8 ) else ( -1 @@ -10566,6 +10594,14 @@ let read_engine_configuration = ( ); ) | 3 -> + if not (Yojson.Safe.read_null_if_possible p lb) then ( + field_path_to_transitivity := ( + ( + Atdgen_runtime.Oj_run.read_bool + ) p lb + ); + ) + | 4 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_ignored_files := ( ( @@ -10573,7 +10609,7 @@ let read_engine_configuration = ( ) p lb ); ) - | 4 -> + | 5 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_product_ignored_files := ( Some ( @@ -10583,7 +10619,7 @@ let read_engine_configuration = ( ) ); ) - | 5 -> + | 6 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_generic_slow_rollout := ( ( @@ -10591,7 +10627,7 @@ let read_engine_configuration = ( ) p lb ); ) - | 6 -> + | 7 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_historical_config := ( Some ( @@ -10601,7 +10637,7 @@ let read_engine_configuration = ( ) ); ) - | 7 -> + | 8 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_always_suppress_errors := ( ( @@ -10640,7 +10676,7 @@ let read_engine_configuration = ( ) | 13 -> ( if String.unsafe_get s pos = 'i' && String.unsafe_get s (pos+1) = 'g' && String.unsafe_get s (pos+2) = 'n' && String.unsafe_get s (pos+3) = 'o' && String.unsafe_get s (pos+4) = 'r' && String.unsafe_get s (pos+5) = 'e' && String.unsafe_get s (pos+6) = 'd' && String.unsafe_get s (pos+7) = '_' && String.unsafe_get s (pos+8) = 'f' && String.unsafe_get s (pos+9) = 'i' && String.unsafe_get s (pos+10) = 'l' && String.unsafe_get s (pos+11) = 'e' && String.unsafe_get s (pos+12) = 's' then ( - 3 + 4 ) else ( -1 @@ -10656,23 +10692,37 @@ let read_engine_configuration = ( ) | 17 -> ( if String.unsafe_get s pos = 'h' && String.unsafe_get s (pos+1) = 'i' && String.unsafe_get s (pos+2) = 's' && String.unsafe_get s (pos+3) = 't' && String.unsafe_get s (pos+4) = 'o' && String.unsafe_get s (pos+5) = 'r' && String.unsafe_get s (pos+6) = 'i' && String.unsafe_get s (pos+7) = 'c' && String.unsafe_get s (pos+8) = 'a' && String.unsafe_get s (pos+9) = 'l' && String.unsafe_get s (pos+10) = '_' && String.unsafe_get s (pos+11) = 'c' && String.unsafe_get s (pos+12) = 'o' && String.unsafe_get s (pos+13) = 'n' && String.unsafe_get s (pos+14) = 'f' && String.unsafe_get s (pos+15) = 'i' && String.unsafe_get s (pos+16) = 'g' then ( - 6 + 7 ) else ( -1 ) ) | 20 -> ( - if String.unsafe_get s pos = 'g' && String.unsafe_get s (pos+1) = 'e' && String.unsafe_get s (pos+2) = 'n' && String.unsafe_get s (pos+3) = 'e' && String.unsafe_get s (pos+4) = 'r' && String.unsafe_get s (pos+5) = 'i' && String.unsafe_get s (pos+6) = 'c' && String.unsafe_get s (pos+7) = '_' && String.unsafe_get s (pos+8) = 's' && String.unsafe_get s (pos+9) = 'l' && String.unsafe_get s (pos+10) = 'o' && String.unsafe_get s (pos+11) = 'w' && String.unsafe_get s (pos+12) = '_' && String.unsafe_get s (pos+13) = 'r' && String.unsafe_get s (pos+14) = 'o' && String.unsafe_get s (pos+15) = 'l' && String.unsafe_get s (pos+16) = 'l' && String.unsafe_get s (pos+17) = 'o' && String.unsafe_get s (pos+18) = 'u' && String.unsafe_get s (pos+19) = 't' then ( - 5 - ) - else ( - -1 - ) + match String.unsafe_get s pos with + | 'g' -> ( + if String.unsafe_get s (pos+1) = 'e' && String.unsafe_get s (pos+2) = 'n' && String.unsafe_get s (pos+3) = 'e' && String.unsafe_get s (pos+4) = 'r' && String.unsafe_get s (pos+5) = 'i' && String.unsafe_get s (pos+6) = 'c' && String.unsafe_get s (pos+7) = '_' && String.unsafe_get s (pos+8) = 's' && String.unsafe_get s (pos+9) = 'l' && String.unsafe_get s (pos+10) = 'o' && String.unsafe_get s (pos+11) = 'w' && String.unsafe_get s (pos+12) = '_' && String.unsafe_get s (pos+13) = 'r' && String.unsafe_get s (pos+14) = 'o' && String.unsafe_get s (pos+15) = 'l' && String.unsafe_get s (pos+16) = 'l' && String.unsafe_get s (pos+17) = 'o' && String.unsafe_get s (pos+18) = 'u' && String.unsafe_get s (pos+19) = 't' then ( + 6 + ) + else ( + -1 + ) + ) + | 'p' -> ( + if String.unsafe_get s (pos+1) = 'a' && String.unsafe_get s (pos+2) = 't' && String.unsafe_get s (pos+3) = 'h' && String.unsafe_get s (pos+4) = '_' && String.unsafe_get s (pos+5) = 't' && String.unsafe_get s (pos+6) = 'o' && String.unsafe_get s (pos+7) = '_' && String.unsafe_get s (pos+8) = 't' && String.unsafe_get s (pos+9) = 'r' && String.unsafe_get s (pos+10) = 'a' && String.unsafe_get s (pos+11) = 'n' && String.unsafe_get s (pos+12) = 's' && String.unsafe_get s (pos+13) = 'i' && String.unsafe_get s (pos+14) = 't' && String.unsafe_get s (pos+15) = 'i' && String.unsafe_get s (pos+16) = 'v' && String.unsafe_get s (pos+17) = 'i' && String.unsafe_get s (pos+18) = 't' && String.unsafe_get s (pos+19) = 'y' then ( + 3 + ) + else ( + -1 + ) + ) + | _ -> ( + -1 + ) ) | 21 -> ( if String.unsafe_get s pos = 'p' && String.unsafe_get s (pos+1) = 'r' && String.unsafe_get s (pos+2) = 'o' && String.unsafe_get s (pos+3) = 'd' && String.unsafe_get s (pos+4) = 'u' && String.unsafe_get s (pos+5) = 'c' && String.unsafe_get s (pos+6) = 't' && String.unsafe_get s (pos+7) = '_' && String.unsafe_get s (pos+8) = 'i' && String.unsafe_get s (pos+9) = 'g' && String.unsafe_get s (pos+10) = 'n' && String.unsafe_get s (pos+11) = 'o' && String.unsafe_get s (pos+12) = 'r' && String.unsafe_get s (pos+13) = 'e' && String.unsafe_get s (pos+14) = 'd' && String.unsafe_get s (pos+15) = '_' && String.unsafe_get s (pos+16) = 'f' && String.unsafe_get s (pos+17) = 'i' && String.unsafe_get s (pos+18) = 'l' && String.unsafe_get s (pos+19) = 'e' && String.unsafe_get s (pos+20) = 's' then ( - 4 + 5 ) else ( -1 @@ -10680,7 +10730,7 @@ let read_engine_configuration = ( ) | 22 -> ( if String.unsafe_get s pos = 'a' && String.unsafe_get s (pos+1) = 'l' && String.unsafe_get s (pos+2) = 'w' && String.unsafe_get s (pos+3) = 'a' && String.unsafe_get s (pos+4) = 'y' && String.unsafe_get s (pos+5) = 's' && String.unsafe_get s (pos+6) = '_' && String.unsafe_get s (pos+7) = 's' && String.unsafe_get s (pos+8) = 'u' && String.unsafe_get s (pos+9) = 'p' && String.unsafe_get s (pos+10) = 'p' && String.unsafe_get s (pos+11) = 'r' && String.unsafe_get s (pos+12) = 'e' && String.unsafe_get s (pos+13) = 's' && String.unsafe_get s (pos+14) = 's' && String.unsafe_get s (pos+15) = '_' && String.unsafe_get s (pos+16) = 'e' && String.unsafe_get s (pos+17) = 'r' && String.unsafe_get s (pos+18) = 'r' && String.unsafe_get s (pos+19) = 'o' && String.unsafe_get s (pos+20) = 'r' && String.unsafe_get s (pos+21) = 's' then ( - 7 + 8 ) else ( -1 @@ -10719,6 +10769,14 @@ let read_engine_configuration = ( ); ) | 3 -> + if not (Yojson.Safe.read_null_if_possible p lb) then ( + field_path_to_transitivity := ( + ( + Atdgen_runtime.Oj_run.read_bool + ) p lb + ); + ) + | 4 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_ignored_files := ( ( @@ -10726,7 +10784,7 @@ let read_engine_configuration = ( ) p lb ); ) - | 4 -> + | 5 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_product_ignored_files := ( Some ( @@ -10736,7 +10794,7 @@ let read_engine_configuration = ( ) ); ) - | 5 -> + | 6 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_generic_slow_rollout := ( ( @@ -10744,7 +10802,7 @@ let read_engine_configuration = ( ) p lb ); ) - | 6 -> + | 7 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_historical_config := ( Some ( @@ -10754,7 +10812,7 @@ let read_engine_configuration = ( ) ); ) - | 7 -> + | 8 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_always_suppress_errors := ( ( @@ -10774,6 +10832,7 @@ let read_engine_configuration = ( autofix = !field_autofix; deepsemgrep = !field_deepsemgrep; dependency_query = !field_dependency_query; + path_to_transitivity = !field_path_to_transitivity; ignored_files = !field_ignored_files; product_ignored_files = !field_product_ignored_files; generic_slow_rollout = !field_generic_slow_rollout; @@ -13529,6 +13588,15 @@ let write_ci_config : _ -> ci_config -> _ = ( Yojson.Safe.write_bool ) ob x.dependency_query; + if !is_first then + is_first := false + else + Buffer.add_char ob ','; + Buffer.add_string ob "\"path_to_transitivity\":"; + ( + Yojson.Safe.write_bool + ) + ob x.path_to_transitivity; Buffer.add_char ob '}'; ) let string_of_ci_config ?(len = 1024) x = @@ -13545,6 +13613,7 @@ let read_ci_config = ( let field_autofix = ref (false) in let field_deepsemgrep = ref (false) in let field_dependency_query = ref (false) in + let field_path_to_transitivity = ref (false) in try Yojson.Safe.read_space p lb; Yojson.Safe.read_object_end lb; @@ -13608,6 +13677,14 @@ let read_ci_config = ( -1 ) ) + | 20 -> ( + if String.unsafe_get s pos = 'p' && String.unsafe_get s (pos+1) = 'a' && String.unsafe_get s (pos+2) = 't' && String.unsafe_get s (pos+3) = 'h' && String.unsafe_get s (pos+4) = '_' && String.unsafe_get s (pos+5) = 't' && String.unsafe_get s (pos+6) = 'o' && String.unsafe_get s (pos+7) = '_' && String.unsafe_get s (pos+8) = 't' && String.unsafe_get s (pos+9) = 'r' && String.unsafe_get s (pos+10) = 'a' && String.unsafe_get s (pos+11) = 'n' && String.unsafe_get s (pos+12) = 's' && String.unsafe_get s (pos+13) = 'i' && String.unsafe_get s (pos+14) = 't' && String.unsafe_get s (pos+15) = 'i' && String.unsafe_get s (pos+16) = 'v' && String.unsafe_get s (pos+17) = 'i' && String.unsafe_get s (pos+18) = 't' && String.unsafe_get s (pos+19) = 'y' then ( + 6 + ) + else ( + -1 + ) + ) | _ -> ( -1 ) @@ -13664,6 +13741,14 @@ let read_ci_config = ( ) p lb ); ) + | 6 -> + if not (Yojson.Safe.read_null_if_possible p lb) then ( + field_path_to_transitivity := ( + ( + Atdgen_runtime.Oj_run.read_bool + ) p lb + ); + ) | _ -> ( Yojson.Safe.skip_json p lb ) @@ -13731,6 +13816,14 @@ let read_ci_config = ( -1 ) ) + | 20 -> ( + if String.unsafe_get s pos = 'p' && String.unsafe_get s (pos+1) = 'a' && String.unsafe_get s (pos+2) = 't' && String.unsafe_get s (pos+3) = 'h' && String.unsafe_get s (pos+4) = '_' && String.unsafe_get s (pos+5) = 't' && String.unsafe_get s (pos+6) = 'o' && String.unsafe_get s (pos+7) = '_' && String.unsafe_get s (pos+8) = 't' && String.unsafe_get s (pos+9) = 'r' && String.unsafe_get s (pos+10) = 'a' && String.unsafe_get s (pos+11) = 'n' && String.unsafe_get s (pos+12) = 's' && String.unsafe_get s (pos+13) = 'i' && String.unsafe_get s (pos+14) = 't' && String.unsafe_get s (pos+15) = 'i' && String.unsafe_get s (pos+16) = 'v' && String.unsafe_get s (pos+17) = 'i' && String.unsafe_get s (pos+18) = 't' && String.unsafe_get s (pos+19) = 'y' then ( + 6 + ) + else ( + -1 + ) + ) | _ -> ( -1 ) @@ -13787,6 +13880,14 @@ let read_ci_config = ( ) p lb ); ) + | 6 -> + if not (Yojson.Safe.read_null_if_possible p lb) then ( + field_path_to_transitivity := ( + ( + Atdgen_runtime.Oj_run.read_bool + ) p lb + ); + ) | _ -> ( Yojson.Safe.skip_json p lb ) @@ -13802,6 +13903,7 @@ let read_ci_config = ( autofix = !field_autofix; deepsemgrep = !field_deepsemgrep; dependency_query = !field_dependency_query; + path_to_transitivity = !field_path_to_transitivity; } : ci_config) ) @@ -14573,6 +14675,15 @@ let write_scan_config : _ -> scan_config -> _ = ( ob x.dependency_query; if !is_first then is_first := false + else + Buffer.add_char ob ','; + Buffer.add_string ob "\"path_to_transitivity\":"; + ( + Yojson.Safe.write_bool + ) + ob x.path_to_transitivity; + if !is_first then + is_first := false else Buffer.add_char ob ','; Buffer.add_string ob "\"triage_ignored_syntactic_ids\":"; @@ -14636,6 +14747,7 @@ let read_scan_config = ( let field_autofix = ref (false) in let field_deepsemgrep = ref (false) in let field_dependency_query = ref (false) in + let field_path_to_transitivity = ref (false) in let field_triage_ignored_syntactic_ids = ref ([]) in let field_triage_ignored_match_based_ids = ref ([]) in let field_ignored_files = ref ([]) in @@ -14655,7 +14767,7 @@ let read_scan_config = ( match String.unsafe_get s (pos+1) with | 'c' -> ( if String.unsafe_get s (pos+2) = 't' && String.unsafe_get s (pos+3) = 'i' && String.unsafe_get s (pos+4) = 'o' && String.unsafe_get s (pos+5) = 'n' && String.unsafe_get s (pos+6) = 's' then ( - 12 + 13 ) else ( -1 @@ -14719,7 +14831,7 @@ let read_scan_config = ( ) | 'i' -> ( if String.unsafe_get s (pos+1) = 'g' && String.unsafe_get s (pos+2) = 'n' && String.unsafe_get s (pos+3) = 'o' && String.unsafe_get s (pos+4) = 'r' && String.unsafe_get s (pos+5) = 'e' && String.unsafe_get s (pos+6) = 'd' && String.unsafe_get s (pos+7) = '_' && String.unsafe_get s (pos+8) = 'f' && String.unsafe_get s (pos+9) = 'i' && String.unsafe_get s (pos+10) = 'l' && String.unsafe_get s (pos+11) = 'e' && String.unsafe_get s (pos+12) = 's' then ( - 10 + 11 ) else ( -1 @@ -14749,7 +14861,7 @@ let read_scan_config = ( ) | 'e' -> ( if String.unsafe_get s (pos+1) = 'n' && String.unsafe_get s (pos+2) = 'a' && String.unsafe_get s (pos+3) = 'b' && String.unsafe_get s (pos+4) = 'l' && String.unsafe_get s (pos+5) = 'e' && String.unsafe_get s (pos+6) = 'd' && String.unsafe_get s (pos+7) = '_' && String.unsafe_get s (pos+8) = 'p' && String.unsafe_get s (pos+9) = 'r' && String.unsafe_get s (pos+10) = 'o' && String.unsafe_get s (pos+11) = 'd' && String.unsafe_get s (pos+12) = 'u' && String.unsafe_get s (pos+13) = 'c' && String.unsafe_get s (pos+14) = 't' && String.unsafe_get s (pos+15) = 's' then ( - 11 + 12 ) else ( -1 @@ -14760,16 +14872,30 @@ let read_scan_config = ( ) ) | 20 -> ( - if String.unsafe_get s pos = 'c' && String.unsafe_get s (pos+1) = 'i' && String.unsafe_get s (pos+2) = '_' && String.unsafe_get s (pos+3) = 'c' && String.unsafe_get s (pos+4) = 'o' && String.unsafe_get s (pos+5) = 'n' && String.unsafe_get s (pos+6) = 'f' && String.unsafe_get s (pos+7) = 'i' && String.unsafe_get s (pos+8) = 'g' && String.unsafe_get s (pos+9) = '_' && String.unsafe_get s (pos+10) = 'f' && String.unsafe_get s (pos+11) = 'r' && String.unsafe_get s (pos+12) = 'o' && String.unsafe_get s (pos+13) = 'm' && String.unsafe_get s (pos+14) = '_' && String.unsafe_get s (pos+15) = 'c' && String.unsafe_get s (pos+16) = 'l' && String.unsafe_get s (pos+17) = 'o' && String.unsafe_get s (pos+18) = 'u' && String.unsafe_get s (pos+19) = 'd' then ( - 4 - ) - else ( - -1 - ) + match String.unsafe_get s pos with + | 'c' -> ( + if String.unsafe_get s (pos+1) = 'i' && String.unsafe_get s (pos+2) = '_' && String.unsafe_get s (pos+3) = 'c' && String.unsafe_get s (pos+4) = 'o' && String.unsafe_get s (pos+5) = 'n' && String.unsafe_get s (pos+6) = 'f' && String.unsafe_get s (pos+7) = 'i' && String.unsafe_get s (pos+8) = 'g' && String.unsafe_get s (pos+9) = '_' && String.unsafe_get s (pos+10) = 'f' && String.unsafe_get s (pos+11) = 'r' && String.unsafe_get s (pos+12) = 'o' && String.unsafe_get s (pos+13) = 'm' && String.unsafe_get s (pos+14) = '_' && String.unsafe_get s (pos+15) = 'c' && String.unsafe_get s (pos+16) = 'l' && String.unsafe_get s (pos+17) = 'o' && String.unsafe_get s (pos+18) = 'u' && String.unsafe_get s (pos+19) = 'd' then ( + 4 + ) + else ( + -1 + ) + ) + | 'p' -> ( + if String.unsafe_get s (pos+1) = 'a' && String.unsafe_get s (pos+2) = 't' && String.unsafe_get s (pos+3) = 'h' && String.unsafe_get s (pos+4) = '_' && String.unsafe_get s (pos+5) = 't' && String.unsafe_get s (pos+6) = 'o' && String.unsafe_get s (pos+7) = '_' && String.unsafe_get s (pos+8) = 't' && String.unsafe_get s (pos+9) = 'r' && String.unsafe_get s (pos+10) = 'a' && String.unsafe_get s (pos+11) = 'n' && String.unsafe_get s (pos+12) = 's' && String.unsafe_get s (pos+13) = 'i' && String.unsafe_get s (pos+14) = 't' && String.unsafe_get s (pos+15) = 'i' && String.unsafe_get s (pos+16) = 'v' && String.unsafe_get s (pos+17) = 'i' && String.unsafe_get s (pos+18) = 't' && String.unsafe_get s (pos+19) = 'y' then ( + 8 + ) + else ( + -1 + ) + ) + | _ -> ( + -1 + ) ) | 28 -> ( if String.unsafe_get s pos = 't' && String.unsafe_get s (pos+1) = 'r' && String.unsafe_get s (pos+2) = 'i' && String.unsafe_get s (pos+3) = 'a' && String.unsafe_get s (pos+4) = 'g' && String.unsafe_get s (pos+5) = 'e' && String.unsafe_get s (pos+6) = '_' && String.unsafe_get s (pos+7) = 'i' && String.unsafe_get s (pos+8) = 'g' && String.unsafe_get s (pos+9) = 'n' && String.unsafe_get s (pos+10) = 'o' && String.unsafe_get s (pos+11) = 'r' && String.unsafe_get s (pos+12) = 'e' && String.unsafe_get s (pos+13) = 'd' && String.unsafe_get s (pos+14) = '_' && String.unsafe_get s (pos+15) = 's' && String.unsafe_get s (pos+16) = 'y' && String.unsafe_get s (pos+17) = 'n' && String.unsafe_get s (pos+18) = 't' && String.unsafe_get s (pos+19) = 'a' && String.unsafe_get s (pos+20) = 'c' && String.unsafe_get s (pos+21) = 't' && String.unsafe_get s (pos+22) = 'i' && String.unsafe_get s (pos+23) = 'c' && String.unsafe_get s (pos+24) = '_' && String.unsafe_get s (pos+25) = 'i' && String.unsafe_get s (pos+26) = 'd' && String.unsafe_get s (pos+27) = 's' then ( - 8 + 9 ) else ( -1 @@ -14777,7 +14903,7 @@ let read_scan_config = ( ) | 30 -> ( if String.unsafe_get s pos = 't' && String.unsafe_get s (pos+1) = 'r' && String.unsafe_get s (pos+2) = 'i' && String.unsafe_get s (pos+3) = 'a' && String.unsafe_get s (pos+4) = 'g' && String.unsafe_get s (pos+5) = 'e' && String.unsafe_get s (pos+6) = '_' && String.unsafe_get s (pos+7) = 'i' && String.unsafe_get s (pos+8) = 'g' && String.unsafe_get s (pos+9) = 'n' && String.unsafe_get s (pos+10) = 'o' && String.unsafe_get s (pos+11) = 'r' && String.unsafe_get s (pos+12) = 'e' && String.unsafe_get s (pos+13) = 'd' && String.unsafe_get s (pos+14) = '_' && String.unsafe_get s (pos+15) = 'm' && String.unsafe_get s (pos+16) = 'a' && String.unsafe_get s (pos+17) = 't' && String.unsafe_get s (pos+18) = 'c' && String.unsafe_get s (pos+19) = 'h' && String.unsafe_get s (pos+20) = '_' && String.unsafe_get s (pos+21) = 'b' && String.unsafe_get s (pos+22) = 'a' && String.unsafe_get s (pos+23) = 's' && String.unsafe_get s (pos+24) = 'e' && String.unsafe_get s (pos+25) = 'd' && String.unsafe_get s (pos+26) = '_' && String.unsafe_get s (pos+27) = 'i' && String.unsafe_get s (pos+28) = 'd' && String.unsafe_get s (pos+29) = 's' then ( - 9 + 10 ) else ( -1 @@ -14858,6 +14984,14 @@ let read_scan_config = ( ); ) | 8 -> + if not (Yojson.Safe.read_null_if_possible p lb) then ( + field_path_to_transitivity := ( + ( + Atdgen_runtime.Oj_run.read_bool + ) p lb + ); + ) + | 9 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_triage_ignored_syntactic_ids := ( ( @@ -14865,7 +14999,7 @@ let read_scan_config = ( ) p lb ); ) - | 9 -> + | 10 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_triage_ignored_match_based_ids := ( ( @@ -14873,7 +15007,7 @@ let read_scan_config = ( ) p lb ); ) - | 10 -> + | 11 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_ignored_files := ( ( @@ -14881,7 +15015,7 @@ let read_scan_config = ( ) p lb ); ) - | 11 -> + | 12 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_enabled_products := ( Some ( @@ -14891,7 +15025,7 @@ let read_scan_config = ( ) ); ) - | 12 -> + | 13 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_actions := ( ( @@ -14917,7 +15051,7 @@ let read_scan_config = ( match String.unsafe_get s (pos+1) with | 'c' -> ( if String.unsafe_get s (pos+2) = 't' && String.unsafe_get s (pos+3) = 'i' && String.unsafe_get s (pos+4) = 'o' && String.unsafe_get s (pos+5) = 'n' && String.unsafe_get s (pos+6) = 's' then ( - 12 + 13 ) else ( -1 @@ -14981,7 +15115,7 @@ let read_scan_config = ( ) | 'i' -> ( if String.unsafe_get s (pos+1) = 'g' && String.unsafe_get s (pos+2) = 'n' && String.unsafe_get s (pos+3) = 'o' && String.unsafe_get s (pos+4) = 'r' && String.unsafe_get s (pos+5) = 'e' && String.unsafe_get s (pos+6) = 'd' && String.unsafe_get s (pos+7) = '_' && String.unsafe_get s (pos+8) = 'f' && String.unsafe_get s (pos+9) = 'i' && String.unsafe_get s (pos+10) = 'l' && String.unsafe_get s (pos+11) = 'e' && String.unsafe_get s (pos+12) = 's' then ( - 10 + 11 ) else ( -1 @@ -15011,7 +15145,7 @@ let read_scan_config = ( ) | 'e' -> ( if String.unsafe_get s (pos+1) = 'n' && String.unsafe_get s (pos+2) = 'a' && String.unsafe_get s (pos+3) = 'b' && String.unsafe_get s (pos+4) = 'l' && String.unsafe_get s (pos+5) = 'e' && String.unsafe_get s (pos+6) = 'd' && String.unsafe_get s (pos+7) = '_' && String.unsafe_get s (pos+8) = 'p' && String.unsafe_get s (pos+9) = 'r' && String.unsafe_get s (pos+10) = 'o' && String.unsafe_get s (pos+11) = 'd' && String.unsafe_get s (pos+12) = 'u' && String.unsafe_get s (pos+13) = 'c' && String.unsafe_get s (pos+14) = 't' && String.unsafe_get s (pos+15) = 's' then ( - 11 + 12 ) else ( -1 @@ -15022,16 +15156,30 @@ let read_scan_config = ( ) ) | 20 -> ( - if String.unsafe_get s pos = 'c' && String.unsafe_get s (pos+1) = 'i' && String.unsafe_get s (pos+2) = '_' && String.unsafe_get s (pos+3) = 'c' && String.unsafe_get s (pos+4) = 'o' && String.unsafe_get s (pos+5) = 'n' && String.unsafe_get s (pos+6) = 'f' && String.unsafe_get s (pos+7) = 'i' && String.unsafe_get s (pos+8) = 'g' && String.unsafe_get s (pos+9) = '_' && String.unsafe_get s (pos+10) = 'f' && String.unsafe_get s (pos+11) = 'r' && String.unsafe_get s (pos+12) = 'o' && String.unsafe_get s (pos+13) = 'm' && String.unsafe_get s (pos+14) = '_' && String.unsafe_get s (pos+15) = 'c' && String.unsafe_get s (pos+16) = 'l' && String.unsafe_get s (pos+17) = 'o' && String.unsafe_get s (pos+18) = 'u' && String.unsafe_get s (pos+19) = 'd' then ( - 4 - ) - else ( - -1 - ) + match String.unsafe_get s pos with + | 'c' -> ( + if String.unsafe_get s (pos+1) = 'i' && String.unsafe_get s (pos+2) = '_' && String.unsafe_get s (pos+3) = 'c' && String.unsafe_get s (pos+4) = 'o' && String.unsafe_get s (pos+5) = 'n' && String.unsafe_get s (pos+6) = 'f' && String.unsafe_get s (pos+7) = 'i' && String.unsafe_get s (pos+8) = 'g' && String.unsafe_get s (pos+9) = '_' && String.unsafe_get s (pos+10) = 'f' && String.unsafe_get s (pos+11) = 'r' && String.unsafe_get s (pos+12) = 'o' && String.unsafe_get s (pos+13) = 'm' && String.unsafe_get s (pos+14) = '_' && String.unsafe_get s (pos+15) = 'c' && String.unsafe_get s (pos+16) = 'l' && String.unsafe_get s (pos+17) = 'o' && String.unsafe_get s (pos+18) = 'u' && String.unsafe_get s (pos+19) = 'd' then ( + 4 + ) + else ( + -1 + ) + ) + | 'p' -> ( + if String.unsafe_get s (pos+1) = 'a' && String.unsafe_get s (pos+2) = 't' && String.unsafe_get s (pos+3) = 'h' && String.unsafe_get s (pos+4) = '_' && String.unsafe_get s (pos+5) = 't' && String.unsafe_get s (pos+6) = 'o' && String.unsafe_get s (pos+7) = '_' && String.unsafe_get s (pos+8) = 't' && String.unsafe_get s (pos+9) = 'r' && String.unsafe_get s (pos+10) = 'a' && String.unsafe_get s (pos+11) = 'n' && String.unsafe_get s (pos+12) = 's' && String.unsafe_get s (pos+13) = 'i' && String.unsafe_get s (pos+14) = 't' && String.unsafe_get s (pos+15) = 'i' && String.unsafe_get s (pos+16) = 'v' && String.unsafe_get s (pos+17) = 'i' && String.unsafe_get s (pos+18) = 't' && String.unsafe_get s (pos+19) = 'y' then ( + 8 + ) + else ( + -1 + ) + ) + | _ -> ( + -1 + ) ) | 28 -> ( if String.unsafe_get s pos = 't' && String.unsafe_get s (pos+1) = 'r' && String.unsafe_get s (pos+2) = 'i' && String.unsafe_get s (pos+3) = 'a' && String.unsafe_get s (pos+4) = 'g' && String.unsafe_get s (pos+5) = 'e' && String.unsafe_get s (pos+6) = '_' && String.unsafe_get s (pos+7) = 'i' && String.unsafe_get s (pos+8) = 'g' && String.unsafe_get s (pos+9) = 'n' && String.unsafe_get s (pos+10) = 'o' && String.unsafe_get s (pos+11) = 'r' && String.unsafe_get s (pos+12) = 'e' && String.unsafe_get s (pos+13) = 'd' && String.unsafe_get s (pos+14) = '_' && String.unsafe_get s (pos+15) = 's' && String.unsafe_get s (pos+16) = 'y' && String.unsafe_get s (pos+17) = 'n' && String.unsafe_get s (pos+18) = 't' && String.unsafe_get s (pos+19) = 'a' && String.unsafe_get s (pos+20) = 'c' && String.unsafe_get s (pos+21) = 't' && String.unsafe_get s (pos+22) = 'i' && String.unsafe_get s (pos+23) = 'c' && String.unsafe_get s (pos+24) = '_' && String.unsafe_get s (pos+25) = 'i' && String.unsafe_get s (pos+26) = 'd' && String.unsafe_get s (pos+27) = 's' then ( - 8 + 9 ) else ( -1 @@ -15039,7 +15187,7 @@ let read_scan_config = ( ) | 30 -> ( if String.unsafe_get s pos = 't' && String.unsafe_get s (pos+1) = 'r' && String.unsafe_get s (pos+2) = 'i' && String.unsafe_get s (pos+3) = 'a' && String.unsafe_get s (pos+4) = 'g' && String.unsafe_get s (pos+5) = 'e' && String.unsafe_get s (pos+6) = '_' && String.unsafe_get s (pos+7) = 'i' && String.unsafe_get s (pos+8) = 'g' && String.unsafe_get s (pos+9) = 'n' && String.unsafe_get s (pos+10) = 'o' && String.unsafe_get s (pos+11) = 'r' && String.unsafe_get s (pos+12) = 'e' && String.unsafe_get s (pos+13) = 'd' && String.unsafe_get s (pos+14) = '_' && String.unsafe_get s (pos+15) = 'm' && String.unsafe_get s (pos+16) = 'a' && String.unsafe_get s (pos+17) = 't' && String.unsafe_get s (pos+18) = 'c' && String.unsafe_get s (pos+19) = 'h' && String.unsafe_get s (pos+20) = '_' && String.unsafe_get s (pos+21) = 'b' && String.unsafe_get s (pos+22) = 'a' && String.unsafe_get s (pos+23) = 's' && String.unsafe_get s (pos+24) = 'e' && String.unsafe_get s (pos+25) = 'd' && String.unsafe_get s (pos+26) = '_' && String.unsafe_get s (pos+27) = 'i' && String.unsafe_get s (pos+28) = 'd' && String.unsafe_get s (pos+29) = 's' then ( - 9 + 10 ) else ( -1 @@ -15120,6 +15268,14 @@ let read_scan_config = ( ); ) | 8 -> + if not (Yojson.Safe.read_null_if_possible p lb) then ( + field_path_to_transitivity := ( + ( + Atdgen_runtime.Oj_run.read_bool + ) p lb + ); + ) + | 9 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_triage_ignored_syntactic_ids := ( ( @@ -15127,7 +15283,7 @@ let read_scan_config = ( ) p lb ); ) - | 9 -> + | 10 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_triage_ignored_match_based_ids := ( ( @@ -15135,7 +15291,7 @@ let read_scan_config = ( ) p lb ); ) - | 10 -> + | 11 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_ignored_files := ( ( @@ -15143,7 +15299,7 @@ let read_scan_config = ( ) p lb ); ) - | 11 -> + | 12 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_enabled_products := ( Some ( @@ -15153,7 +15309,7 @@ let read_scan_config = ( ) ); ) - | 12 -> + | 13 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_actions := ( ( @@ -15178,6 +15334,7 @@ let read_scan_config = ( autofix = !field_autofix; deepsemgrep = !field_deepsemgrep; dependency_query = !field_dependency_query; + path_to_transitivity = !field_path_to_transitivity; triage_ignored_syntactic_ids = !field_triage_ignored_syntactic_ids; triage_ignored_match_based_ids = !field_triage_ignored_match_based_ids; ignored_files = !field_ignored_files; @@ -28807,6 +28964,15 @@ let write_features : _ -> features -> _ = ( Yojson.Safe.write_bool ) ob x.dependency_query; + if !is_first then + is_first := false + else + Buffer.add_char ob ','; + Buffer.add_string ob "\"path_to_transitivity\":"; + ( + Yojson.Safe.write_bool + ) + ob x.path_to_transitivity; Buffer.add_char ob '}'; ) let string_of_features ?(len = 1024) x = @@ -28820,6 +28986,7 @@ let read_features = ( let field_autofix = ref (false) in let field_deepsemgrep = ref (false) in let field_dependency_query = ref (false) in + let field_path_to_transitivity = ref (false) in try Yojson.Safe.read_space p lb; Yojson.Safe.read_object_end lb; @@ -28853,6 +29020,14 @@ let read_features = ( -1 ) ) + | 20 -> ( + if String.unsafe_get s pos = 'p' && String.unsafe_get s (pos+1) = 'a' && String.unsafe_get s (pos+2) = 't' && String.unsafe_get s (pos+3) = 'h' && String.unsafe_get s (pos+4) = '_' && String.unsafe_get s (pos+5) = 't' && String.unsafe_get s (pos+6) = 'o' && String.unsafe_get s (pos+7) = '_' && String.unsafe_get s (pos+8) = 't' && String.unsafe_get s (pos+9) = 'r' && String.unsafe_get s (pos+10) = 'a' && String.unsafe_get s (pos+11) = 'n' && String.unsafe_get s (pos+12) = 's' && String.unsafe_get s (pos+13) = 'i' && String.unsafe_get s (pos+14) = 't' && String.unsafe_get s (pos+15) = 'i' && String.unsafe_get s (pos+16) = 'v' && String.unsafe_get s (pos+17) = 'i' && String.unsafe_get s (pos+18) = 't' && String.unsafe_get s (pos+19) = 'y' then ( + 3 + ) + else ( + -1 + ) + ) | _ -> ( -1 ) @@ -28885,6 +29060,14 @@ let read_features = ( ) p lb ); ) + | 3 -> + if not (Yojson.Safe.read_null_if_possible p lb) then ( + field_path_to_transitivity := ( + ( + Atdgen_runtime.Oj_run.read_bool + ) p lb + ); + ) | _ -> ( Yojson.Safe.skip_json p lb ) @@ -28922,6 +29105,14 @@ let read_features = ( -1 ) ) + | 20 -> ( + if String.unsafe_get s pos = 'p' && String.unsafe_get s (pos+1) = 'a' && String.unsafe_get s (pos+2) = 't' && String.unsafe_get s (pos+3) = 'h' && String.unsafe_get s (pos+4) = '_' && String.unsafe_get s (pos+5) = 't' && String.unsafe_get s (pos+6) = 'o' && String.unsafe_get s (pos+7) = '_' && String.unsafe_get s (pos+8) = 't' && String.unsafe_get s (pos+9) = 'r' && String.unsafe_get s (pos+10) = 'a' && String.unsafe_get s (pos+11) = 'n' && String.unsafe_get s (pos+12) = 's' && String.unsafe_get s (pos+13) = 'i' && String.unsafe_get s (pos+14) = 't' && String.unsafe_get s (pos+15) = 'i' && String.unsafe_get s (pos+16) = 'v' && String.unsafe_get s (pos+17) = 'i' && String.unsafe_get s (pos+18) = 't' && String.unsafe_get s (pos+19) = 'y' then ( + 3 + ) + else ( + -1 + ) + ) | _ -> ( -1 ) @@ -28954,6 +29145,14 @@ let read_features = ( ) p lb ); ) + | 3 -> + if not (Yojson.Safe.read_null_if_possible p lb) then ( + field_path_to_transitivity := ( + ( + Atdgen_runtime.Oj_run.read_bool + ) p lb + ); + ) | _ -> ( Yojson.Safe.skip_json p lb ) @@ -28966,6 +29165,7 @@ let read_features = ( autofix = !field_autofix; deepsemgrep = !field_deepsemgrep; dependency_query = !field_dependency_query; + path_to_transitivity = !field_path_to_transitivity; } : features) ) diff --git a/semgrep_output_v1_j.mli b/semgrep_output_v1_j.mli index 1bf81594..6f8833e8 100644 --- a/semgrep_output_v1_j.mli +++ b/semgrep_output_v1_j.mli @@ -284,6 +284,7 @@ type engine_configuration = Semgrep_output_v1_t.engine_configuration = { autofix: bool; deepsemgrep: bool; dependency_query: bool; + path_to_transitivity: bool; ignored_files: string list; product_ignored_files: product_ignored_files option; generic_slow_rollout: bool; @@ -354,7 +355,8 @@ type ci_config = Semgrep_output_v1_t.ci_config = { ignored_files: string list; autofix: bool; deepsemgrep: bool; - dependency_query: bool + dependency_query: bool; + path_to_transitivity: bool } type action = Semgrep_output_v1_t.action @@ -375,6 +377,7 @@ type scan_config = Semgrep_output_v1_t.scan_config = { autofix: bool; deepsemgrep: bool; dependency_query: bool; + path_to_transitivity: bool; triage_ignored_syntactic_ids: string list; triage_ignored_match_based_ids: string list; ignored_files: string list; @@ -710,7 +713,8 @@ type function_call = Semgrep_output_v1_t.function_call type features = Semgrep_output_v1_t.features = { autofix: bool; deepsemgrep: bool; - dependency_query: bool + dependency_query: bool; + path_to_transitivity: bool } type deployment_config = Semgrep_output_v1_t.deployment_config = {