Skip to content

Commit b8aaedd

Browse files
committed
switch to separate record for internal information
1 parent 4ba48c7 commit b8aaedd

File tree

7 files changed

+365
-933
lines changed

7 files changed

+365
-933
lines changed

semgrep_output_v1.atd

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

22522252
(* Resolution can either succeed or fail, but in either case errors can be
22532253
* produced (e.g. one resolution method might fail while a worse one succeeds,
2254-
* lockfile parsing might partially fail but recover and still produce results)
2254+
* lockfile parsing might partially fail but recover and still produce results).
2255+
*
2256+
* Resolution can optionally include a `downloaded_dependency` alongside each
2257+
* `found_dependency`. This should be included if the source code for the
2258+
* dependency was downloaded and is available to scan later.
22552259
*)
22562260
type resolution_result = [
2257-
| ResolutionOk of (sca_dependency list * resolution_error list)
2261+
| ResolutionOk of ((found_dependency * downloaded_dependency option) list * resolution_error list)
22582262
| ResolutionError of resolution_error list
22592263
]
22602264

2261-
(* A found_dependency annotated with extra information that is used
2262-
* within the Semgrep CLI, passed back and forth from OCaml to Python
2263-
* via RPC. See also SCA_dependency.t in OCaml and ResolvedDependencies
2264-
* in Python.*)
2265-
type sca_dependency = {
2266-
inherit found_dependency;
2267-
source_path: fpath option;
2265+
(* Information about a third-party dependency downloaded for Transitive Reachability.
2266+
* To accompany a found_dependency within the Semgrep CLI, passed back and forth
2267+
* from OCaml to Python via RPC. See also SCA_dependency.t in OCaml and
2268+
* ResolvedDependencies in Python. *)
2269+
type downloaded_dependency = {
2270+
source_path: fpath;
22682271
}
22692272

22702273
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: 8 additions & 13 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)