Skip to content

SAST & Secret-Detection Custom Rules - Modifying Pre-existing Rules - Overriding Properties

Problem to solve

To complete Custom Rulesets for SAST Analyzers we should provide the ability to modify specific rules for our individual Category:SAST and Category:Secret Detection analyzers, allowing overrides of properties.

Intended users

User experience goal

Better data quality for users in better aligning rule properties with organization expectations.

Proposal

Update analyzers to enable modifying preexisting rules

Example

[spotbugs]
  [[spotbugs.ruleset]]
    # Properties I'm overriding below
    severity = "Low"
    description = "Predictable random number generator detected, but I don't really care because this is a PoC to demonstrate crackable password hashes"
    # Filter on identifier
    [spotbugs.ruleset.identifier]
    type = "find_sec_bugs_type" # not needed but for readability
    value = "PREDICTABLE_RANDOM"

Further details

Permissions and Security

No change to permissions

Documentation

Availability & Testing

  • Add test ensuring overridden rule generates findings matching the override value

What does success look like, and how can we measure that?

Rules can be disabled if considered insignificant to users

What is the type of buyer?

GitLab Ultimate

Is this a cross-stage feature?

Links / references

This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.

Edited by rossfuhrman