Skip to content

Commit c70701f

Browse files
committed
switch to separate record for internal information
1 parent 00e9355 commit c70701f

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
@@ -2287,20 +2287,23 @@ type resolution_cmd_failed
22872287

22882288
(* Resolution can either succeed or fail, but in either case errors can be
22892289
* produced (e.g. one resolution method might fail while a worse one succeeds,
2290-
* lockfile parsing might partially fail but recover and still produce results)
2290+
* lockfile parsing might partially fail but recover and still produce results).
2291+
*
2292+
* Resolution can optionally include a `downloaded_dependency` alongside each
2293+
* `found_dependency`. This should be included if the source code for the
2294+
* dependency was downloaded and is available to scan later.
22912295
*)
22922296
type resolution_result = [
2293-
| ResolutionOk of (sca_dependency list * resolution_error_kind list)
2297+
| ResolutionOk of ((found_dependency * downloaded_dependency option) list * resolution_error_kind list)
22942298
| ResolutionError of resolution_error_kind list
22952299
]
22962300

2297-
(* A found_dependency annotated with extra information that is used
2298-
* within the Semgrep CLI, passed back and forth from OCaml to Python
2299-
* via RPC. See also SCA_dependency.t in OCaml and ResolvedDependencies
2300-
* in Python.*)
2301-
type sca_dependency = {
2302-
inherit found_dependency;
2303-
source_path: fpath option;
2301+
(* Information about a third-party dependency downloaded for Transitive Reachability.
2302+
* To accompany a found_dependency within the Semgrep CLI, passed back and forth
2303+
* from OCaml to Python via RPC. See also SCA_dependency.t in OCaml and
2304+
* ResolvedDependencies in Python. *)
2305+
type downloaded_dependency = {
2306+
source_path: fpath;
23042307
}
23052308

23062309
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)