Skip to content

Commit b362c2b

Browse files
committed
switch to separate record for internal information
1 parent 0537689 commit b362c2b

File tree

7 files changed

+360
-934
lines changed

7 files changed

+360
-934
lines changed

semgrep_output_v1.atd

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2239,20 +2239,23 @@ type resolution_cmd_failed
22392239

22402240
(* Resolution can either succeed or fail, but in either case errors can be
22412241
* produced (e.g. one resolution method might fail while a worse one succeeds,
2242-
* lockfile parsing might partially fail but recover and still produce results)
2242+
* lockfile parsing might partially fail but recover and still produce results).
2243+
*
2244+
* Resolution can optionally include a `downloaded_dependency` alongside each
2245+
* `found_dependency`. This should be included if the source code for the
2246+
* dependency was downloaded and is available to scan later.
22432247
*)
22442248
type resolution_result = [
2245-
| ResolutionOk of (sca_dependency list * resolution_error list)
2249+
| ResolutionOk of ((found_dependency * downloaded_dependency option) list * resolution_error list)
22462250
| ResolutionError of resolution_error list
22472251
]
22482252

2249-
(* A found_dependency annotated with extra information that is used
2250-
* within the Semgrep CLI, passed back and forth from OCaml to Python
2251-
* via RPC. See also SCA_dependency.t in OCaml and ResolvedDependencies
2252-
* in Python.*)
2253-
type sca_dependency = {
2254-
inherit found_dependency;
2255-
source_path: fpath option;
2253+
(* Information about a third-party dependency downloaded for Transitive Reachability.
2254+
* To accompany a found_dependency within the Semgrep CLI, passed back and forth
2255+
* from OCaml to Python via RPC. See also SCA_dependency.t in OCaml and
2256+
* ResolvedDependencies in Python. *)
2257+
type downloaded_dependency = {
2258+
source_path: fpath;
22562259
}
22572260

22582261
type transitive_finding = {

semgrep_output_v1.jsonschema

Lines changed: 27 additions & 41 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

semgrep_output_v1.proto

Lines changed: 3 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

semgrep_output_v1.py

Lines changed: 31 additions & 70 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

semgrep_output_v1.ts

Lines changed: 9 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)