Skip to content

Commit 00e9355

Browse files
committed
chore(sca-rpc): add internal dependency type
1 parent 2a998e7 commit 00e9355

File tree

7 files changed

+971
-56
lines changed

7 files changed

+971
-56
lines changed

semgrep_output_v1.atd

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2290,10 +2290,19 @@ type resolution_cmd_failed
22902290
* lockfile parsing might partially fail but recover and still produce results)
22912291
*)
22922292
type resolution_result = [
2293-
| ResolutionOk of (found_dependency list * resolution_error_kind list)
2293+
| ResolutionOk of (sca_dependency list * resolution_error_kind list)
22942294
| ResolutionError of resolution_error_kind list
22952295
]
22962296

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;
2304+
}
2305+
22972306
type transitive_finding = {
22982307
(* the important part is the sca_match in core_match_extra that
22992308
* we need to adjust and especially the sca_match_kind.

semgrep_output_v1.jsonschema

Lines changed: 43 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

semgrep_output_v1.proto

Lines changed: 16 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

semgrep_output_v1.py

Lines changed: 69 additions & 2 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: 52 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)