Draft: Add curated ruleset for Rust
What does this MR do?
After enabling support for Rust in the semgrep analyzer, adds a gitlab curated ruleset for the rust language. Based on the OSS semgrep ruleset: https://github.com/semgrep/semgrep-rules/tree/develop/rust/lang/security
What are the relevant issue numbers?
- Support Rust SAST Analyzer (gitlab-org/gitlab#390733 - closed)
- Enable Support for Rust in Semgrep Analyzer (gitlab-org/gitlab#439046 - closed)
Does this MR meet the acceptance criteria?
-
The test cases cover both positive and negative cases and are also annotated with appropriate semgrep annotations: - For positive cases:
// ruleid: ...
- For negative cases:
// ok: ....
- For positive cases:
-
Following metadata fields exist for the rule(s) added/updated in this MR: -
owasp
with both 2017 and 2021 mappings. category: "security"
cwe
shortDescription
security-severity
-
-
The message field is valid and contains a secure code example. -
Applicable license is mentioned in the rule if embedded/taken from external source. -
Relevant labels including workflow labels are appropriately selected.