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

Explicitly check for "mal" binary name when ignoring self #466

Merged
merged 2 commits into from
Sep 23, 2024

Conversation

egibs
Copy link
Member

@egibs egibs commented Sep 23, 2024

As part of #464, I used the full malcontent string when checking whether the Rule name and metadata were for malcontent rather than just mal in the event we had other partial mal string matches in the future.

Since the malcontent binary is mal, the filepath.Base(path) == NAME check was failing because mal != malcontent.

This PR explicitly checks whether filepath.Base(path) is mal. I tested this locally and the ignore behavior worked as expected.

I'll cut 1.0.1 to get this out before merging wolfi-dev/os#29171.

@egibs egibs requested a review from tstromberg September 23, 2024 16:44
@egibs egibs requested review from ajayk and hectorj2f September 23, 2024 16:44
@egibs egibs changed the title Explicitly check for shortened variant of malcontent when ignoring self Explicitly check for "mal" binary name when ignoring self Sep 23, 2024
@egibs egibs merged commit 66b3d09 into main Sep 23, 2024
7 of 8 checks passed
@egibs egibs deleted the fix-ignore-self-regression branch September 23, 2024 18:08
egibs added a commit to egibs/malcontent that referenced this pull request Sep 25, 2024
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