Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove semgrep_version from project_metadata and meta from scan_request #333

Merged
merged 2 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 7 additions & 15 deletions semgrep_output_v1.atd
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ type uuid = string wrap <ocaml module="ATD_string_wrap.Uuidm">
(* RFC 3339 format *)
type datetime = string wrap <ocaml module="ATD_string_wrap.Datetime">

type glob = string

(*****************************************************************************)
(* Versioning *)
(*****************************************************************************)
Expand Down Expand Up @@ -494,6 +496,7 @@ type match_intermediate_var <python decorator="dataclass(frozen=True)"> = {
(* 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 <ocaml repr="classic">, and do the same for manifest
*)
type ecosystem
<python decorator="dataclass(frozen=True)">
Expand Down Expand Up @@ -595,6 +598,7 @@ type dependency_child <python decorator="dataclass(frozen=True)"> = {
* 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 <ocaml repr="classic">
*)
type validation_state
<ocaml attr="deriving show, eq">
Expand Down Expand Up @@ -948,7 +952,7 @@ type cli_output_extra = {

type config_error_reason = [
| UnparsableRule <json name="unparsable_rule">
]
] <ocaml repr="classic">

type config_error = {
file: fpath;
Expand Down Expand Up @@ -1291,8 +1295,6 @@ type engine_configuration = {
~always_suppress_errors: bool;
}

type glob = string

type product_ignored_files = (product * glob list) list
(* We omit the usual <json repr="object"> otherwise we get a
* "keys must be strings" error *)
Expand All @@ -1319,18 +1321,9 @@ type deployment_response = {

(* 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;
}

(* Collect information about a project from the environment, filesystem,
Expand All @@ -1340,9 +1333,6 @@ type scan_request = {
* clearer (while still being backward compatible)
*)
type project_metadata = {
(* TODO: deprecate in favor of scan_metadata.cli_version *)
semgrep_version: version;

(* TODO: use enum with <json name="..."> *)
(* "git" | "github-actions" | "gitlab-ci" | "circleci"
* "jenkins" | "bitbucket" | "azure-pipelines" | "buildkite" | "travis-ci"
Expand Down Expand Up @@ -1657,6 +1647,7 @@ type dependency_parser_error = {

(* json names are to maintain backwards compatibility with the python enum it
* is replacing
* TODO: use <ocaml repr="classic">
*)
type sca_parser_name = [
| Gemfile_lock <json name="gemfile_lock">
Expand Down Expand Up @@ -2015,6 +2006,7 @@ type lockfile_kind
| ConanLock
] <ocaml repr="classic">

(* TODO: use <ocaml repr="classic"> *)
type manifest_kind
<ocaml attr="deriving show, eq">
<python decorator="dataclass(frozen=True)"> =
Expand Down
18 changes: 8 additions & 10 deletions semgrep_output_v1.jsonschema

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions semgrep_output_v1.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions semgrep_output_v1.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 10 additions & 16 deletions semgrep_output_v1.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading