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

digestcheck: take a list of files as input #3145

Merged
merged 2 commits into from
Nov 19, 2024
Merged

Conversation

mtardy
Copy link
Member

@mtardy mtardy commented Nov 19, 2024

This will partially prevent this workflow to spot issues in outdated or
wrong multi-arch SHA256 that haven't been touched in the PR and should
be updated elsewhere. It will not be perfect as it's as precise as files
and not lines so it might still spot issues that were not changed by
this PR but I don't want to spend too much rewriting this script that
has the very nice property to dump file name and file lines using the
grep output. It seems it would require more change to use the git diff
-U0 output instead.

@mtardy mtardy added area/ci Related to CI release-note/ci This PR makes changes to the CI. labels Nov 19, 2024
@mtardy mtardy requested a review from a team as a code owner November 19, 2024 17:20
@mtardy mtardy requested a review from tixxdz November 19, 2024 17:20
@mtardy mtardy marked this pull request as draft November 19, 2024 17:22
The exclude part wasn't working because it was only matching on the name
of the file and not on the whole path, specifically the directory
structure. Instead of using exclude-dir, let's just take the directory
or the files directly as input so that the user can specify before which
files needs to be included/excluded or not.

Signed-off-by: Mahe Tardy <[email protected]>
@mtardy mtardy force-pushed the pr/mtardy/digestcheck-fix branch from 0542a87 to 7788bad Compare November 19, 2024 18:06
@mtardy mtardy changed the title digestcheck: fix grep --exclude using --exclude-dir digestcheck: take a list of files as input Nov 19, 2024
This will partially prevent this workflow to spot issues in outdated or
wrong multi-arch SHA256 that haven't been touched in the PR and should
be updated elsewhere. It will not be perfect as it's as precise as files
and not lines so it might still spot issues that were not changed by
this PR but I don't want to spend too much rewriting this script that
has the very nice property to dump file name and file lines using the
grep output. It seems it would require more change to use the git diff
-U0 output instead.

Signed-off-by: Mahe Tardy <[email protected]>
@mtardy mtardy force-pushed the pr/mtardy/digestcheck-fix branch from 7788bad to 3a38f0f Compare November 19, 2024 18:09
@mtardy mtardy marked this pull request as ready for review November 19, 2024 18:11
@mtardy mtardy requested a review from willfindlay as a code owner November 19, 2024 18:11
Copy link
Contributor

@kevsecurity kevsecurity left a comment

Choose a reason for hiding this comment

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

LGTM

@mtardy mtardy merged commit 6fce672 into main Nov 19, 2024
31 checks passed
@mtardy mtardy deleted the pr/mtardy/digestcheck-fix branch November 19, 2024 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci Related to CI release-note/ci This PR makes changes to the CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants