Annotation Interface SemgrepScan
This tells the framework to inject the results of a Semgrep scan into the following parameter.
This can only inject
RuleSarif
types.-
Optional Element Summary
Optional Elements
-
Element Details
-
yaml
String yamlA YAML string that represents Semgrep rule(s).- Default:
- ""
-
pathToYaml
String pathToYamlThe classpath resource path of the Semgrep YAML file. It is assumed the path will be in the same package as theCodemod
.So, for instance, if you had a codemod in
com.acme.codemods
, and a YAML rule file in /com/acme/codemods/my-rule.yaml, you would simply specify "my-rule.yaml" for this value.- Default:
- ""
-
ruleId
String ruleIdThe Semgrep rule "id" field from the YAML. This is needed to disambiguate Semgrep results as we consolidate Semgrep rules into one scan. If unspecified, the rule ID will be assumed to be the one and only rule specified in the YAML. If there are multiple rules in the YAML, the rule desired by the codemod will be ambiguous and an error will occur.- Default:
- ""
-