From 5778392cc1fe7254902aaecf5f4b55064435f5b6 Mon Sep 17 00:00:00 2001 From: pad Date: Thu, 9 Jan 2025 11:47:25 +0100 Subject: [PATCH] Remove semgrep_version from project_metadata and meta from scan_request The backend should not use those fields anymore so we can remove them. Note that even if old versions of semgrep are still producing those fields, it is fine because when the backend is consuming the JSON, any unknown field is skipped and those fields should not be used anymore. test plan: see related PR in semgrep --- semgrep_output_v1.atd | 22 +-- semgrep_output_v1.jsonschema | 18 +- semgrep_output_v1.proto | 4 +- semgrep_output_v1.py | 7 - semgrep_output_v1.ts | 26 ++- semgrep_output_v1_j.ml | 314 +++++++++++++---------------------- semgrep_output_v1_j.mli | 8 +- 7 files changed, 141 insertions(+), 258 deletions(-) diff --git a/semgrep_output_v1.atd b/semgrep_output_v1.atd index 919f33d7..6ff0a3bd 100644 --- a/semgrep_output_v1.atd +++ b/semgrep_output_v1.atd @@ -100,6 +100,8 @@ type uuid = string wrap (* RFC 3339 format *) type datetime = string wrap +type glob = string + (*****************************************************************************) (* Versioning *) (*****************************************************************************) @@ -494,6 +496,7 @@ type match_intermediate_var = { (* both ecosystem and transitivity below have frozen=True so the generated * classes can be hashed and put in sets (see calls to reachable_deps.add() * in semgrep SCA code) + * TODO: use , and do the same for manifest *) type ecosystem @@ -595,6 +598,7 @@ type dependency_child = { * the validity of a finding. No_validator is currently also used when no * validation has yet occurred, which if that becomes confusing we * could adjust that, by adding another state. + * TODO: use *) type validation_state @@ -948,7 +952,7 @@ type cli_output_extra = { type config_error_reason = [ | UnparsableRule -] +] type config_error = { file: fpath; @@ -1267,9 +1271,6 @@ type deployment_response = { * (while still being backward compatible) *) type project_metadata = { - (* TODO: deprecate in favor of scan_metadata.cli_version *) - semgrep_version: version; - (* TODO: use enum with *) (* "git" | "github-actions" | "gitlab-ci" | "circleci" * "jenkins" | "bitbucket" | "azure-pipelines" | "buildkite" | "travis-ci" @@ -1355,18 +1356,9 @@ type scan_metadata = { (* Sent by the CLI to the POST /api/cli/scans to create a scan. *) type scan_request = { - (* added in 1.43 as options, and mandatory since 1.100.0 (replacing meta) *) project_metadata: project_metadata; scan_metadata: scan_metadata; - - (* added in 1.43 *) ?project_config: ci_config_from_repo option; - - (* deprecated: moved as an option in 1.100.0 and was duplicative of - * information in project_metadata and scan_metadata since 1.43.0 - * old: 'meta: project_metadata;' before 1.43 - *) - ?meta: raw_json option; } (* Response from the backend to the CLI to the POST /api/cli/scans *) @@ -1400,8 +1392,6 @@ type historical_configuration = { ?lookback_days: int option; } -type glob = string - type product_ignored_files = (product * glob list) list (* We omit the usual otherwise we get a * "keys must be strings" error *) @@ -1655,6 +1645,7 @@ type dependency_parser_error = { (* json names are to maintain backwards compatibility with the python enum it * is replacing + * TODO: use *) type sca_parser_name = [ | Gemfile_lock @@ -2032,6 +2023,7 @@ type lockfile_kind | ConanLock ] +(* TODO: use *) type manifest_kind = diff --git a/semgrep_output_v1.jsonschema b/semgrep_output_v1.jsonschema index ace6318d..ea77a03f 100644 --- a/semgrep_output_v1.jsonschema +++ b/semgrep_output_v1.jsonschema @@ -41,6 +41,7 @@ "sha1": { "type": "string" }, "uuid": { "type": "string" }, "datetime": { "type": "string" }, + "glob": { "type": "string" }, "version": { "type": "string" }, "position": { "type": "object", @@ -964,15 +965,14 @@ "project_metadata": { "type": "object", "required": [ - "semgrep_version", "scan_environment", "repository", "repo_url", - "branch", "commit", "commit_title", "commit_author_email", - "commit_author_name", "commit_author_username", - "commit_author_image_url", "ci_job_url", "on", - "pull_request_author_username", "pull_request_author_image_url", - "pull_request_id", "pull_request_title", "is_full_scan" + "scan_environment", "repository", "repo_url", "branch", "commit", + "commit_title", "commit_author_email", "commit_author_name", + "commit_author_username", "commit_author_image_url", "ci_job_url", + "on", "pull_request_author_username", + "pull_request_author_image_url", "pull_request_id", + "pull_request_title", "is_full_scan" ], "properties": { - "semgrep_version": { "$ref": "#/definitions/version" }, "scan_environment": { "type": "string" }, "repository": { "type": "string" }, "repo_url": { "$ref": "#/definitions/uri" }, @@ -1021,8 +1021,7 @@ "properties": { "project_metadata": { "$ref": "#/definitions/project_metadata" }, "scan_metadata": { "$ref": "#/definitions/scan_metadata" }, - "project_config": { "$ref": "#/definitions/ci_config_from_repo" }, - "meta": { "$ref": "#/definitions/raw_json" } + "project_config": { "$ref": "#/definitions/ci_config_from_repo" } } }, "scan_response": { @@ -1070,7 +1069,6 @@ "lookback_days": { "type": "integer" } } }, - "glob": { "type": "string" }, "product_ignored_files": { "type": "array", "items": { diff --git a/semgrep_output_v1.proto b/semgrep_output_v1.proto index ce65ff5b..1490647a 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: 18d5eed99a95ef7ab173fc0b5a4b302224b414ffe16b5f33027813a6880c7097 +// Source file sha256 digest: b568a558ea952137cc247ca9783f12e033adea5ebc5aaa595521064a24049319 syntax = "proto3"; @@ -345,7 +345,6 @@ message DeploymentResponse { } message ProjectMetadata { - string semgrep_version = 118812144; string scan_environment = 288669428; string repository = 439913047; string repo_url = 245057343; @@ -386,7 +385,6 @@ message ScanRequest { ProjectMetadata project_metadata = 24255885; ScanMetadata scan_metadata = 76122041; CiConfigFromRepo project_config = 317758767; - google.protobuf.Any meta = 3004443; } message ScanResponse { diff --git a/semgrep_output_v1.py b/semgrep_output_v1.py index 395549e0..75185c5f 100644 --- a/semgrep_output_v1.py +++ b/semgrep_output_v1.py @@ -5037,7 +5037,6 @@ def to_json_string(self, **kw: Any) -> str: class ProjectMetadata: """Original type: project_metadata = { ... }""" - semgrep_version: Version scan_environment: str repository: str repo_url: Optional[Uri] @@ -5069,7 +5068,6 @@ class ProjectMetadata: def from_json(cls, x: Any) -> 'ProjectMetadata': if isinstance(x, dict): return cls( - semgrep_version=Version.from_json(x['semgrep_version']) if 'semgrep_version' in x else _atd_missing_json_field('ProjectMetadata', 'semgrep_version'), scan_environment=_atd_read_string(x['scan_environment']) if 'scan_environment' in x else _atd_missing_json_field('ProjectMetadata', 'scan_environment'), repository=_atd_read_string(x['repository']) if 'repository' in x else _atd_missing_json_field('ProjectMetadata', 'repository'), repo_url=_atd_read_nullable(Uri.from_json)(x['repo_url']) if 'repo_url' in x else _atd_missing_json_field('ProjectMetadata', 'repo_url'), @@ -5102,7 +5100,6 @@ def from_json(cls, x: Any) -> 'ProjectMetadata': def to_json(self) -> Any: res: Dict[str, Any] = {} - res['semgrep_version'] = (lambda x: x.to_json())(self.semgrep_version) res['scan_environment'] = _atd_write_string(self.scan_environment) res['repository'] = _atd_write_string(self.repository) res['repo_url'] = _atd_write_nullable((lambda x: x.to_json()))(self.repo_url) @@ -5187,7 +5184,6 @@ class ScanRequest: project_metadata: ProjectMetadata scan_metadata: ScanMetadata project_config: Optional[CiConfigFromRepo] = None - meta: Optional[RawJson] = None @classmethod def from_json(cls, x: Any) -> 'ScanRequest': @@ -5196,7 +5192,6 @@ def from_json(cls, x: Any) -> 'ScanRequest': project_metadata=ProjectMetadata.from_json(x['project_metadata']) if 'project_metadata' in x else _atd_missing_json_field('ScanRequest', 'project_metadata'), scan_metadata=ScanMetadata.from_json(x['scan_metadata']) if 'scan_metadata' in x else _atd_missing_json_field('ScanRequest', 'scan_metadata'), project_config=CiConfigFromRepo.from_json(x['project_config']) if 'project_config' in x else None, - meta=RawJson.from_json(x['meta']) if 'meta' in x else None, ) else: _atd_bad_json('ScanRequest', x) @@ -5207,8 +5202,6 @@ def to_json(self) -> Any: res['scan_metadata'] = (lambda x: x.to_json())(self.scan_metadata) if self.project_config is not None: res['project_config'] = (lambda x: x.to_json())(self.project_config) - if self.meta is not None: - res['meta'] = (lambda x: x.to_json())(self.meta) return res @classmethod diff --git a/semgrep_output_v1.ts b/semgrep_output_v1.ts index 7b93cc04..60eb23cc 100644 --- a/semgrep_output_v1.ts +++ b/semgrep_output_v1.ts @@ -26,6 +26,8 @@ export type Uuid = string export type Datetime = string +export type Glob = string + export type Version = string export type Position = { @@ -523,7 +525,6 @@ export type DeploymentResponse = { } export type ProjectMetadata = { - semgrep_version: Version; scan_environment: string; repository: string; repo_url: (Uri | null); @@ -564,7 +565,6 @@ export type ScanRequest = { project_metadata: ProjectMetadata; scan_metadata: ScanMetadata; project_config?: CiConfigFromRepo; - meta?: RawJson; } export type ScanResponse = { @@ -591,8 +591,6 @@ export type HistoricalConfiguration = { lookback_days?: number /*int*/; } -export type Glob = string - export type ProductIgnoredFiles = Map export type EngineConfiguration = { @@ -1061,6 +1059,14 @@ export function readDatetime(x: any, context: any = x): Datetime { return _atd_read_string(x, context); } +export function writeGlob(x: Glob, context: any = x): any { + return _atd_write_string(x, context); +} + +export function readGlob(x: any, context: any = x): Glob { + return _atd_read_string(x, context); +} + export function writeVersion(x: Version, context: any = x): any { return _atd_write_string(x, context); } @@ -2692,7 +2698,6 @@ export function readDeploymentResponse(x: any, context: any = x): DeploymentResp export function writeProjectMetadata(x: ProjectMetadata, context: any = x): any { return { - 'semgrep_version': _atd_write_required_field('ProjectMetadata', 'semgrep_version', writeVersion, x.semgrep_version, x), 'scan_environment': _atd_write_required_field('ProjectMetadata', 'scan_environment', _atd_write_string, x.scan_environment, x), 'repository': _atd_write_required_field('ProjectMetadata', 'repository', _atd_write_string, x.repository, x), 'repo_url': _atd_write_required_field('ProjectMetadata', 'repo_url', _atd_write_nullable(writeUri), x.repo_url, x), @@ -2724,7 +2729,6 @@ export function writeProjectMetadata(x: ProjectMetadata, context: any = x): any export function readProjectMetadata(x: any, context: any = x): ProjectMetadata { return { - semgrep_version: _atd_read_required_field('ProjectMetadata', 'semgrep_version', readVersion, x['semgrep_version'], x), scan_environment: _atd_read_required_field('ProjectMetadata', 'scan_environment', _atd_read_string, x['scan_environment'], x), repository: _atd_read_required_field('ProjectMetadata', 'repository', _atd_read_string, x['repository'], x), repo_url: _atd_read_required_field('ProjectMetadata', 'repo_url', _atd_read_nullable(readUri), x['repo_url'], x), @@ -2779,7 +2783,6 @@ export function writeScanRequest(x: ScanRequest, context: any = x): any { 'project_metadata': _atd_write_required_field('ScanRequest', 'project_metadata', writeProjectMetadata, x.project_metadata, x), 'scan_metadata': _atd_write_required_field('ScanRequest', 'scan_metadata', writeScanMetadata, x.scan_metadata, x), 'project_config': _atd_write_optional_field(writeCiConfigFromRepo, x.project_config, x), - 'meta': _atd_write_optional_field(writeRawJson, x.meta, x), }; } @@ -2788,7 +2791,6 @@ export function readScanRequest(x: any, context: any = x): ScanRequest { project_metadata: _atd_read_required_field('ScanRequest', 'project_metadata', readProjectMetadata, x['project_metadata'], x), scan_metadata: _atd_read_required_field('ScanRequest', 'scan_metadata', readScanMetadata, x['scan_metadata'], x), project_config: _atd_read_optional_field(readCiConfigFromRepo, x['project_config'], x), - meta: _atd_read_optional_field(readRawJson, x['meta'], x), }; } @@ -2856,14 +2858,6 @@ export function readHistoricalConfiguration(x: any, context: any = x): Historica }; } -export function writeGlob(x: Glob, context: any = x): any { - return _atd_write_string(x, context); -} - -export function readGlob(x: any, context: any = x): Glob { - return _atd_read_string(x, context); -} - export function writeProductIgnoredFiles(x: ProductIgnoredFiles, context: any = x): any { return _atd_write_assoc_map_to_array(writeProduct, _atd_write_array(writeGlob))(x, context); } diff --git a/semgrep_output_v1_j.ml b/semgrep_output_v1_j.ml index 79b61ccc..84298094 100644 --- a/semgrep_output_v1_j.ml +++ b/semgrep_output_v1_j.ml @@ -240,7 +240,9 @@ type rule_result = Semgrep_output_v1_t.rule_result = { type fixtest_result = Semgrep_output_v1_t.fixtest_result = { passed: bool } -type config_error_reason = Semgrep_output_v1_t.config_error_reason +type config_error_reason = Semgrep_output_v1_t.config_error_reason = + UnparsableRule + type config_error = Semgrep_output_v1_t.config_error = { file: fpath; @@ -408,7 +410,6 @@ type scan_metadata = Semgrep_output_v1_t.scan_metadata = { } type project_metadata = Semgrep_output_v1_t.project_metadata = { - semgrep_version: version; scan_environment: string; repository: string; repo_url: uri option; @@ -445,8 +446,7 @@ type ci_config_from_repo = Semgrep_output_v1_t.ci_config_from_repo = { type scan_request = Semgrep_output_v1_t.scan_request = { project_metadata: project_metadata; scan_metadata: scan_metadata; - project_config: ci_config_from_repo option; - meta: raw_json option + project_config: ci_config_from_repo option } type ci_env = Semgrep_output_v1_t.ci_env @@ -9493,10 +9493,10 @@ let read_fixtest_result = ( ) let fixtest_result_of_string s = read_fixtest_result (Yojson.Safe.init_lexer ()) (Lexing.from_string s) -let write_config_error_reason = ( - fun ob x -> +let write_config_error_reason : _ -> config_error_reason -> _ = ( + fun ob (x : config_error_reason) -> match x with - | `UnparsableRule -> Buffer.add_string ob "\"unparsable_rule\"" + | UnparsableRule -> Buffer.add_string ob "\"unparsable_rule\"" ) let string_of_config_error_reason ?(len = 1024) x = let ob = Buffer.create len in @@ -9511,14 +9511,14 @@ let read_config_error_reason = ( | "unparsable_rule" -> Yojson.Safe.read_space p lb; Yojson.Safe.read_gt p lb; - `UnparsableRule + (UnparsableRule : config_error_reason) | x -> Atdgen_runtime.Oj_run.invalid_variant_tag p x ) | `Double_quote -> ( match Yojson.Safe.finish_string p lb with | "unparsable_rule" -> - `UnparsableRule + (UnparsableRule : config_error_reason) | x -> Atdgen_runtime.Oj_run.invalid_variant_tag p x ) @@ -15223,15 +15223,6 @@ let write_project_metadata : _ -> project_metadata -> _ = ( fun ob (x : project_metadata) -> Buffer.add_char ob '{'; let is_first = ref true in - if !is_first then - is_first := false - else - Buffer.add_char ob ','; - Buffer.add_string ob "\"semgrep_version\":"; - ( - write_version - ) - ob x.semgrep_version; if !is_first then is_first := false else @@ -15494,7 +15485,6 @@ let read_project_metadata = ( fun p lb -> Yojson.Safe.read_space p lb; Yojson.Safe.read_lcurl p lb; - let field_semgrep_version = ref (None) in let field_scan_environment = ref (None) in let field_repository = ref (None) in let field_repo_url = ref (None) in @@ -15532,7 +15522,7 @@ let read_project_metadata = ( match len with | 2 -> ( if String.unsafe_get s pos = 'o' && String.unsafe_get s (pos+1) = 'n' then ( - 16 + 15 ) else ( -1 @@ -15542,7 +15532,7 @@ let read_project_metadata = ( match String.unsafe_get s pos with | 'b' -> ( if String.unsafe_get s (pos+1) = 'r' && String.unsafe_get s (pos+2) = 'a' && String.unsafe_get s (pos+3) = 'n' && String.unsafe_get s (pos+4) = 'c' && String.unsafe_get s (pos+5) = 'h' then ( - 7 + 6 ) else ( -1 @@ -15550,7 +15540,7 @@ let read_project_metadata = ( ) | 'c' -> ( if String.unsafe_get s (pos+1) = 'o' && String.unsafe_get s (pos+2) = 'm' && String.unsafe_get s (pos+3) = 'm' && String.unsafe_get s (pos+4) = 'i' && String.unsafe_get s (pos+5) = 't' then ( - 8 + 7 ) else ( -1 @@ -15558,7 +15548,7 @@ let read_project_metadata = ( ) | 'o' -> ( if String.unsafe_get s (pos+1) = 'r' && String.unsafe_get s (pos+2) = 'g' && String.unsafe_get s (pos+3) = '_' && String.unsafe_get s (pos+4) = 'i' && String.unsafe_get s (pos+5) = 'd' then ( - 5 + 4 ) else ( -1 @@ -15570,7 +15560,7 @@ let read_project_metadata = ( ) | 7 -> ( if String.unsafe_get s pos = 'r' && String.unsafe_get s (pos+1) = 'e' && String.unsafe_get s (pos+2) = 'p' && String.unsafe_get s (pos+3) = 'o' && String.unsafe_get s (pos+4) = '_' && String.unsafe_get s (pos+5) = 'i' && String.unsafe_get s (pos+6) = 'd' then ( - 4 + 3 ) else ( -1 @@ -15580,7 +15570,7 @@ let read_project_metadata = ( match String.unsafe_get s pos with | 'b' -> ( if String.unsafe_get s (pos+1) = 'a' && String.unsafe_get s (pos+2) = 's' && String.unsafe_get s (pos+3) = 'e' && String.unsafe_get s (pos+4) = '_' && String.unsafe_get s (pos+5) = 's' && String.unsafe_get s (pos+6) = 'h' && String.unsafe_get s (pos+7) = 'a' then ( - 21 + 20 ) else ( -1 @@ -15588,7 +15578,7 @@ let read_project_metadata = ( ) | 'r' -> ( if String.unsafe_get s (pos+1) = 'e' && String.unsafe_get s (pos+2) = 'p' && String.unsafe_get s (pos+3) = 'o' && String.unsafe_get s (pos+4) = '_' && String.unsafe_get s (pos+5) = 'u' && String.unsafe_get s (pos+6) = 'r' && String.unsafe_get s (pos+7) = 'l' then ( - 3 + 2 ) else ( -1 @@ -15600,7 +15590,7 @@ let read_project_metadata = ( ) | 9 -> ( if String.unsafe_get s pos = 's' && String.unsafe_get s (pos+1) = 't' && String.unsafe_get s (pos+2) = 'a' && String.unsafe_get s (pos+3) = 'r' && String.unsafe_get s (pos+4) = 't' && String.unsafe_get s (pos+5) = '_' && String.unsafe_get s (pos+6) = 's' && String.unsafe_get s (pos+7) = 'h' && String.unsafe_get s (pos+8) = 'a' then ( - 22 + 21 ) else ( -1 @@ -15610,7 +15600,7 @@ let read_project_metadata = ( 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) = 'j' && String.unsafe_get s (pos+4) = 'o' && String.unsafe_get s (pos+5) = 'b' && String.unsafe_get s (pos+6) = '_' && String.unsafe_get s (pos+7) = 'u' && String.unsafe_get s (pos+8) = 'r' && String.unsafe_get s (pos+9) = 'l' then ( - 15 + 14 ) else ( -1 @@ -15618,7 +15608,7 @@ let read_project_metadata = ( ) | 'r' -> ( if String.unsafe_get s (pos+1) = 'e' && String.unsafe_get s (pos+2) = 'p' && String.unsafe_get s (pos+3) = 'o' && String.unsafe_get s (pos+4) = 's' && String.unsafe_get s (pos+5) = 'i' && String.unsafe_get s (pos+6) = 't' && String.unsafe_get s (pos+7) = 'o' && String.unsafe_get s (pos+8) = 'r' && String.unsafe_get s (pos+9) = 'y' then ( - 2 + 1 ) else ( -1 @@ -15630,7 +15620,7 @@ let read_project_metadata = ( ) | 11 -> ( if String.unsafe_get s pos = 'i' && String.unsafe_get s (pos+1) = 's' && String.unsafe_get s (pos+2) = '_' && String.unsafe_get s (pos+3) = 's' && String.unsafe_get s (pos+4) = 'c' && String.unsafe_get s (pos+5) = 'a' && String.unsafe_get s (pos+6) = '_' && String.unsafe_get s (pos+7) = 's' && String.unsafe_get s (pos+8) = 'c' && String.unsafe_get s (pos+9) = 'a' && String.unsafe_get s (pos+10) = 'n' then ( - 24 + 23 ) else ( -1 @@ -15640,7 +15630,7 @@ let read_project_metadata = ( match String.unsafe_get s pos with | 'c' -> ( if String.unsafe_get s (pos+1) = 'o' && String.unsafe_get s (pos+2) = 'm' && String.unsafe_get s (pos+3) = 'm' && String.unsafe_get s (pos+4) = 'i' && String.unsafe_get s (pos+5) = 't' && String.unsafe_get s (pos+6) = '_' && String.unsafe_get s (pos+7) = 't' && String.unsafe_get s (pos+8) = 'i' && String.unsafe_get s (pos+9) = 't' && String.unsafe_get s (pos+10) = 'l' && String.unsafe_get s (pos+11) = 'e' then ( - 9 + 8 ) else ( -1 @@ -15651,7 +15641,7 @@ let read_project_metadata = ( match String.unsafe_get s (pos+3) with | 'c' -> ( if String.unsafe_get s (pos+4) = 'o' && String.unsafe_get s (pos+5) = 'd' && String.unsafe_get s (pos+6) = 'e' && String.unsafe_get s (pos+7) = '_' && String.unsafe_get s (pos+8) = 's' && String.unsafe_get s (pos+9) = 'c' && String.unsafe_get s (pos+10) = 'a' && String.unsafe_get s (pos+11) = 'n' then ( - 25 + 24 ) else ( -1 @@ -15659,7 +15649,7 @@ let read_project_metadata = ( ) | 'f' -> ( if String.unsafe_get s (pos+4) = 'u' && String.unsafe_get s (pos+5) = 'l' && String.unsafe_get s (pos+6) = 'l' && String.unsafe_get s (pos+7) = '_' && String.unsafe_get s (pos+8) = 's' && String.unsafe_get s (pos+9) = 'c' && String.unsafe_get s (pos+10) = 'a' && String.unsafe_get s (pos+11) = 'n' then ( - 23 + 22 ) else ( -1 @@ -15681,7 +15671,7 @@ let read_project_metadata = ( match String.unsafe_get s pos with | 'i' -> ( if String.unsafe_get s (pos+1) = 's' && String.unsafe_get s (pos+2) = '_' && String.unsafe_get s (pos+3) = 's' && String.unsafe_get s (pos+4) = 'e' && String.unsafe_get s (pos+5) = 'c' && String.unsafe_get s (pos+6) = 'r' && String.unsafe_get s (pos+7) = 'e' && String.unsafe_get s (pos+8) = 't' && String.unsafe_get s (pos+9) = 's' && String.unsafe_get s (pos+10) = '_' && String.unsafe_get s (pos+11) = 's' && String.unsafe_get s (pos+12) = 'c' && String.unsafe_get s (pos+13) = 'a' && String.unsafe_get s (pos+14) = 'n' then ( - 26 + 25 ) else ( -1 @@ -15689,15 +15679,7 @@ let read_project_metadata = ( ) | 'p' -> ( if String.unsafe_get s (pos+1) = 'u' && String.unsafe_get s (pos+2) = 'l' && String.unsafe_get s (pos+3) = 'l' && String.unsafe_get s (pos+4) = '_' && String.unsafe_get s (pos+5) = 'r' && String.unsafe_get s (pos+6) = 'e' && String.unsafe_get s (pos+7) = 'q' && String.unsafe_get s (pos+8) = 'u' && String.unsafe_get s (pos+9) = 'e' && String.unsafe_get s (pos+10) = 's' && String.unsafe_get s (pos+11) = 't' && String.unsafe_get s (pos+12) = '_' && String.unsafe_get s (pos+13) = 'i' && String.unsafe_get s (pos+14) = 'd' then ( - 19 - ) - else ( - -1 - ) - ) - | 's' -> ( - if String.unsafe_get s (pos+1) = 'e' && String.unsafe_get s (pos+2) = 'm' && String.unsafe_get s (pos+3) = 'g' && String.unsafe_get s (pos+4) = 'r' && String.unsafe_get s (pos+5) = 'e' && String.unsafe_get s (pos+6) = 'p' && String.unsafe_get s (pos+7) = '_' && String.unsafe_get s (pos+8) = 'v' && String.unsafe_get s (pos+9) = 'e' && String.unsafe_get s (pos+10) = 'r' && String.unsafe_get s (pos+11) = 's' && String.unsafe_get s (pos+12) = 'i' && String.unsafe_get s (pos+13) = 'o' && String.unsafe_get s (pos+14) = 'n' then ( - 0 + 18 ) else ( -1 @@ -15711,7 +15693,7 @@ let read_project_metadata = ( match String.unsafe_get s pos with | 'c' -> ( if String.unsafe_get s (pos+1) = 'o' && String.unsafe_get s (pos+2) = 'm' && String.unsafe_get s (pos+3) = 'm' && String.unsafe_get s (pos+4) = 'i' && String.unsafe_get s (pos+5) = 't' && String.unsafe_get s (pos+6) = '_' && String.unsafe_get s (pos+7) = 't' && String.unsafe_get s (pos+8) = 'i' && String.unsafe_get s (pos+9) = 'm' && String.unsafe_get s (pos+10) = 'e' && String.unsafe_get s (pos+11) = 's' && String.unsafe_get s (pos+12) = 't' && String.unsafe_get s (pos+13) = 'a' && String.unsafe_get s (pos+14) = 'm' && String.unsafe_get s (pos+15) = 'p' then ( - 10 + 9 ) else ( -1 @@ -15719,7 +15701,7 @@ let read_project_metadata = ( ) | 's' -> ( if String.unsafe_get s (pos+1) = 'c' && String.unsafe_get s (pos+2) = 'a' && String.unsafe_get s (pos+3) = 'n' && String.unsafe_get s (pos+4) = '_' && String.unsafe_get s (pos+5) = 'e' && String.unsafe_get s (pos+6) = 'n' && String.unsafe_get s (pos+7) = 'v' && String.unsafe_get s (pos+8) = 'i' && String.unsafe_get s (pos+9) = 'r' && String.unsafe_get s (pos+10) = 'o' && String.unsafe_get s (pos+11) = 'n' && String.unsafe_get s (pos+12) = 'm' && String.unsafe_get s (pos+13) = 'e' && String.unsafe_get s (pos+14) = 'n' && String.unsafe_get s (pos+15) = 't' then ( - 1 + 0 ) else ( -1 @@ -15731,7 +15713,7 @@ let read_project_metadata = ( ) | 17 -> ( if String.unsafe_get s pos = 'r' && String.unsafe_get s (pos+1) = 'e' && String.unsafe_get s (pos+2) = 'p' && String.unsafe_get s (pos+3) = 'o' && String.unsafe_get s (pos+4) = '_' && String.unsafe_get s (pos+5) = 'd' && String.unsafe_get s (pos+6) = 'i' && String.unsafe_get s (pos+7) = 's' && String.unsafe_get s (pos+8) = 'p' && String.unsafe_get s (pos+9) = 'l' && String.unsafe_get s (pos+10) = 'a' && String.unsafe_get s (pos+11) = 'y' && String.unsafe_get s (pos+12) = '_' && String.unsafe_get s (pos+13) = 'n' && String.unsafe_get s (pos+14) = 'a' && String.unsafe_get s (pos+15) = 'm' && String.unsafe_get s (pos+16) = 'e' then ( - 6 + 5 ) else ( -1 @@ -15741,7 +15723,7 @@ let read_project_metadata = ( match String.unsafe_get s pos with | 'c' -> ( if String.unsafe_get s (pos+1) = 'o' && String.unsafe_get s (pos+2) = 'm' && String.unsafe_get s (pos+3) = 'm' && String.unsafe_get s (pos+4) = 'i' && String.unsafe_get s (pos+5) = 't' && String.unsafe_get s (pos+6) = '_' && String.unsafe_get s (pos+7) = 'a' && String.unsafe_get s (pos+8) = 'u' && String.unsafe_get s (pos+9) = 't' && String.unsafe_get s (pos+10) = 'h' && String.unsafe_get s (pos+11) = 'o' && String.unsafe_get s (pos+12) = 'r' && String.unsafe_get s (pos+13) = '_' && String.unsafe_get s (pos+14) = 'n' && String.unsafe_get s (pos+15) = 'a' && String.unsafe_get s (pos+16) = 'm' && String.unsafe_get s (pos+17) = 'e' then ( - 12 + 11 ) else ( -1 @@ -15749,7 +15731,7 @@ let read_project_metadata = ( ) | 'p' -> ( if String.unsafe_get s (pos+1) = 'u' && String.unsafe_get s (pos+2) = 'l' && String.unsafe_get s (pos+3) = 'l' && String.unsafe_get s (pos+4) = '_' && String.unsafe_get s (pos+5) = 'r' && String.unsafe_get s (pos+6) = 'e' && String.unsafe_get s (pos+7) = 'q' && String.unsafe_get s (pos+8) = 'u' && String.unsafe_get s (pos+9) = 'e' && String.unsafe_get s (pos+10) = 's' && String.unsafe_get s (pos+11) = 't' && String.unsafe_get s (pos+12) = '_' && String.unsafe_get s (pos+13) = 't' && String.unsafe_get s (pos+14) = 'i' && String.unsafe_get s (pos+15) = 't' && String.unsafe_get s (pos+16) = 'l' && String.unsafe_get s (pos+17) = 'e' then ( - 20 + 19 ) else ( -1 @@ -15761,7 +15743,7 @@ let read_project_metadata = ( ) | 19 -> ( if String.unsafe_get s pos = 'c' && String.unsafe_get s (pos+1) = 'o' && String.unsafe_get s (pos+2) = 'm' && String.unsafe_get s (pos+3) = 'm' && String.unsafe_get s (pos+4) = 'i' && String.unsafe_get s (pos+5) = 't' && String.unsafe_get s (pos+6) = '_' && String.unsafe_get s (pos+7) = 'a' && String.unsafe_get s (pos+8) = 'u' && String.unsafe_get s (pos+9) = 't' && String.unsafe_get s (pos+10) = 'h' && String.unsafe_get s (pos+11) = 'o' && String.unsafe_get s (pos+12) = 'r' && String.unsafe_get s (pos+13) = '_' && String.unsafe_get s (pos+14) = 'e' && String.unsafe_get s (pos+15) = 'm' && String.unsafe_get s (pos+16) = 'a' && String.unsafe_get s (pos+17) = 'i' && String.unsafe_get s (pos+18) = 'l' then ( - 11 + 10 ) else ( -1 @@ -15769,7 +15751,7 @@ let read_project_metadata = ( ) | 22 -> ( if String.unsafe_get s pos = 'c' && String.unsafe_get s (pos+1) = 'o' && String.unsafe_get s (pos+2) = 'm' && String.unsafe_get s (pos+3) = 'm' && String.unsafe_get s (pos+4) = 'i' && String.unsafe_get s (pos+5) = 't' && String.unsafe_get s (pos+6) = '_' && String.unsafe_get s (pos+7) = 'a' && String.unsafe_get s (pos+8) = 'u' && String.unsafe_get s (pos+9) = 't' && String.unsafe_get s (pos+10) = 'h' && String.unsafe_get s (pos+11) = 'o' && String.unsafe_get s (pos+12) = 'r' && String.unsafe_get s (pos+13) = '_' && String.unsafe_get s (pos+14) = 'u' && String.unsafe_get s (pos+15) = 's' && String.unsafe_get s (pos+16) = 'e' && String.unsafe_get s (pos+17) = 'r' && String.unsafe_get s (pos+18) = 'n' && String.unsafe_get s (pos+19) = 'a' && String.unsafe_get s (pos+20) = 'm' && String.unsafe_get s (pos+21) = 'e' then ( - 13 + 12 ) else ( -1 @@ -15777,7 +15759,7 @@ let read_project_metadata = ( ) | 23 -> ( if String.unsafe_get s pos = 'c' && String.unsafe_get s (pos+1) = 'o' && String.unsafe_get s (pos+2) = 'm' && String.unsafe_get s (pos+3) = 'm' && String.unsafe_get s (pos+4) = 'i' && String.unsafe_get s (pos+5) = 't' && String.unsafe_get s (pos+6) = '_' && String.unsafe_get s (pos+7) = 'a' && String.unsafe_get s (pos+8) = 'u' && String.unsafe_get s (pos+9) = 't' && String.unsafe_get s (pos+10) = 'h' && String.unsafe_get s (pos+11) = 'o' && String.unsafe_get s (pos+12) = 'r' && String.unsafe_get s (pos+13) = '_' && String.unsafe_get s (pos+14) = 'i' && String.unsafe_get s (pos+15) = 'm' && String.unsafe_get s (pos+16) = 'a' && String.unsafe_get s (pos+17) = 'g' && String.unsafe_get s (pos+18) = 'e' && String.unsafe_get s (pos+19) = '_' && String.unsafe_get s (pos+20) = 'u' && String.unsafe_get s (pos+21) = 'r' && String.unsafe_get s (pos+22) = 'l' then ( - 14 + 13 ) else ( -1 @@ -15785,7 +15767,7 @@ let read_project_metadata = ( ) | 28 -> ( if String.unsafe_get s pos = 'p' && String.unsafe_get s (pos+1) = 'u' && String.unsafe_get s (pos+2) = 'l' && String.unsafe_get s (pos+3) = 'l' && String.unsafe_get s (pos+4) = '_' && String.unsafe_get s (pos+5) = 'r' && String.unsafe_get s (pos+6) = 'e' && String.unsafe_get s (pos+7) = 'q' && String.unsafe_get s (pos+8) = 'u' && String.unsafe_get s (pos+9) = 'e' && String.unsafe_get s (pos+10) = 's' && String.unsafe_get s (pos+11) = 't' && String.unsafe_get s (pos+12) = '_' && String.unsafe_get s (pos+13) = 'a' && String.unsafe_get s (pos+14) = 'u' && String.unsafe_get s (pos+15) = 't' && String.unsafe_get s (pos+16) = 'h' && String.unsafe_get s (pos+17) = 'o' && String.unsafe_get s (pos+18) = 'r' && String.unsafe_get s (pos+19) = '_' && String.unsafe_get s (pos+20) = 'u' && String.unsafe_get s (pos+21) = 's' && String.unsafe_get s (pos+22) = 'e' && String.unsafe_get s (pos+23) = 'r' && String.unsafe_get s (pos+24) = 'n' && String.unsafe_get s (pos+25) = 'a' && String.unsafe_get s (pos+26) = 'm' && String.unsafe_get s (pos+27) = 'e' then ( - 17 + 16 ) else ( -1 @@ -15793,7 +15775,7 @@ let read_project_metadata = ( ) | 29 -> ( if String.unsafe_get s pos = 'p' && String.unsafe_get s (pos+1) = 'u' && String.unsafe_get s (pos+2) = 'l' && String.unsafe_get s (pos+3) = 'l' && String.unsafe_get s (pos+4) = '_' && String.unsafe_get s (pos+5) = 'r' && String.unsafe_get s (pos+6) = 'e' && String.unsafe_get s (pos+7) = 'q' && String.unsafe_get s (pos+8) = 'u' && String.unsafe_get s (pos+9) = 'e' && String.unsafe_get s (pos+10) = 's' && String.unsafe_get s (pos+11) = 't' && String.unsafe_get s (pos+12) = '_' && String.unsafe_get s (pos+13) = 'a' && String.unsafe_get s (pos+14) = 'u' && String.unsafe_get s (pos+15) = 't' && String.unsafe_get s (pos+16) = 'h' && String.unsafe_get s (pos+17) = 'o' && String.unsafe_get s (pos+18) = 'r' && String.unsafe_get s (pos+19) = '_' && String.unsafe_get s (pos+20) = 'i' && String.unsafe_get s (pos+21) = 'm' && String.unsafe_get s (pos+22) = 'a' && String.unsafe_get s (pos+23) = 'g' && String.unsafe_get s (pos+24) = 'e' && String.unsafe_get s (pos+25) = '_' && String.unsafe_get s (pos+26) = 'u' && String.unsafe_get s (pos+27) = 'r' && String.unsafe_get s (pos+28) = 'l' then ( - 18 + 17 ) else ( -1 @@ -15808,14 +15790,6 @@ let read_project_metadata = ( ( match i with | 0 -> - field_semgrep_version := ( - Some ( - ( - read_version - ) p lb - ) - ); - | 1 -> field_scan_environment := ( Some ( ( @@ -15823,7 +15797,7 @@ let read_project_metadata = ( ) p lb ) ); - | 2 -> + | 1 -> field_repository := ( Some ( ( @@ -15831,7 +15805,7 @@ let read_project_metadata = ( ) p lb ) ); - | 3 -> + | 2 -> field_repo_url := ( Some ( ( @@ -15839,7 +15813,7 @@ let read_project_metadata = ( ) p lb ) ); - | 4 -> + | 3 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_repo_id := ( Some ( @@ -15849,7 +15823,7 @@ let read_project_metadata = ( ) ); ) - | 5 -> + | 4 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_org_id := ( Some ( @@ -15859,7 +15833,7 @@ let read_project_metadata = ( ) ); ) - | 6 -> + | 5 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_repo_display_name := ( Some ( @@ -15869,7 +15843,7 @@ let read_project_metadata = ( ) ); ) - | 7 -> + | 6 -> field_branch := ( Some ( ( @@ -15877,7 +15851,7 @@ let read_project_metadata = ( ) p lb ) ); - | 8 -> + | 7 -> field_commit := ( Some ( ( @@ -15885,7 +15859,7 @@ let read_project_metadata = ( ) p lb ) ); - | 9 -> + | 8 -> field_commit_title := ( Some ( ( @@ -15893,7 +15867,7 @@ let read_project_metadata = ( ) p lb ) ); - | 10 -> + | 9 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_commit_timestamp := ( Some ( @@ -15903,7 +15877,7 @@ let read_project_metadata = ( ) ); ) - | 11 -> + | 10 -> field_commit_author_email := ( Some ( ( @@ -15911,7 +15885,7 @@ let read_project_metadata = ( ) p lb ) ); - | 12 -> + | 11 -> field_commit_author_name := ( Some ( ( @@ -15919,7 +15893,7 @@ let read_project_metadata = ( ) p lb ) ); - | 13 -> + | 12 -> field_commit_author_username := ( Some ( ( @@ -15927,7 +15901,7 @@ let read_project_metadata = ( ) p lb ) ); - | 14 -> + | 13 -> field_commit_author_image_url := ( Some ( ( @@ -15935,7 +15909,7 @@ let read_project_metadata = ( ) p lb ) ); - | 15 -> + | 14 -> field_ci_job_url := ( Some ( ( @@ -15943,7 +15917,7 @@ let read_project_metadata = ( ) p lb ) ); - | 16 -> + | 15 -> field_on := ( Some ( ( @@ -15951,7 +15925,7 @@ let read_project_metadata = ( ) p lb ) ); - | 17 -> + | 16 -> field_pull_request_author_username := ( Some ( ( @@ -15959,7 +15933,7 @@ let read_project_metadata = ( ) p lb ) ); - | 18 -> + | 17 -> field_pull_request_author_image_url := ( Some ( ( @@ -15967,7 +15941,7 @@ let read_project_metadata = ( ) p lb ) ); - | 19 -> + | 18 -> field_pull_request_id := ( Some ( ( @@ -15975,7 +15949,7 @@ let read_project_metadata = ( ) p lb ) ); - | 20 -> + | 19 -> field_pull_request_title := ( Some ( ( @@ -15983,7 +15957,7 @@ let read_project_metadata = ( ) p lb ) ); - | 21 -> + | 20 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_base_sha := ( Some ( @@ -15993,7 +15967,7 @@ let read_project_metadata = ( ) ); ) - | 22 -> + | 21 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_start_sha := ( Some ( @@ -16003,7 +15977,7 @@ let read_project_metadata = ( ) ); ) - | 23 -> + | 22 -> field_is_full_scan := ( Some ( ( @@ -16011,7 +15985,7 @@ let read_project_metadata = ( ) p lb ) ); - | 24 -> + | 23 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_is_sca_scan := ( Some ( @@ -16021,7 +15995,7 @@ let read_project_metadata = ( ) ); ) - | 25 -> + | 24 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_is_code_scan := ( Some ( @@ -16031,7 +16005,7 @@ let read_project_metadata = ( ) ); ) - | 26 -> + | 25 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_is_secrets_scan := ( Some ( @@ -16056,7 +16030,7 @@ let read_project_metadata = ( match len with | 2 -> ( if String.unsafe_get s pos = 'o' && String.unsafe_get s (pos+1) = 'n' then ( - 16 + 15 ) else ( -1 @@ -16066,7 +16040,7 @@ let read_project_metadata = ( match String.unsafe_get s pos with | 'b' -> ( if String.unsafe_get s (pos+1) = 'r' && String.unsafe_get s (pos+2) = 'a' && String.unsafe_get s (pos+3) = 'n' && String.unsafe_get s (pos+4) = 'c' && String.unsafe_get s (pos+5) = 'h' then ( - 7 + 6 ) else ( -1 @@ -16074,7 +16048,7 @@ let read_project_metadata = ( ) | 'c' -> ( if String.unsafe_get s (pos+1) = 'o' && String.unsafe_get s (pos+2) = 'm' && String.unsafe_get s (pos+3) = 'm' && String.unsafe_get s (pos+4) = 'i' && String.unsafe_get s (pos+5) = 't' then ( - 8 + 7 ) else ( -1 @@ -16082,7 +16056,7 @@ let read_project_metadata = ( ) | 'o' -> ( if String.unsafe_get s (pos+1) = 'r' && String.unsafe_get s (pos+2) = 'g' && String.unsafe_get s (pos+3) = '_' && String.unsafe_get s (pos+4) = 'i' && String.unsafe_get s (pos+5) = 'd' then ( - 5 + 4 ) else ( -1 @@ -16094,7 +16068,7 @@ let read_project_metadata = ( ) | 7 -> ( if String.unsafe_get s pos = 'r' && String.unsafe_get s (pos+1) = 'e' && String.unsafe_get s (pos+2) = 'p' && String.unsafe_get s (pos+3) = 'o' && String.unsafe_get s (pos+4) = '_' && String.unsafe_get s (pos+5) = 'i' && String.unsafe_get s (pos+6) = 'd' then ( - 4 + 3 ) else ( -1 @@ -16104,7 +16078,7 @@ let read_project_metadata = ( match String.unsafe_get s pos with | 'b' -> ( if String.unsafe_get s (pos+1) = 'a' && String.unsafe_get s (pos+2) = 's' && String.unsafe_get s (pos+3) = 'e' && String.unsafe_get s (pos+4) = '_' && String.unsafe_get s (pos+5) = 's' && String.unsafe_get s (pos+6) = 'h' && String.unsafe_get s (pos+7) = 'a' then ( - 21 + 20 ) else ( -1 @@ -16112,7 +16086,7 @@ let read_project_metadata = ( ) | 'r' -> ( if String.unsafe_get s (pos+1) = 'e' && String.unsafe_get s (pos+2) = 'p' && String.unsafe_get s (pos+3) = 'o' && String.unsafe_get s (pos+4) = '_' && String.unsafe_get s (pos+5) = 'u' && String.unsafe_get s (pos+6) = 'r' && String.unsafe_get s (pos+7) = 'l' then ( - 3 + 2 ) else ( -1 @@ -16124,7 +16098,7 @@ let read_project_metadata = ( ) | 9 -> ( if String.unsafe_get s pos = 's' && String.unsafe_get s (pos+1) = 't' && String.unsafe_get s (pos+2) = 'a' && String.unsafe_get s (pos+3) = 'r' && String.unsafe_get s (pos+4) = 't' && String.unsafe_get s (pos+5) = '_' && String.unsafe_get s (pos+6) = 's' && String.unsafe_get s (pos+7) = 'h' && String.unsafe_get s (pos+8) = 'a' then ( - 22 + 21 ) else ( -1 @@ -16134,7 +16108,7 @@ let read_project_metadata = ( 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) = 'j' && String.unsafe_get s (pos+4) = 'o' && String.unsafe_get s (pos+5) = 'b' && String.unsafe_get s (pos+6) = '_' && String.unsafe_get s (pos+7) = 'u' && String.unsafe_get s (pos+8) = 'r' && String.unsafe_get s (pos+9) = 'l' then ( - 15 + 14 ) else ( -1 @@ -16142,7 +16116,7 @@ let read_project_metadata = ( ) | 'r' -> ( if String.unsafe_get s (pos+1) = 'e' && String.unsafe_get s (pos+2) = 'p' && String.unsafe_get s (pos+3) = 'o' && String.unsafe_get s (pos+4) = 's' && String.unsafe_get s (pos+5) = 'i' && String.unsafe_get s (pos+6) = 't' && String.unsafe_get s (pos+7) = 'o' && String.unsafe_get s (pos+8) = 'r' && String.unsafe_get s (pos+9) = 'y' then ( - 2 + 1 ) else ( -1 @@ -16154,7 +16128,7 @@ let read_project_metadata = ( ) | 11 -> ( if String.unsafe_get s pos = 'i' && String.unsafe_get s (pos+1) = 's' && String.unsafe_get s (pos+2) = '_' && String.unsafe_get s (pos+3) = 's' && String.unsafe_get s (pos+4) = 'c' && String.unsafe_get s (pos+5) = 'a' && String.unsafe_get s (pos+6) = '_' && String.unsafe_get s (pos+7) = 's' && String.unsafe_get s (pos+8) = 'c' && String.unsafe_get s (pos+9) = 'a' && String.unsafe_get s (pos+10) = 'n' then ( - 24 + 23 ) else ( -1 @@ -16164,7 +16138,7 @@ let read_project_metadata = ( match String.unsafe_get s pos with | 'c' -> ( if String.unsafe_get s (pos+1) = 'o' && String.unsafe_get s (pos+2) = 'm' && String.unsafe_get s (pos+3) = 'm' && String.unsafe_get s (pos+4) = 'i' && String.unsafe_get s (pos+5) = 't' && String.unsafe_get s (pos+6) = '_' && String.unsafe_get s (pos+7) = 't' && String.unsafe_get s (pos+8) = 'i' && String.unsafe_get s (pos+9) = 't' && String.unsafe_get s (pos+10) = 'l' && String.unsafe_get s (pos+11) = 'e' then ( - 9 + 8 ) else ( -1 @@ -16175,7 +16149,7 @@ let read_project_metadata = ( match String.unsafe_get s (pos+3) with | 'c' -> ( if String.unsafe_get s (pos+4) = 'o' && String.unsafe_get s (pos+5) = 'd' && String.unsafe_get s (pos+6) = 'e' && String.unsafe_get s (pos+7) = '_' && String.unsafe_get s (pos+8) = 's' && String.unsafe_get s (pos+9) = 'c' && String.unsafe_get s (pos+10) = 'a' && String.unsafe_get s (pos+11) = 'n' then ( - 25 + 24 ) else ( -1 @@ -16183,7 +16157,7 @@ let read_project_metadata = ( ) | 'f' -> ( if String.unsafe_get s (pos+4) = 'u' && String.unsafe_get s (pos+5) = 'l' && String.unsafe_get s (pos+6) = 'l' && String.unsafe_get s (pos+7) = '_' && String.unsafe_get s (pos+8) = 's' && String.unsafe_get s (pos+9) = 'c' && String.unsafe_get s (pos+10) = 'a' && String.unsafe_get s (pos+11) = 'n' then ( - 23 + 22 ) else ( -1 @@ -16205,7 +16179,7 @@ let read_project_metadata = ( match String.unsafe_get s pos with | 'i' -> ( if String.unsafe_get s (pos+1) = 's' && String.unsafe_get s (pos+2) = '_' && String.unsafe_get s (pos+3) = 's' && String.unsafe_get s (pos+4) = 'e' && String.unsafe_get s (pos+5) = 'c' && String.unsafe_get s (pos+6) = 'r' && String.unsafe_get s (pos+7) = 'e' && String.unsafe_get s (pos+8) = 't' && String.unsafe_get s (pos+9) = 's' && String.unsafe_get s (pos+10) = '_' && String.unsafe_get s (pos+11) = 's' && String.unsafe_get s (pos+12) = 'c' && String.unsafe_get s (pos+13) = 'a' && String.unsafe_get s (pos+14) = 'n' then ( - 26 + 25 ) else ( -1 @@ -16213,15 +16187,7 @@ let read_project_metadata = ( ) | 'p' -> ( if String.unsafe_get s (pos+1) = 'u' && String.unsafe_get s (pos+2) = 'l' && String.unsafe_get s (pos+3) = 'l' && String.unsafe_get s (pos+4) = '_' && String.unsafe_get s (pos+5) = 'r' && String.unsafe_get s (pos+6) = 'e' && String.unsafe_get s (pos+7) = 'q' && String.unsafe_get s (pos+8) = 'u' && String.unsafe_get s (pos+9) = 'e' && String.unsafe_get s (pos+10) = 's' && String.unsafe_get s (pos+11) = 't' && String.unsafe_get s (pos+12) = '_' && String.unsafe_get s (pos+13) = 'i' && String.unsafe_get s (pos+14) = 'd' then ( - 19 - ) - else ( - -1 - ) - ) - | 's' -> ( - if String.unsafe_get s (pos+1) = 'e' && String.unsafe_get s (pos+2) = 'm' && String.unsafe_get s (pos+3) = 'g' && String.unsafe_get s (pos+4) = 'r' && String.unsafe_get s (pos+5) = 'e' && String.unsafe_get s (pos+6) = 'p' && String.unsafe_get s (pos+7) = '_' && String.unsafe_get s (pos+8) = 'v' && String.unsafe_get s (pos+9) = 'e' && String.unsafe_get s (pos+10) = 'r' && String.unsafe_get s (pos+11) = 's' && String.unsafe_get s (pos+12) = 'i' && String.unsafe_get s (pos+13) = 'o' && String.unsafe_get s (pos+14) = 'n' then ( - 0 + 18 ) else ( -1 @@ -16235,7 +16201,7 @@ let read_project_metadata = ( match String.unsafe_get s pos with | 'c' -> ( if String.unsafe_get s (pos+1) = 'o' && String.unsafe_get s (pos+2) = 'm' && String.unsafe_get s (pos+3) = 'm' && String.unsafe_get s (pos+4) = 'i' && String.unsafe_get s (pos+5) = 't' && String.unsafe_get s (pos+6) = '_' && String.unsafe_get s (pos+7) = 't' && String.unsafe_get s (pos+8) = 'i' && String.unsafe_get s (pos+9) = 'm' && String.unsafe_get s (pos+10) = 'e' && String.unsafe_get s (pos+11) = 's' && String.unsafe_get s (pos+12) = 't' && String.unsafe_get s (pos+13) = 'a' && String.unsafe_get s (pos+14) = 'm' && String.unsafe_get s (pos+15) = 'p' then ( - 10 + 9 ) else ( -1 @@ -16243,7 +16209,7 @@ let read_project_metadata = ( ) | 's' -> ( if String.unsafe_get s (pos+1) = 'c' && String.unsafe_get s (pos+2) = 'a' && String.unsafe_get s (pos+3) = 'n' && String.unsafe_get s (pos+4) = '_' && String.unsafe_get s (pos+5) = 'e' && String.unsafe_get s (pos+6) = 'n' && String.unsafe_get s (pos+7) = 'v' && String.unsafe_get s (pos+8) = 'i' && String.unsafe_get s (pos+9) = 'r' && String.unsafe_get s (pos+10) = 'o' && String.unsafe_get s (pos+11) = 'n' && String.unsafe_get s (pos+12) = 'm' && String.unsafe_get s (pos+13) = 'e' && String.unsafe_get s (pos+14) = 'n' && String.unsafe_get s (pos+15) = 't' then ( - 1 + 0 ) else ( -1 @@ -16255,7 +16221,7 @@ let read_project_metadata = ( ) | 17 -> ( if String.unsafe_get s pos = 'r' && String.unsafe_get s (pos+1) = 'e' && String.unsafe_get s (pos+2) = 'p' && String.unsafe_get s (pos+3) = 'o' && String.unsafe_get s (pos+4) = '_' && String.unsafe_get s (pos+5) = 'd' && String.unsafe_get s (pos+6) = 'i' && String.unsafe_get s (pos+7) = 's' && String.unsafe_get s (pos+8) = 'p' && String.unsafe_get s (pos+9) = 'l' && String.unsafe_get s (pos+10) = 'a' && String.unsafe_get s (pos+11) = 'y' && String.unsafe_get s (pos+12) = '_' && String.unsafe_get s (pos+13) = 'n' && String.unsafe_get s (pos+14) = 'a' && String.unsafe_get s (pos+15) = 'm' && String.unsafe_get s (pos+16) = 'e' then ( - 6 + 5 ) else ( -1 @@ -16265,7 +16231,7 @@ let read_project_metadata = ( match String.unsafe_get s pos with | 'c' -> ( if String.unsafe_get s (pos+1) = 'o' && String.unsafe_get s (pos+2) = 'm' && String.unsafe_get s (pos+3) = 'm' && String.unsafe_get s (pos+4) = 'i' && String.unsafe_get s (pos+5) = 't' && String.unsafe_get s (pos+6) = '_' && String.unsafe_get s (pos+7) = 'a' && String.unsafe_get s (pos+8) = 'u' && String.unsafe_get s (pos+9) = 't' && String.unsafe_get s (pos+10) = 'h' && String.unsafe_get s (pos+11) = 'o' && String.unsafe_get s (pos+12) = 'r' && String.unsafe_get s (pos+13) = '_' && String.unsafe_get s (pos+14) = 'n' && String.unsafe_get s (pos+15) = 'a' && String.unsafe_get s (pos+16) = 'm' && String.unsafe_get s (pos+17) = 'e' then ( - 12 + 11 ) else ( -1 @@ -16273,7 +16239,7 @@ let read_project_metadata = ( ) | 'p' -> ( if String.unsafe_get s (pos+1) = 'u' && String.unsafe_get s (pos+2) = 'l' && String.unsafe_get s (pos+3) = 'l' && String.unsafe_get s (pos+4) = '_' && String.unsafe_get s (pos+5) = 'r' && String.unsafe_get s (pos+6) = 'e' && String.unsafe_get s (pos+7) = 'q' && String.unsafe_get s (pos+8) = 'u' && String.unsafe_get s (pos+9) = 'e' && String.unsafe_get s (pos+10) = 's' && String.unsafe_get s (pos+11) = 't' && String.unsafe_get s (pos+12) = '_' && String.unsafe_get s (pos+13) = 't' && String.unsafe_get s (pos+14) = 'i' && String.unsafe_get s (pos+15) = 't' && String.unsafe_get s (pos+16) = 'l' && String.unsafe_get s (pos+17) = 'e' then ( - 20 + 19 ) else ( -1 @@ -16285,7 +16251,7 @@ let read_project_metadata = ( ) | 19 -> ( if String.unsafe_get s pos = 'c' && String.unsafe_get s (pos+1) = 'o' && String.unsafe_get s (pos+2) = 'm' && String.unsafe_get s (pos+3) = 'm' && String.unsafe_get s (pos+4) = 'i' && String.unsafe_get s (pos+5) = 't' && String.unsafe_get s (pos+6) = '_' && String.unsafe_get s (pos+7) = 'a' && String.unsafe_get s (pos+8) = 'u' && String.unsafe_get s (pos+9) = 't' && String.unsafe_get s (pos+10) = 'h' && String.unsafe_get s (pos+11) = 'o' && String.unsafe_get s (pos+12) = 'r' && String.unsafe_get s (pos+13) = '_' && String.unsafe_get s (pos+14) = 'e' && String.unsafe_get s (pos+15) = 'm' && String.unsafe_get s (pos+16) = 'a' && String.unsafe_get s (pos+17) = 'i' && String.unsafe_get s (pos+18) = 'l' then ( - 11 + 10 ) else ( -1 @@ -16293,7 +16259,7 @@ let read_project_metadata = ( ) | 22 -> ( if String.unsafe_get s pos = 'c' && String.unsafe_get s (pos+1) = 'o' && String.unsafe_get s (pos+2) = 'm' && String.unsafe_get s (pos+3) = 'm' && String.unsafe_get s (pos+4) = 'i' && String.unsafe_get s (pos+5) = 't' && String.unsafe_get s (pos+6) = '_' && String.unsafe_get s (pos+7) = 'a' && String.unsafe_get s (pos+8) = 'u' && String.unsafe_get s (pos+9) = 't' && String.unsafe_get s (pos+10) = 'h' && String.unsafe_get s (pos+11) = 'o' && String.unsafe_get s (pos+12) = 'r' && String.unsafe_get s (pos+13) = '_' && String.unsafe_get s (pos+14) = 'u' && String.unsafe_get s (pos+15) = 's' && String.unsafe_get s (pos+16) = 'e' && String.unsafe_get s (pos+17) = 'r' && String.unsafe_get s (pos+18) = 'n' && String.unsafe_get s (pos+19) = 'a' && String.unsafe_get s (pos+20) = 'm' && String.unsafe_get s (pos+21) = 'e' then ( - 13 + 12 ) else ( -1 @@ -16301,7 +16267,7 @@ let read_project_metadata = ( ) | 23 -> ( if String.unsafe_get s pos = 'c' && String.unsafe_get s (pos+1) = 'o' && String.unsafe_get s (pos+2) = 'm' && String.unsafe_get s (pos+3) = 'm' && String.unsafe_get s (pos+4) = 'i' && String.unsafe_get s (pos+5) = 't' && String.unsafe_get s (pos+6) = '_' && String.unsafe_get s (pos+7) = 'a' && String.unsafe_get s (pos+8) = 'u' && String.unsafe_get s (pos+9) = 't' && String.unsafe_get s (pos+10) = 'h' && String.unsafe_get s (pos+11) = 'o' && String.unsafe_get s (pos+12) = 'r' && String.unsafe_get s (pos+13) = '_' && String.unsafe_get s (pos+14) = 'i' && String.unsafe_get s (pos+15) = 'm' && String.unsafe_get s (pos+16) = 'a' && String.unsafe_get s (pos+17) = 'g' && String.unsafe_get s (pos+18) = 'e' && String.unsafe_get s (pos+19) = '_' && String.unsafe_get s (pos+20) = 'u' && String.unsafe_get s (pos+21) = 'r' && String.unsafe_get s (pos+22) = 'l' then ( - 14 + 13 ) else ( -1 @@ -16309,7 +16275,7 @@ let read_project_metadata = ( ) | 28 -> ( if String.unsafe_get s pos = 'p' && String.unsafe_get s (pos+1) = 'u' && String.unsafe_get s (pos+2) = 'l' && String.unsafe_get s (pos+3) = 'l' && String.unsafe_get s (pos+4) = '_' && String.unsafe_get s (pos+5) = 'r' && String.unsafe_get s (pos+6) = 'e' && String.unsafe_get s (pos+7) = 'q' && String.unsafe_get s (pos+8) = 'u' && String.unsafe_get s (pos+9) = 'e' && String.unsafe_get s (pos+10) = 's' && String.unsafe_get s (pos+11) = 't' && String.unsafe_get s (pos+12) = '_' && String.unsafe_get s (pos+13) = 'a' && String.unsafe_get s (pos+14) = 'u' && String.unsafe_get s (pos+15) = 't' && String.unsafe_get s (pos+16) = 'h' && String.unsafe_get s (pos+17) = 'o' && String.unsafe_get s (pos+18) = 'r' && String.unsafe_get s (pos+19) = '_' && String.unsafe_get s (pos+20) = 'u' && String.unsafe_get s (pos+21) = 's' && String.unsafe_get s (pos+22) = 'e' && String.unsafe_get s (pos+23) = 'r' && String.unsafe_get s (pos+24) = 'n' && String.unsafe_get s (pos+25) = 'a' && String.unsafe_get s (pos+26) = 'm' && String.unsafe_get s (pos+27) = 'e' then ( - 17 + 16 ) else ( -1 @@ -16317,7 +16283,7 @@ let read_project_metadata = ( ) | 29 -> ( if String.unsafe_get s pos = 'p' && String.unsafe_get s (pos+1) = 'u' && String.unsafe_get s (pos+2) = 'l' && String.unsafe_get s (pos+3) = 'l' && String.unsafe_get s (pos+4) = '_' && String.unsafe_get s (pos+5) = 'r' && String.unsafe_get s (pos+6) = 'e' && String.unsafe_get s (pos+7) = 'q' && String.unsafe_get s (pos+8) = 'u' && String.unsafe_get s (pos+9) = 'e' && String.unsafe_get s (pos+10) = 's' && String.unsafe_get s (pos+11) = 't' && String.unsafe_get s (pos+12) = '_' && String.unsafe_get s (pos+13) = 'a' && String.unsafe_get s (pos+14) = 'u' && String.unsafe_get s (pos+15) = 't' && String.unsafe_get s (pos+16) = 'h' && String.unsafe_get s (pos+17) = 'o' && String.unsafe_get s (pos+18) = 'r' && String.unsafe_get s (pos+19) = '_' && String.unsafe_get s (pos+20) = 'i' && String.unsafe_get s (pos+21) = 'm' && String.unsafe_get s (pos+22) = 'a' && String.unsafe_get s (pos+23) = 'g' && String.unsafe_get s (pos+24) = 'e' && String.unsafe_get s (pos+25) = '_' && String.unsafe_get s (pos+26) = 'u' && String.unsafe_get s (pos+27) = 'r' && String.unsafe_get s (pos+28) = 'l' then ( - 18 + 17 ) else ( -1 @@ -16332,14 +16298,6 @@ let read_project_metadata = ( ( match i with | 0 -> - field_semgrep_version := ( - Some ( - ( - read_version - ) p lb - ) - ); - | 1 -> field_scan_environment := ( Some ( ( @@ -16347,7 +16305,7 @@ let read_project_metadata = ( ) p lb ) ); - | 2 -> + | 1 -> field_repository := ( Some ( ( @@ -16355,7 +16313,7 @@ let read_project_metadata = ( ) p lb ) ); - | 3 -> + | 2 -> field_repo_url := ( Some ( ( @@ -16363,7 +16321,7 @@ let read_project_metadata = ( ) p lb ) ); - | 4 -> + | 3 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_repo_id := ( Some ( @@ -16373,7 +16331,7 @@ let read_project_metadata = ( ) ); ) - | 5 -> + | 4 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_org_id := ( Some ( @@ -16383,7 +16341,7 @@ let read_project_metadata = ( ) ); ) - | 6 -> + | 5 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_repo_display_name := ( Some ( @@ -16393,7 +16351,7 @@ let read_project_metadata = ( ) ); ) - | 7 -> + | 6 -> field_branch := ( Some ( ( @@ -16401,7 +16359,7 @@ let read_project_metadata = ( ) p lb ) ); - | 8 -> + | 7 -> field_commit := ( Some ( ( @@ -16409,7 +16367,7 @@ let read_project_metadata = ( ) p lb ) ); - | 9 -> + | 8 -> field_commit_title := ( Some ( ( @@ -16417,7 +16375,7 @@ let read_project_metadata = ( ) p lb ) ); - | 10 -> + | 9 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_commit_timestamp := ( Some ( @@ -16427,7 +16385,7 @@ let read_project_metadata = ( ) ); ) - | 11 -> + | 10 -> field_commit_author_email := ( Some ( ( @@ -16435,7 +16393,7 @@ let read_project_metadata = ( ) p lb ) ); - | 12 -> + | 11 -> field_commit_author_name := ( Some ( ( @@ -16443,7 +16401,7 @@ let read_project_metadata = ( ) p lb ) ); - | 13 -> + | 12 -> field_commit_author_username := ( Some ( ( @@ -16451,7 +16409,7 @@ let read_project_metadata = ( ) p lb ) ); - | 14 -> + | 13 -> field_commit_author_image_url := ( Some ( ( @@ -16459,7 +16417,7 @@ let read_project_metadata = ( ) p lb ) ); - | 15 -> + | 14 -> field_ci_job_url := ( Some ( ( @@ -16467,7 +16425,7 @@ let read_project_metadata = ( ) p lb ) ); - | 16 -> + | 15 -> field_on := ( Some ( ( @@ -16475,7 +16433,7 @@ let read_project_metadata = ( ) p lb ) ); - | 17 -> + | 16 -> field_pull_request_author_username := ( Some ( ( @@ -16483,7 +16441,7 @@ let read_project_metadata = ( ) p lb ) ); - | 18 -> + | 17 -> field_pull_request_author_image_url := ( Some ( ( @@ -16491,7 +16449,7 @@ let read_project_metadata = ( ) p lb ) ); - | 19 -> + | 18 -> field_pull_request_id := ( Some ( ( @@ -16499,7 +16457,7 @@ let read_project_metadata = ( ) p lb ) ); - | 20 -> + | 19 -> field_pull_request_title := ( Some ( ( @@ -16507,7 +16465,7 @@ let read_project_metadata = ( ) p lb ) ); - | 21 -> + | 20 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_base_sha := ( Some ( @@ -16517,7 +16475,7 @@ let read_project_metadata = ( ) ); ) - | 22 -> + | 21 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_start_sha := ( Some ( @@ -16527,7 +16485,7 @@ let read_project_metadata = ( ) ); ) - | 23 -> + | 22 -> field_is_full_scan := ( Some ( ( @@ -16535,7 +16493,7 @@ let read_project_metadata = ( ) p lb ) ); - | 24 -> + | 23 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_is_sca_scan := ( Some ( @@ -16545,7 +16503,7 @@ let read_project_metadata = ( ) ); ) - | 25 -> + | 24 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_is_code_scan := ( Some ( @@ -16555,7 +16513,7 @@ let read_project_metadata = ( ) ); ) - | 26 -> + | 25 -> if not (Yojson.Safe.read_null_if_possible p lb) then ( field_is_secrets_scan := ( Some ( @@ -16574,7 +16532,6 @@ let read_project_metadata = ( with Yojson.End_of_object -> ( ( { - semgrep_version = (match !field_semgrep_version with Some x -> x | None -> Atdgen_runtime.Oj_run.missing_field p "semgrep_version"); scan_environment = (match !field_scan_environment with Some x -> x | None -> Atdgen_runtime.Oj_run.missing_field p "scan_environment"); repository = (match !field_repository with Some x -> x | None -> Atdgen_runtime.Oj_run.missing_field p "repository"); repo_url = (match !field_repo_url with Some x -> x | None -> Atdgen_runtime.Oj_run.missing_field p "repo_url"); @@ -16929,17 +16886,6 @@ let write_scan_request : _ -> scan_request -> _ = ( ) ob x; ); - (match x.meta with None -> () | Some x -> - if !is_first then - is_first := false - else - Buffer.add_char ob ','; - Buffer.add_string ob "\"meta\":"; - ( - write_raw_json - ) - ob x; - ); Buffer.add_char ob '}'; ) let string_of_scan_request ?(len = 1024) x = @@ -16953,7 +16899,6 @@ let read_scan_request = ( let field_project_metadata = ref (None) in let field_scan_metadata = ref (None) in let field_project_config = ref (None) in - let field_meta = ref (None) in try Yojson.Safe.read_space p lb; Yojson.Safe.read_object_end lb; @@ -16963,14 +16908,6 @@ let read_scan_request = ( if pos < 0 || len < 0 || pos + len > String.length s then invalid_arg (Printf.sprintf "out-of-bounds substring position or length: string = %S, requested position = %i, requested length = %i" s pos len); match len with - | 4 -> ( - if String.unsafe_get s pos = 'm' && String.unsafe_get s (pos+1) = 'e' && String.unsafe_get s (pos+2) = 't' && String.unsafe_get s (pos+3) = 'a' then ( - 3 - ) - else ( - -1 - ) - ) | 13 -> ( if String.unsafe_get s pos = 's' && String.unsafe_get s (pos+1) = 'c' && String.unsafe_get s (pos+2) = 'a' && String.unsafe_get s (pos+3) = 'n' && String.unsafe_get s (pos+4) = '_' && String.unsafe_get s (pos+5) = 'm' && String.unsafe_get s (pos+6) = 'e' && String.unsafe_get s (pos+7) = 't' && String.unsafe_get s (pos+8) = 'a' && String.unsafe_get s (pos+9) = 'd' && String.unsafe_get s (pos+10) = 'a' && String.unsafe_get s (pos+11) = 't' && String.unsafe_get s (pos+12) = 'a' then ( 1 @@ -17029,16 +16966,6 @@ let read_scan_request = ( ) ); ) - | 3 -> - if not (Yojson.Safe.read_null_if_possible p lb) then ( - field_meta := ( - Some ( - ( - read_raw_json - ) p lb - ) - ); - ) | _ -> ( Yojson.Safe.skip_json p lb ) @@ -17052,14 +16979,6 @@ let read_scan_request = ( if pos < 0 || len < 0 || pos + len > String.length s then invalid_arg (Printf.sprintf "out-of-bounds substring position or length: string = %S, requested position = %i, requested length = %i" s pos len); match len with - | 4 -> ( - if String.unsafe_get s pos = 'm' && String.unsafe_get s (pos+1) = 'e' && String.unsafe_get s (pos+2) = 't' && String.unsafe_get s (pos+3) = 'a' then ( - 3 - ) - else ( - -1 - ) - ) | 13 -> ( if String.unsafe_get s pos = 's' && String.unsafe_get s (pos+1) = 'c' && String.unsafe_get s (pos+2) = 'a' && String.unsafe_get s (pos+3) = 'n' && String.unsafe_get s (pos+4) = '_' && String.unsafe_get s (pos+5) = 'm' && String.unsafe_get s (pos+6) = 'e' && String.unsafe_get s (pos+7) = 't' && String.unsafe_get s (pos+8) = 'a' && String.unsafe_get s (pos+9) = 'd' && String.unsafe_get s (pos+10) = 'a' && String.unsafe_get s (pos+11) = 't' && String.unsafe_get s (pos+12) = 'a' then ( 1 @@ -17118,16 +17037,6 @@ let read_scan_request = ( ) ); ) - | 3 -> - if not (Yojson.Safe.read_null_if_possible p lb) then ( - field_meta := ( - Some ( - ( - read_raw_json - ) p lb - ) - ); - ) | _ -> ( Yojson.Safe.skip_json p lb ) @@ -17140,7 +17049,6 @@ let read_scan_request = ( project_metadata = (match !field_project_metadata with Some x -> x | None -> Atdgen_runtime.Oj_run.missing_field p "project_metadata"); scan_metadata = (match !field_scan_metadata with Some x -> x | None -> Atdgen_runtime.Oj_run.missing_field p "scan_metadata"); project_config = !field_project_config; - meta = !field_meta; } : scan_request) ) diff --git a/semgrep_output_v1_j.mli b/semgrep_output_v1_j.mli index 2b5c422c..ec325190 100644 --- a/semgrep_output_v1_j.mli +++ b/semgrep_output_v1_j.mli @@ -240,7 +240,9 @@ type rule_result = Semgrep_output_v1_t.rule_result = { type fixtest_result = Semgrep_output_v1_t.fixtest_result = { passed: bool } -type config_error_reason = Semgrep_output_v1_t.config_error_reason +type config_error_reason = Semgrep_output_v1_t.config_error_reason = + UnparsableRule + type config_error = Semgrep_output_v1_t.config_error = { file: fpath; @@ -408,7 +410,6 @@ type scan_metadata = Semgrep_output_v1_t.scan_metadata = { } type project_metadata = Semgrep_output_v1_t.project_metadata = { - semgrep_version: version; scan_environment: string; repository: string; repo_url: uri option; @@ -445,8 +446,7 @@ type ci_config_from_repo = Semgrep_output_v1_t.ci_config_from_repo = { type scan_request = Semgrep_output_v1_t.scan_request = { project_metadata: project_metadata; scan_metadata: scan_metadata; - project_config: ci_config_from_repo option; - meta: raw_json option + project_config: ci_config_from_repo option } type ci_env = Semgrep_output_v1_t.ci_env