Skip to content

Commit

Permalink
simplifya
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcqd committed Dec 5, 2024
1 parent f5beed6 commit 0f07814
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 306 deletions.
21 changes: 2 additions & 19 deletions semgrep_output_v1.atd
Original file line number Diff line number Diff line change
Expand Up @@ -1617,32 +1617,15 @@ type parsing_stats = {
num_bytes: int;
}

(*
Policy/automation related data the app wants the CLI to know about
certain findings. Right now this is only used for the app to cause
a CI scan to block, so 'kind' can only ever be "block". The list
of match_based_ids are the MIDs of the findings that the action
relates to. If a "block" action is present, the `app_block_override`
field should be true.

This a record with a 'kind' field instead
instead of a sum type because ATD doesn't have convenient support for
adding new constructors to sum types without breaking backwards compatibility.
Right now we only have one kind of action ("block"), but in the future we may add more.
e.g. we could inform the CLI that a certain list of findings triggered a PR comment
*)
type app_finding_action = {
kind : string;
match_based_ids : string list;
}

(* Response by the backend to the CLI to the POST /complete *)
type ci_scan_complete_response <ocaml attr="deriving show"> = {
success: bool;
~app_block_override: bool;
(* only when app_block_override is true *)
~app_block_reason: string;
~app_finding_actions : app_finding_action list;
(* match_based_ids of findings that semgrep-app determined should cause the scan to block *)
~app_blocking_match_based_ids : string list;
}

(* ----------------------------- *)
Expand Down
12 changes: 2 additions & 10 deletions semgrep_output_v1.jsonschema

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

9 changes: 2 additions & 7 deletions semgrep_output_v1.proto

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

37 changes: 3 additions & 34 deletions semgrep_output_v1.py

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

25 changes: 3 additions & 22 deletions semgrep_output_v1.ts

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

Loading

0 comments on commit 0f07814

Please sign in to comment.