Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internal/report: detect unused exclusions #90

Merged
merged 1 commit into from
Aug 30, 2024
Merged

Conversation

seilagamo
Copy link
Collaborator

@seilagamo seilagamo commented Jul 26, 2024

Lava outputs a warning if an exclusion rule does not match any finding.
A new parameter, error_on_stale_exclusions, has been added to the configuration if we want to exit with an exit code when there are unused exclusions.

The goal is to avoid staled exclusion rules.

@seilagamo seilagamo force-pushed the not-matched-exclusions branch 2 times, most recently from bc9dd39 to 58948df Compare August 23, 2024 10:11
@jroimartin jroimartin force-pushed the not-matched-exclusions branch from 12c6c93 to 2f7bb5a Compare August 23, 2024 11:48
@seilagamo seilagamo force-pushed the not-matched-exclusions branch 2 times, most recently from 6df5263 to b19080a Compare August 23, 2024 14:20
@seilagamo seilagamo marked this pull request as ready for review August 23, 2024 14:20
@seilagamo seilagamo requested a review from jroimartin August 23, 2024 14:21
cmd/lava/internal/help/helpdoc.go Outdated Show resolved Hide resolved
cmd/lava/internal/scan/scan.go Outdated Show resolved Hide resolved
cmd/lava/internal/help/helpdoc.go Outdated Show resolved Hide resolved
internal/config/config.go Outdated Show resolved Hide resolved
internal/report/report.go Outdated Show resolved Hide resolved
internal/report/humanprinter.go Outdated Show resolved Hide resolved
internal/report/humanprinter.go Outdated Show resolved Hide resolved
internal/report/humanprinter_test.go Show resolved Hide resolved
internal/report/human.tmpl Outdated Show resolved Hide resolved
internal/report/report.go Outdated Show resolved Hide resolved
@seilagamo seilagamo requested a review from jroimartin August 28, 2024 13:21
internal/config/config.go Outdated Show resolved Hide resolved
cmd/lava/internal/help/helpdoc.go Outdated Show resolved Hide resolved
internal/report/report.go Outdated Show resolved Hide resolved
internal/report/report.go Outdated Show resolved Hide resolved
internal/report/report.go Outdated Show resolved Hide resolved
internal/report/report.go Outdated Show resolved Hide resolved
internal/report/report.go Outdated Show resolved Hide resolved
internal/report/report_test.go Outdated Show resolved Hide resolved
internal/report/report_test.go Outdated Show resolved Hide resolved
internal/report/report_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@jroimartin jroimartin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job. Just a couple of nitpicks. Also, clean up the commit history.

cmd/lava/internal/help/helpdoc.go Outdated Show resolved Hide resolved
internal/report/report.go Outdated Show resolved Hide resolved
internal/report/report.go Outdated Show resolved Hide resolved
internal/report/report_test.go Show resolved Hide resolved
@seilagamo seilagamo force-pushed the not-matched-exclusions branch from 775960c to 0fff6d5 Compare August 30, 2024 08:54
Copy link
Contributor

@jroimartin jroimartin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@seilagamo seilagamo merged commit 9038916 into main Aug 30, 2024
6 checks passed
@seilagamo seilagamo deleted the not-matched-exclusions branch August 30, 2024 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants