diff --git a/semgrep_output_v1.atd b/semgrep_output_v1.atd index f28babb..50b73f9 100644 --- a/semgrep_output_v1.atd +++ b/semgrep_output_v1.atd @@ -592,7 +592,7 @@ type sca_match_kind = [ * 1st-party code (e.g., via callgraph analysis) *) | TransitiveUnreachable of transitive_unreachable - (* could not decide because of the engine limitations (e.g., + (* could not decide because of the engine limitations (e.g., * found the use of a vulnerable library in the lockfile but * could not find the pattern in first party code and could not * access third-party code for further investigation @@ -1226,6 +1226,10 @@ type features = { (* normally we resolve dependencies for changed subprojects only in diff scans. This flag * causes all subprojects to be resolved in diff scans *) ~scan_all_deps_in_diff_scan: bool; + (* Whether to collect "symbol analysis" information from the repo being scanned + See https://www.notion.so/semgrep/Semgrep-Code-Reconnaissance-Toolbox-18a3009241a880f2a439eed6b2cffe66?pvs=4 + *) + ~symbol_analysis: bool; } type triage_ignored = { diff --git a/semgrep_output_v1.jsonschema b/semgrep_output_v1.jsonschema index d59966f..f705a66 100644 --- a/semgrep_output_v1.jsonschema +++ b/semgrep_output_v1.jsonschema @@ -924,7 +924,8 @@ "deepsemgrep": { "type": "boolean" }, "dependency_query": { "type": "boolean" }, "path_to_transitivity": { "type": "boolean" }, - "scan_all_deps_in_diff_scan": { "type": "boolean" } + "scan_all_deps_in_diff_scan": { "type": "boolean" }, + "symbol_analysis": { "type": "boolean" } } }, "triage_ignored": { @@ -1009,6 +1010,7 @@ "dependency_query": { "type": "boolean" }, "path_to_transitivity": { "type": "boolean" }, "scan_all_deps_in_diff_scan": { "type": "boolean" }, + "symbol_analysis": { "type": "boolean" }, "ignored_files": { "type": "array", "items": { "type": "string" } }, "product_ignored_files": { "$ref": "#/definitions/product_ignored_files" @@ -1467,6 +1469,7 @@ "dependency_query": { "type": "boolean" }, "path_to_transitivity": { "type": "boolean" }, "scan_all_deps_in_diff_scan": { "type": "boolean" }, + "symbol_analysis": { "type": "boolean" }, "triage_ignored_syntactic_ids": { "type": "array", "items": { "type": "string" } @@ -1527,7 +1530,8 @@ "deepsemgrep": { "type": "boolean" }, "dependency_query": { "type": "boolean" }, "path_to_transitivity": { "type": "boolean" }, - "scan_all_deps_in_diff_scan": { "type": "boolean" } + "scan_all_deps_in_diff_scan": { "type": "boolean" }, + "symbol_analysis": { "type": "boolean" } } }, "ci_env": { diff --git a/semgrep_output_v1.proto b/semgrep_output_v1.proto index 8c213dc..8ec5b23 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: 8a8357f70e3aa037b323be3262cad9cb30b88627b951c14f18c36f1322ebfa1d +// Source file sha256 digest: 818d55572ef61c68d78315ee786f30fe3f81893fdc78747ddddb400c6a86cee9 syntax = "proto3"; @@ -300,6 +300,7 @@ message Features { bool dependency_query = 471197362; bool path_to_transitivity = 52910370; bool scan_all_deps_in_diff_scan = 261708029; + bool symbol_analysis = 299212646; } message TriageIgnored { @@ -332,6 +333,7 @@ message EngineConfiguration { bool dependency_query = 471197362; bool path_to_transitivity = 52910370; bool scan_all_deps_in_diff_scan = 261708029; + bool symbol_analysis = 299212646; repeated string ignored_files = 482076310; repeated google.protobuf.Any product_ignored_files = 298217262; bool generic_slow_rollout = 78139686; @@ -561,6 +563,7 @@ message ScanConfig { bool dependency_query = 471197362; bool path_to_transitivity = 52910370; bool scan_all_deps_in_diff_scan = 261708029; + bool symbol_analysis = 299212646; repeated string triage_ignored_syntactic_ids = 211590151; repeated string triage_ignored_match_based_ids = 327942260; repeated string ignored_files = 482076310; @@ -585,6 +588,7 @@ message CiConfig { bool dependency_query = 471197362; bool path_to_transitivity = 52910370; bool scan_all_deps_in_diff_scan = 261708029; + bool symbol_analysis = 299212646; } message CoreOutput { diff --git a/semgrep_output_v1.py b/semgrep_output_v1.py index bedc3c1..d784e3b 100644 --- a/semgrep_output_v1.py +++ b/semgrep_output_v1.py @@ -5444,6 +5444,7 @@ class EngineConfiguration: dependency_query: bool = field(default_factory=lambda: False) path_to_transitivity: bool = field(default_factory=lambda: False) scan_all_deps_in_diff_scan: bool = field(default_factory=lambda: False) + symbol_analysis: 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) @@ -5459,6 +5460,7 @@ def from_json(cls, x: Any) -> 'EngineConfiguration': 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, scan_all_deps_in_diff_scan=_atd_read_bool(x['scan_all_deps_in_diff_scan']) if 'scan_all_deps_in_diff_scan' in x else False, + symbol_analysis=_atd_read_bool(x['symbol_analysis']) if 'symbol_analysis' 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, @@ -5475,6 +5477,7 @@ def to_json(self) -> Any: res['dependency_query'] = _atd_write_bool(self.dependency_query) res['path_to_transitivity'] = _atd_write_bool(self.path_to_transitivity) res['scan_all_deps_in_diff_scan'] = _atd_write_bool(self.scan_all_deps_in_diff_scan) + res['symbol_analysis'] = _atd_write_bool(self.symbol_analysis) 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) @@ -5779,6 +5782,7 @@ class CiConfig: dependency_query: bool = field(default_factory=lambda: False) path_to_transitivity: bool = field(default_factory=lambda: False) scan_all_deps_in_diff_scan: bool = field(default_factory=lambda: False) + symbol_analysis: bool = field(default_factory=lambda: False) @classmethod def from_json(cls, x: Any) -> 'CiConfig': @@ -5792,6 +5796,7 @@ def from_json(cls, x: Any) -> 'CiConfig': 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, scan_all_deps_in_diff_scan=_atd_read_bool(x['scan_all_deps_in_diff_scan']) if 'scan_all_deps_in_diff_scan' in x else False, + symbol_analysis=_atd_read_bool(x['symbol_analysis']) if 'symbol_analysis' in x else False, ) else: _atd_bad_json('CiConfig', x) @@ -5806,6 +5811,7 @@ def to_json(self) -> Any: res['dependency_query'] = _atd_write_bool(self.dependency_query) res['path_to_transitivity'] = _atd_write_bool(self.path_to_transitivity) res['scan_all_deps_in_diff_scan'] = _atd_write_bool(self.scan_all_deps_in_diff_scan) + res['symbol_analysis'] = _atd_write_bool(self.symbol_analysis) return res @classmethod @@ -5957,6 +5963,7 @@ class ScanConfig: dependency_query: bool = field(default_factory=lambda: False) path_to_transitivity: bool = field(default_factory=lambda: False) scan_all_deps_in_diff_scan: bool = field(default_factory=lambda: False) + symbol_analysis: 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: []) @@ -5977,6 +5984,7 @@ def from_json(cls, x: Any) -> 'ScanConfig': 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, scan_all_deps_in_diff_scan=_atd_read_bool(x['scan_all_deps_in_diff_scan']) if 'scan_all_deps_in_diff_scan' in x else False, + symbol_analysis=_atd_read_bool(x['symbol_analysis']) if 'symbol_analysis' 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 [], @@ -5998,6 +6006,7 @@ def to_json(self) -> Any: res['dependency_query'] = _atd_write_bool(self.dependency_query) res['path_to_transitivity'] = _atd_write_bool(self.path_to_transitivity) res['scan_all_deps_in_diff_scan'] = _atd_write_bool(self.scan_all_deps_in_diff_scan) + res['symbol_analysis'] = _atd_write_bool(self.symbol_analysis) 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) @@ -9323,6 +9332,7 @@ class Features: dependency_query: bool = field(default_factory=lambda: False) path_to_transitivity: bool = field(default_factory=lambda: False) scan_all_deps_in_diff_scan: bool = field(default_factory=lambda: False) + symbol_analysis: bool = field(default_factory=lambda: False) @classmethod def from_json(cls, x: Any) -> 'Features': @@ -9333,6 +9343,7 @@ def from_json(cls, x: Any) -> 'Features': 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, scan_all_deps_in_diff_scan=_atd_read_bool(x['scan_all_deps_in_diff_scan']) if 'scan_all_deps_in_diff_scan' in x else False, + symbol_analysis=_atd_read_bool(x['symbol_analysis']) if 'symbol_analysis' in x else False, ) else: _atd_bad_json('Features', x) @@ -9344,6 +9355,7 @@ def to_json(self) -> Any: res['dependency_query'] = _atd_write_bool(self.dependency_query) res['path_to_transitivity'] = _atd_write_bool(self.path_to_transitivity) res['scan_all_deps_in_diff_scan'] = _atd_write_bool(self.scan_all_deps_in_diff_scan) + res['symbol_analysis'] = _atd_write_bool(self.symbol_analysis) return res @classmethod diff --git a/semgrep_output_v1.ts b/semgrep_output_v1.ts index db7647f..113c4d4 100644 --- a/semgrep_output_v1.ts +++ b/semgrep_output_v1.ts @@ -481,6 +481,7 @@ export type Features = { dependency_query: boolean; path_to_transitivity: boolean; scan_all_deps_in_diff_scan: boolean; + symbol_analysis: boolean; } export type TriageIgnored = { @@ -518,6 +519,7 @@ export type EngineConfiguration = { dependency_query: boolean; path_to_transitivity: boolean; scan_all_deps_in_diff_scan: boolean; + symbol_analysis: boolean; ignored_files: string[]; product_ignored_files?: ProductIgnoredFiles; generic_slow_rollout: boolean; @@ -786,6 +788,7 @@ export type ScanConfig = { dependency_query: boolean; path_to_transitivity: boolean; scan_all_deps_in_diff_scan: boolean; + symbol_analysis: boolean; triage_ignored_syntactic_ids: string[]; triage_ignored_match_based_ids: string[]; ignored_files: string[]; @@ -810,6 +813,7 @@ export type CiConfig = { dependency_query: boolean; path_to_transitivity: boolean; scan_all_deps_in_diff_scan: boolean; + symbol_analysis: boolean; } export type CiEnv = Map @@ -2654,6 +2658,7 @@ export function writeFeatures(x: Features, context: any = x): any { '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), 'scan_all_deps_in_diff_scan': _atd_write_field_with_default(_atd_write_bool, false, x.scan_all_deps_in_diff_scan, x), + 'symbol_analysis': _atd_write_field_with_default(_atd_write_bool, false, x.symbol_analysis, x), }; } @@ -2664,6 +2669,7 @@ export function readFeatures(x: any, context: any = x): Features { 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), scan_all_deps_in_diff_scan: _atd_read_field_with_default(_atd_read_bool, false, x['scan_all_deps_in_diff_scan'], x), + symbol_analysis: _atd_read_field_with_default(_atd_read_bool, false, x['symbol_analysis'], x), }; } @@ -2764,6 +2770,7 @@ export function writeEngineConfiguration(x: EngineConfiguration, context: any = '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), 'scan_all_deps_in_diff_scan': _atd_write_field_with_default(_atd_write_bool, false, x.scan_all_deps_in_diff_scan, x), + 'symbol_analysis': _atd_write_field_with_default(_atd_write_bool, false, x.symbol_analysis, 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), @@ -2779,6 +2786,7 @@ export function readEngineConfiguration(x: any, context: any = x): EngineConfigu 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), scan_all_deps_in_diff_scan: _atd_read_field_with_default(_atd_read_bool, false, x['scan_all_deps_in_diff_scan'], x), + symbol_analysis: _atd_read_field_with_default(_atd_read_bool, false, x['symbol_analysis'], 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), @@ -3494,6 +3502,7 @@ export function writeScanConfig(x: ScanConfig, context: any = x): any { '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), 'scan_all_deps_in_diff_scan': _atd_write_field_with_default(_atd_write_bool, false, x.scan_all_deps_in_diff_scan, x), + 'symbol_analysis': _atd_write_field_with_default(_atd_write_bool, false, x.symbol_analysis, 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), @@ -3514,6 +3523,7 @@ export function readScanConfig(x: any, context: any = x): ScanConfig { 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), scan_all_deps_in_diff_scan: _atd_read_field_with_default(_atd_read_bool, false, x['scan_all_deps_in_diff_scan'], x), + symbol_analysis: _atd_read_field_with_default(_atd_read_bool, false, x['symbol_analysis'], 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), @@ -3551,6 +3561,7 @@ export function writeCiConfig(x: CiConfig, context: any = x): any { '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), 'scan_all_deps_in_diff_scan': _atd_write_field_with_default(_atd_write_bool, false, x.scan_all_deps_in_diff_scan, x), + 'symbol_analysis': _atd_write_field_with_default(_atd_write_bool, false, x.symbol_analysis, x), }; } @@ -3564,6 +3575,7 @@ export function readCiConfig(x: any, context: any = x): CiConfig { 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), scan_all_deps_in_diff_scan: _atd_read_field_with_default(_atd_read_bool, false, x['scan_all_deps_in_diff_scan'], x), + symbol_analysis: _atd_read_field_with_default(_atd_read_bool, false, x['symbol_analysis'], x), }; } diff --git a/semgrep_output_v1_j.ml b/semgrep_output_v1_j.ml index a0396fb..7d2692a 100644 --- a/semgrep_output_v1_j.ml +++ b/semgrep_output_v1_j.ml @@ -445,6 +445,7 @@ type engine_configuration = Semgrep_output_v1_t.engine_configuration = { dependency_query: bool; path_to_transitivity: bool; scan_all_deps_in_diff_scan: bool; + symbol_analysis: bool; ignored_files: string list; product_ignored_files: product_ignored_files option; generic_slow_rollout: bool; @@ -516,7 +517,8 @@ type ci_config = Semgrep_output_v1_t.ci_config = { deepsemgrep: bool; dependency_query: bool; path_to_transitivity: bool; - scan_all_deps_in_diff_scan: bool + scan_all_deps_in_diff_scan: bool; + symbol_analysis: bool } type action = Semgrep_output_v1_t.action @@ -538,6 +540,7 @@ type scan_config = Semgrep_output_v1_t.scan_config = { dependency_query: bool; path_to_transitivity: bool; scan_all_deps_in_diff_scan: bool; + symbol_analysis: bool; triage_ignored_syntactic_ids: string list; triage_ignored_match_based_ids: string list; ignored_files: string list; @@ -854,7 +857,8 @@ type features = Semgrep_output_v1_t.features = { deepsemgrep: bool; dependency_query: bool; path_to_transitivity: bool; - scan_all_deps_in_diff_scan: bool + scan_all_deps_in_diff_scan: bool; + symbol_analysis: bool } type diff_file = Semgrep_output_v1_t.diff_file = { @@ -16146,6 +16150,15 @@ let write_engine_configuration : _ -> engine_configuration -> _ = ( ob x.scan_all_deps_in_diff_scan; if !is_first then is_first := false + else + Buffer.add_char ob ','; + Buffer.add_string ob "\"symbol_analysis\":"; + ( + Yojson.Safe.write_bool + ) + ob x.symbol_analysis; + if !is_first then + is_first := false else Buffer.add_char ob ','; Buffer.add_string ob "\"ignored_files\":"; @@ -16208,6 +16221,7 @@ let read_engine_configuration = ( let field_dependency_query = ref (false) in let field_path_to_transitivity = ref (false) in let field_scan_all_deps_in_diff_scan = ref (false) in + let field_symbol_analysis = 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 @@ -16240,6 +16254,14 @@ 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 ( + 6 + ) + else ( + -1 + ) + ) + | 15 -> ( + if String.unsafe_get s pos = 's' && String.unsafe_get s (pos+1) = 'y' && String.unsafe_get s (pos+2) = 'm' && String.unsafe_get s (pos+3) = 'b' && String.unsafe_get s (pos+4) = 'o' && String.unsafe_get s (pos+5) = 'l' && String.unsafe_get s (pos+6) = '_' && String.unsafe_get s (pos+7) = 'a' && String.unsafe_get s (pos+8) = 'n' && String.unsafe_get s (pos+9) = 'a' && String.unsafe_get s (pos+10) = 'l' && String.unsafe_get s (pos+11) = 'y' && String.unsafe_get s (pos+12) = 's' && String.unsafe_get s (pos+13) = 'i' && String.unsafe_get s (pos+14) = 's' then ( 5 ) else ( @@ -16256,7 +16278,7 @@ 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 ( - 8 + 9 ) else ( -1 @@ -16266,7 +16288,7 @@ let read_engine_configuration = ( 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 ( - 7 + 8 ) else ( -1 @@ -16286,7 +16308,7 @@ let read_engine_configuration = ( ) | 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 ( - 6 + 7 ) else ( -1 @@ -16294,7 +16316,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 ( - 9 + 10 ) else ( -1 @@ -16357,6 +16379,14 @@ let read_engine_configuration = ( ); ) | 5 -> + if not (Yojson.Safe.read_null_if_possible p lb) then ( + field_symbol_analysis := ( + ( + Atdgen_runtime.Oj_run.read_bool + ) p lb + ); + ) + | 6 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_ignored_files := ( ( @@ -16364,7 +16394,7 @@ let read_engine_configuration = ( ) p lb ); ) - | 6 -> + | 7 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_product_ignored_files := ( Some ( @@ -16374,7 +16404,7 @@ let read_engine_configuration = ( ) ); ) - | 7 -> + | 8 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_generic_slow_rollout := ( ( @@ -16382,7 +16412,7 @@ let read_engine_configuration = ( ) p lb ); ) - | 8 -> + | 9 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_historical_config := ( Some ( @@ -16392,7 +16422,7 @@ let read_engine_configuration = ( ) ); ) - | 9 -> + | 10 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_always_suppress_errors := ( ( @@ -16431,6 +16461,14 @@ 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 ( + 6 + ) + else ( + -1 + ) + ) + | 15 -> ( + if String.unsafe_get s pos = 's' && String.unsafe_get s (pos+1) = 'y' && String.unsafe_get s (pos+2) = 'm' && String.unsafe_get s (pos+3) = 'b' && String.unsafe_get s (pos+4) = 'o' && String.unsafe_get s (pos+5) = 'l' && String.unsafe_get s (pos+6) = '_' && String.unsafe_get s (pos+7) = 'a' && String.unsafe_get s (pos+8) = 'n' && String.unsafe_get s (pos+9) = 'a' && String.unsafe_get s (pos+10) = 'l' && String.unsafe_get s (pos+11) = 'y' && String.unsafe_get s (pos+12) = 's' && String.unsafe_get s (pos+13) = 'i' && String.unsafe_get s (pos+14) = 's' then ( 5 ) else ( @@ -16447,7 +16485,7 @@ 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 ( - 8 + 9 ) else ( -1 @@ -16457,7 +16495,7 @@ let read_engine_configuration = ( 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 ( - 7 + 8 ) else ( -1 @@ -16477,7 +16515,7 @@ let read_engine_configuration = ( ) | 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 ( - 6 + 7 ) else ( -1 @@ -16485,7 +16523,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 ( - 9 + 10 ) else ( -1 @@ -16548,6 +16586,14 @@ let read_engine_configuration = ( ); ) | 5 -> + if not (Yojson.Safe.read_null_if_possible p lb) then ( + field_symbol_analysis := ( + ( + Atdgen_runtime.Oj_run.read_bool + ) p lb + ); + ) + | 6 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_ignored_files := ( ( @@ -16555,7 +16601,7 @@ let read_engine_configuration = ( ) p lb ); ) - | 6 -> + | 7 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_product_ignored_files := ( Some ( @@ -16565,7 +16611,7 @@ let read_engine_configuration = ( ) ); ) - | 7 -> + | 8 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_generic_slow_rollout := ( ( @@ -16573,7 +16619,7 @@ let read_engine_configuration = ( ) p lb ); ) - | 8 -> + | 9 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_historical_config := ( Some ( @@ -16583,7 +16629,7 @@ let read_engine_configuration = ( ) ); ) - | 9 -> + | 10 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_always_suppress_errors := ( ( @@ -16605,6 +16651,7 @@ let read_engine_configuration = ( dependency_query = !field_dependency_query; path_to_transitivity = !field_path_to_transitivity; scan_all_deps_in_diff_scan = !field_scan_all_deps_in_diff_scan; + symbol_analysis = !field_symbol_analysis; ignored_files = !field_ignored_files; product_ignored_files = !field_product_ignored_files; generic_slow_rollout = !field_generic_slow_rollout; @@ -19170,6 +19217,15 @@ let write_ci_config : _ -> ci_config -> _ = ( Yojson.Safe.write_bool ) ob x.scan_all_deps_in_diff_scan; + if !is_first then + is_first := false + else + Buffer.add_char ob ','; + Buffer.add_string ob "\"symbol_analysis\":"; + ( + Yojson.Safe.write_bool + ) + ob x.symbol_analysis; Buffer.add_char ob '}'; ) let string_of_ci_config ?(len = 1024) x = @@ -19188,6 +19244,7 @@ let read_ci_config = ( let field_dependency_query = ref (false) in let field_path_to_transitivity = ref (false) in let field_scan_all_deps_in_diff_scan = ref (false) in + let field_symbol_analysis = ref (false) in try Yojson.Safe.read_space p lb; Yojson.Safe.read_object_end lb; @@ -19229,6 +19286,14 @@ let read_ci_config = ( -1 ) ) + | 15 -> ( + if String.unsafe_get s pos = 's' && String.unsafe_get s (pos+1) = 'y' && String.unsafe_get s (pos+2) = 'm' && String.unsafe_get s (pos+3) = 'b' && String.unsafe_get s (pos+4) = 'o' && String.unsafe_get s (pos+5) = 'l' && String.unsafe_get s (pos+6) = '_' && String.unsafe_get s (pos+7) = 'a' && String.unsafe_get s (pos+8) = 'n' && String.unsafe_get s (pos+9) = 'a' && String.unsafe_get s (pos+10) = 'l' && String.unsafe_get s (pos+11) = 'y' && String.unsafe_get s (pos+12) = 's' && String.unsafe_get s (pos+13) = 'i' && String.unsafe_get s (pos+14) = 's' then ( + 8 + ) + else ( + -1 + ) + ) | 16 -> ( match String.unsafe_get s pos with | 'd' -> ( @@ -19339,6 +19404,14 @@ let read_ci_config = ( ) p lb ); ) + | 8 -> + if not (Yojson.Safe.read_null_if_possible p lb) then ( + field_symbol_analysis := ( + ( + Atdgen_runtime.Oj_run.read_bool + ) p lb + ); + ) | _ -> ( Yojson.Safe.skip_json p lb ) @@ -19384,6 +19457,14 @@ let read_ci_config = ( -1 ) ) + | 15 -> ( + if String.unsafe_get s pos = 's' && String.unsafe_get s (pos+1) = 'y' && String.unsafe_get s (pos+2) = 'm' && String.unsafe_get s (pos+3) = 'b' && String.unsafe_get s (pos+4) = 'o' && String.unsafe_get s (pos+5) = 'l' && String.unsafe_get s (pos+6) = '_' && String.unsafe_get s (pos+7) = 'a' && String.unsafe_get s (pos+8) = 'n' && String.unsafe_get s (pos+9) = 'a' && String.unsafe_get s (pos+10) = 'l' && String.unsafe_get s (pos+11) = 'y' && String.unsafe_get s (pos+12) = 's' && String.unsafe_get s (pos+13) = 'i' && String.unsafe_get s (pos+14) = 's' then ( + 8 + ) + else ( + -1 + ) + ) | 16 -> ( match String.unsafe_get s pos with | 'd' -> ( @@ -19494,6 +19575,14 @@ let read_ci_config = ( ) p lb ); ) + | 8 -> + if not (Yojson.Safe.read_null_if_possible p lb) then ( + field_symbol_analysis := ( + ( + Atdgen_runtime.Oj_run.read_bool + ) p lb + ); + ) | _ -> ( Yojson.Safe.skip_json p lb ) @@ -19511,6 +19600,7 @@ let read_ci_config = ( dependency_query = !field_dependency_query; path_to_transitivity = !field_path_to_transitivity; scan_all_deps_in_diff_scan = !field_scan_all_deps_in_diff_scan; + symbol_analysis = !field_symbol_analysis; } : ci_config) ) @@ -20289,6 +20379,15 @@ let write_scan_config : _ -> scan_config -> _ = ( ob x.scan_all_deps_in_diff_scan; if !is_first then is_first := false + else + Buffer.add_char ob ','; + Buffer.add_string ob "\"symbol_analysis\":"; + ( + Yojson.Safe.write_bool + ) + ob x.symbol_analysis; + if !is_first then + is_first := false else Buffer.add_char ob ','; Buffer.add_string ob "\"triage_ignored_syntactic_ids\":"; @@ -20364,6 +20463,7 @@ let read_scan_config = ( let field_dependency_query = ref (false) in let field_path_to_transitivity = ref (false) in let field_scan_all_deps_in_diff_scan = ref (false) in + let field_symbol_analysis = 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 @@ -20384,7 +20484,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 ( - 13 + 14 ) else ( -1 @@ -20448,7 +20548,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 ( - 11 + 12 ) else ( -1 @@ -20459,12 +20559,26 @@ let read_scan_config = ( ) ) | 15 -> ( - if String.unsafe_get s pos = 'd' && String.unsafe_get s (pos+1) = 'e' && String.unsafe_get s (pos+2) = 'p' && String.unsafe_get s (pos+3) = 'l' && String.unsafe_get s (pos+4) = 'o' && String.unsafe_get s (pos+5) = 'y' && String.unsafe_get s (pos+6) = 'm' && String.unsafe_get s (pos+7) = 'e' && String.unsafe_get s (pos+8) = 'n' && String.unsafe_get s (pos+9) = 't' && String.unsafe_get s (pos+10) = '_' && String.unsafe_get s (pos+11) = 'n' && String.unsafe_get s (pos+12) = 'a' && String.unsafe_get s (pos+13) = 'm' && String.unsafe_get s (pos+14) = 'e' then ( - 1 - ) - else ( - -1 - ) + match String.unsafe_get s pos with + | 'd' -> ( + if String.unsafe_get s (pos+1) = 'e' && String.unsafe_get s (pos+2) = 'p' && String.unsafe_get s (pos+3) = 'l' && String.unsafe_get s (pos+4) = 'o' && String.unsafe_get s (pos+5) = 'y' && String.unsafe_get s (pos+6) = 'm' && String.unsafe_get s (pos+7) = 'e' && String.unsafe_get s (pos+8) = 'n' && String.unsafe_get s (pos+9) = 't' && String.unsafe_get s (pos+10) = '_' && String.unsafe_get s (pos+11) = 'n' && String.unsafe_get s (pos+12) = 'a' && String.unsafe_get s (pos+13) = 'm' && String.unsafe_get s (pos+14) = 'e' then ( + 1 + ) + else ( + -1 + ) + ) + | 's' -> ( + if String.unsafe_get s (pos+1) = 'y' && String.unsafe_get s (pos+2) = 'm' && String.unsafe_get s (pos+3) = 'b' && String.unsafe_get s (pos+4) = 'o' && String.unsafe_get s (pos+5) = 'l' && String.unsafe_get s (pos+6) = '_' && String.unsafe_get s (pos+7) = 'a' && String.unsafe_get s (pos+8) = 'n' && String.unsafe_get s (pos+9) = 'a' && String.unsafe_get s (pos+10) = 'l' && String.unsafe_get s (pos+11) = 'y' && String.unsafe_get s (pos+12) = 's' && String.unsafe_get s (pos+13) = 'i' && String.unsafe_get s (pos+14) = 's' then ( + 9 + ) + else ( + -1 + ) + ) + | _ -> ( + -1 + ) ) | 16 -> ( match String.unsafe_get s pos with @@ -20478,7 +20592,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 ( - 12 + 13 ) else ( -1 @@ -20492,7 +20606,7 @@ let read_scan_config = ( 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 ( - 14 + 15 ) else ( -1 @@ -20520,7 +20634,7 @@ let read_scan_config = ( ) | 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 ( - 9 + 10 ) else ( -1 @@ -20528,7 +20642,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 ( - 10 + 11 ) else ( -1 @@ -20615,6 +20729,14 @@ let read_scan_config = ( ); ) | 9 -> + if not (Yojson.Safe.read_null_if_possible p lb) then ( + field_symbol_analysis := ( + ( + Atdgen_runtime.Oj_run.read_bool + ) p lb + ); + ) + | 10 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_triage_ignored_syntactic_ids := ( ( @@ -20622,7 +20744,7 @@ let read_scan_config = ( ) p lb ); ) - | 10 -> + | 11 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_triage_ignored_match_based_ids := ( ( @@ -20630,7 +20752,7 @@ let read_scan_config = ( ) p lb ); ) - | 11 -> + | 12 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_ignored_files := ( ( @@ -20638,7 +20760,7 @@ let read_scan_config = ( ) p lb ); ) - | 12 -> + | 13 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_enabled_products := ( Some ( @@ -20648,7 +20770,7 @@ let read_scan_config = ( ) ); ) - | 13 -> + | 14 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_actions := ( ( @@ -20656,7 +20778,7 @@ let read_scan_config = ( ) p lb ); ) - | 14 -> + | 15 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_ci_config_from_cloud := ( Some ( @@ -20684,7 +20806,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 ( - 13 + 14 ) else ( -1 @@ -20748,7 +20870,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 ( - 11 + 12 ) else ( -1 @@ -20759,12 +20881,26 @@ let read_scan_config = ( ) ) | 15 -> ( - if String.unsafe_get s pos = 'd' && String.unsafe_get s (pos+1) = 'e' && String.unsafe_get s (pos+2) = 'p' && String.unsafe_get s (pos+3) = 'l' && String.unsafe_get s (pos+4) = 'o' && String.unsafe_get s (pos+5) = 'y' && String.unsafe_get s (pos+6) = 'm' && String.unsafe_get s (pos+7) = 'e' && String.unsafe_get s (pos+8) = 'n' && String.unsafe_get s (pos+9) = 't' && String.unsafe_get s (pos+10) = '_' && String.unsafe_get s (pos+11) = 'n' && String.unsafe_get s (pos+12) = 'a' && String.unsafe_get s (pos+13) = 'm' && String.unsafe_get s (pos+14) = 'e' then ( - 1 - ) - else ( - -1 - ) + match String.unsafe_get s pos with + | 'd' -> ( + if String.unsafe_get s (pos+1) = 'e' && String.unsafe_get s (pos+2) = 'p' && String.unsafe_get s (pos+3) = 'l' && String.unsafe_get s (pos+4) = 'o' && String.unsafe_get s (pos+5) = 'y' && String.unsafe_get s (pos+6) = 'm' && String.unsafe_get s (pos+7) = 'e' && String.unsafe_get s (pos+8) = 'n' && String.unsafe_get s (pos+9) = 't' && String.unsafe_get s (pos+10) = '_' && String.unsafe_get s (pos+11) = 'n' && String.unsafe_get s (pos+12) = 'a' && String.unsafe_get s (pos+13) = 'm' && String.unsafe_get s (pos+14) = 'e' then ( + 1 + ) + else ( + -1 + ) + ) + | 's' -> ( + if String.unsafe_get s (pos+1) = 'y' && String.unsafe_get s (pos+2) = 'm' && String.unsafe_get s (pos+3) = 'b' && String.unsafe_get s (pos+4) = 'o' && String.unsafe_get s (pos+5) = 'l' && String.unsafe_get s (pos+6) = '_' && String.unsafe_get s (pos+7) = 'a' && String.unsafe_get s (pos+8) = 'n' && String.unsafe_get s (pos+9) = 'a' && String.unsafe_get s (pos+10) = 'l' && String.unsafe_get s (pos+11) = 'y' && String.unsafe_get s (pos+12) = 's' && String.unsafe_get s (pos+13) = 'i' && String.unsafe_get s (pos+14) = 's' then ( + 9 + ) + else ( + -1 + ) + ) + | _ -> ( + -1 + ) ) | 16 -> ( match String.unsafe_get s pos with @@ -20778,7 +20914,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 ( - 12 + 13 ) else ( -1 @@ -20792,7 +20928,7 @@ let read_scan_config = ( 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 ( - 14 + 15 ) else ( -1 @@ -20820,7 +20956,7 @@ let read_scan_config = ( ) | 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 ( - 9 + 10 ) else ( -1 @@ -20828,7 +20964,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 ( - 10 + 11 ) else ( -1 @@ -20915,6 +21051,14 @@ let read_scan_config = ( ); ) | 9 -> + if not (Yojson.Safe.read_null_if_possible p lb) then ( + field_symbol_analysis := ( + ( + Atdgen_runtime.Oj_run.read_bool + ) p lb + ); + ) + | 10 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_triage_ignored_syntactic_ids := ( ( @@ -20922,7 +21066,7 @@ let read_scan_config = ( ) p lb ); ) - | 10 -> + | 11 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_triage_ignored_match_based_ids := ( ( @@ -20930,7 +21074,7 @@ let read_scan_config = ( ) p lb ); ) - | 11 -> + | 12 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_ignored_files := ( ( @@ -20938,7 +21082,7 @@ let read_scan_config = ( ) p lb ); ) - | 12 -> + | 13 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_enabled_products := ( Some ( @@ -20948,7 +21092,7 @@ let read_scan_config = ( ) ); ) - | 13 -> + | 14 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_actions := ( ( @@ -20956,7 +21100,7 @@ let read_scan_config = ( ) p lb ); ) - | 14 -> + | 15 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_ci_config_from_cloud := ( Some ( @@ -20984,6 +21128,7 @@ let read_scan_config = ( dependency_query = !field_dependency_query; path_to_transitivity = !field_path_to_transitivity; scan_all_deps_in_diff_scan = !field_scan_all_deps_in_diff_scan; + symbol_analysis = !field_symbol_analysis; 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; @@ -33603,6 +33748,15 @@ let write_features : _ -> features -> _ = ( Yojson.Safe.write_bool ) ob x.scan_all_deps_in_diff_scan; + if !is_first then + is_first := false + else + Buffer.add_char ob ','; + Buffer.add_string ob "\"symbol_analysis\":"; + ( + Yojson.Safe.write_bool + ) + ob x.symbol_analysis; Buffer.add_char ob '}'; ) let string_of_features ?(len = 1024) x = @@ -33618,6 +33772,7 @@ let read_features = ( let field_dependency_query = ref (false) in let field_path_to_transitivity = ref (false) in let field_scan_all_deps_in_diff_scan = ref (false) in + let field_symbol_analysis = ref (false) in try Yojson.Safe.read_space p lb; Yojson.Safe.read_object_end lb; @@ -33643,6 +33798,14 @@ let read_features = ( -1 ) ) + | 15 -> ( + if String.unsafe_get s pos = 's' && String.unsafe_get s (pos+1) = 'y' && String.unsafe_get s (pos+2) = 'm' && String.unsafe_get s (pos+3) = 'b' && String.unsafe_get s (pos+4) = 'o' && String.unsafe_get s (pos+5) = 'l' && String.unsafe_get s (pos+6) = '_' && String.unsafe_get s (pos+7) = 'a' && String.unsafe_get s (pos+8) = 'n' && String.unsafe_get s (pos+9) = 'a' && String.unsafe_get s (pos+10) = 'l' && String.unsafe_get s (pos+11) = 'y' && String.unsafe_get s (pos+12) = 's' && String.unsafe_get s (pos+13) = 'i' && String.unsafe_get s (pos+14) = 's' then ( + 5 + ) + else ( + -1 + ) + ) | 16 -> ( if String.unsafe_get s pos = 'd' && String.unsafe_get s (pos+1) = 'e' && String.unsafe_get s (pos+2) = 'p' && String.unsafe_get s (pos+3) = 'e' && String.unsafe_get s (pos+4) = 'n' && String.unsafe_get s (pos+5) = 'd' && String.unsafe_get s (pos+6) = 'e' && String.unsafe_get s (pos+7) = 'n' && String.unsafe_get s (pos+8) = 'c' && String.unsafe_get s (pos+9) = 'y' && String.unsafe_get s (pos+10) = '_' && String.unsafe_get s (pos+11) = 'q' && String.unsafe_get s (pos+12) = 'u' && String.unsafe_get s (pos+13) = 'e' && String.unsafe_get s (pos+14) = 'r' && String.unsafe_get s (pos+15) = 'y' then ( 2 @@ -33715,6 +33878,14 @@ let read_features = ( ) p lb ); ) + | 5 -> + if not (Yojson.Safe.read_null_if_possible p lb) then ( + field_symbol_analysis := ( + ( + Atdgen_runtime.Oj_run.read_bool + ) p lb + ); + ) | _ -> ( Yojson.Safe.skip_json p lb ) @@ -33744,6 +33915,14 @@ let read_features = ( -1 ) ) + | 15 -> ( + if String.unsafe_get s pos = 's' && String.unsafe_get s (pos+1) = 'y' && String.unsafe_get s (pos+2) = 'm' && String.unsafe_get s (pos+3) = 'b' && String.unsafe_get s (pos+4) = 'o' && String.unsafe_get s (pos+5) = 'l' && String.unsafe_get s (pos+6) = '_' && String.unsafe_get s (pos+7) = 'a' && String.unsafe_get s (pos+8) = 'n' && String.unsafe_get s (pos+9) = 'a' && String.unsafe_get s (pos+10) = 'l' && String.unsafe_get s (pos+11) = 'y' && String.unsafe_get s (pos+12) = 's' && String.unsafe_get s (pos+13) = 'i' && String.unsafe_get s (pos+14) = 's' then ( + 5 + ) + else ( + -1 + ) + ) | 16 -> ( if String.unsafe_get s pos = 'd' && String.unsafe_get s (pos+1) = 'e' && String.unsafe_get s (pos+2) = 'p' && String.unsafe_get s (pos+3) = 'e' && String.unsafe_get s (pos+4) = 'n' && String.unsafe_get s (pos+5) = 'd' && String.unsafe_get s (pos+6) = 'e' && String.unsafe_get s (pos+7) = 'n' && String.unsafe_get s (pos+8) = 'c' && String.unsafe_get s (pos+9) = 'y' && String.unsafe_get s (pos+10) = '_' && String.unsafe_get s (pos+11) = 'q' && String.unsafe_get s (pos+12) = 'u' && String.unsafe_get s (pos+13) = 'e' && String.unsafe_get s (pos+14) = 'r' && String.unsafe_get s (pos+15) = 'y' then ( 2 @@ -33816,6 +33995,14 @@ let read_features = ( ) p lb ); ) + | 5 -> + if not (Yojson.Safe.read_null_if_possible p lb) then ( + field_symbol_analysis := ( + ( + Atdgen_runtime.Oj_run.read_bool + ) p lb + ); + ) | _ -> ( Yojson.Safe.skip_json p lb ) @@ -33830,6 +34017,7 @@ let read_features = ( dependency_query = !field_dependency_query; path_to_transitivity = !field_path_to_transitivity; scan_all_deps_in_diff_scan = !field_scan_all_deps_in_diff_scan; + symbol_analysis = !field_symbol_analysis; } : features) ) diff --git a/semgrep_output_v1_j.mli b/semgrep_output_v1_j.mli index a135778..5822e4b 100644 --- a/semgrep_output_v1_j.mli +++ b/semgrep_output_v1_j.mli @@ -445,6 +445,7 @@ type engine_configuration = Semgrep_output_v1_t.engine_configuration = { dependency_query: bool; path_to_transitivity: bool; scan_all_deps_in_diff_scan: bool; + symbol_analysis: bool; ignored_files: string list; product_ignored_files: product_ignored_files option; generic_slow_rollout: bool; @@ -516,7 +517,8 @@ type ci_config = Semgrep_output_v1_t.ci_config = { deepsemgrep: bool; dependency_query: bool; path_to_transitivity: bool; - scan_all_deps_in_diff_scan: bool + scan_all_deps_in_diff_scan: bool; + symbol_analysis: bool } type action = Semgrep_output_v1_t.action @@ -538,6 +540,7 @@ type scan_config = Semgrep_output_v1_t.scan_config = { dependency_query: bool; path_to_transitivity: bool; scan_all_deps_in_diff_scan: bool; + symbol_analysis: bool; triage_ignored_syntactic_ids: string list; triage_ignored_match_based_ids: string list; ignored_files: string list; @@ -854,7 +857,8 @@ type features = Semgrep_output_v1_t.features = { deepsemgrep: bool; dependency_query: bool; path_to_transitivity: bool; - scan_all_deps_in_diff_scan: bool + scan_all_deps_in_diff_scan: bool; + symbol_analysis: bool } type diff_file = Semgrep_output_v1_t.diff_file = {