Skip to content

Update C rules for C++

Jason Leasure requested to merge 450799-update-c-for-cpp into main

What does this MR do?

Rules ported from flawfinder are based on named function call patterns, e.g some_unsafe_function(...). Each such function is callable from C++ and represents the same risk.

This MR adds "cpp" to languages for each rule and updates the schema.

What are the relevant issue numbers?

gitlab-org/gitlab#450799 (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: ....
  • 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.
Edited by Jason Leasure

Merge request reports