Skip to content

Commit 60e20ce

Browse files
authored
feat(mal-deps): add flag to selectively enable mal-deps per scan (#434)
Right now mal-deps is either fully enabled or fully disabled at a deployment level. This is problematic for testing improvements to mal-deps on a per customer / project basis. This flag will let the CLI opt in to mal-deps for a specific scan, even if it is turned off at the deployment level. - [x] I ran `make setup && make` to update the generated code after editing a `.atd` file (TODO: have a CI check) - [x] I made sure we're still backward compatible with old versions of the CLI. For example, the Semgrep backend need to still be able to *consume* data generated by Semgrep 1.50.0. See https://atd.readthedocs.io/en/latest/atdgen-tutorial.html#smooth-protocol-upgrades Note that the types related to the semgrep-core JSON output or the semgrep-core RPC do not need to be backward compatible! - [x] Any accompanying changes in `semgrep-proprietary` are approved and ready to merge once this PR is merged
1 parent f8df3b1 commit 60e20ce

9 files changed

+94
-6
lines changed

semgrep_output_v1.atd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1908,6 +1908,11 @@ type scan_metadata
19081908
: string option;
19091909
~ecosystems: string list;
19101910
~packages: string list;
1911+
?enable_mal_deps
1912+
<doc text="
1913+
Override to enable malicious dependency rules for this scan,
1914+
even if disabled at the deployment level.">
1915+
: bool option;
19111916
}
19121917

19131918
type ci_config_from_repo

semgrep_output_v1.jsonschema

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

semgrep_output_v1_j.ml

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

semgrep_output_v1_j.mli

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

semgrep_output_v1_t.ml

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

semgrep_output_v1_t.mli

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

0 commit comments

Comments
 (0)