CI: Replace flake8-no-print with flake8-debug and pin repos to hashes#24572
Open
jpodivin wants to merge 2 commits into
Open
CI: Replace flake8-no-print with flake8-debug and pin repos to hashes#24572jpodivin wants to merge 2 commits into
jpodivin wants to merge 2 commits into
Conversation
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
The flake8-no-print[1] package has been superseded by flake8-debug[2] from the same developer.
In fact, flake8-debug is reusing the original flake8-no-print repository.
In addition to flagging
printcalls, the flake8-debug also flagsset_traceand breakpoints.I've also frozen the hooks repos,[3] pinning them to hashes, rather than repository tags. This is a proactive measure against possible supply chain compromises. Unlike tags, hashes can not be assigned different repository states after they are created. This protects us against attacker taking over repository of, for example base pre-commit hooks, deleting original tags and making new ones, all pointing to a compromised hook that steals secrets.
I've deliberately decide not to apply pre-commit on all files in the repo, as that would inflate the PR size substantially. IMHO, it's better to introduce this gradually.
Additional information
[1] https://pypi.org/project/flake8-no-print/
[2] https://github.com/vyahello/flake8-debug
[3] https://pre-commit.com/index.html#pre-commit-autoupdate
Requirements