Skip to content

Stricter filter rules parsing #87

@rh-tguittet

Description

@rh-tguittet

Once upon a time, I made a typo in a filter rule (localtion instead of location) :

exclude:
  localtion: "test*.go"

After having spent too much time on "why is nothing ever coming out of the filter anymore?" -- because such invalid rules makes it that nothing makes it through -- I would like to put forth that stricter filter rules parsing be implemented. A warning must at the very least be printed when the filter encounters invalid configuration primitives.

From what I can tell, this would be the place to do so: https://github.com/microsoft/sarif-tools/blob/v3.0.4/sarif/filter/general_filter.py#L85 Trying to keep the "pass through" logic for FILTER_SHORTCUTS.get(), I only came up with warts-level python of patches. Thus, it might be better that actual professional developers take a look at how to make such a patch.

Cheers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions