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

feat: add --no-version-check cmdline option #139

Merged
merged 3 commits into from
Dec 4, 2023

Conversation

dnwe
Copy link

@dnwe dnwe commented Nov 22, 2023

Skip the remote version check (to s3) if the user passes --no-version-check as a cmdline option.

Fixes #42

@dnwe dnwe force-pushed the no-version-check branch 3 times, most recently from 73ecf52 to 3d242ad Compare November 22, 2023 23:04
Skip the remote version check (to s3) if the user passes
`--no-version-check` as a cmdline option.

Fixes IBM#42

Signed-off-by: Dominic Evans <dominic.evans@uk.ibm.com>
Python 3.7 is no longer maintained and various deps (e.g., numpy)
contain CVEs at the last version supported on 3.7. Bump the minimum to
3.8 to avoid this CVE being detected in the build.

Signed-off-by: Dominic Evans <dominic.evans@uk.ibm.com>
@victoria-miltcheva
Copy link
Member

Hi @dnwe, thank you for your contribution! Looks great.

I did some manual testing with this Python script to verify that the new option works:

import detect_secrets.main
import detect_secrets.pre_commit_hook

# Scan subcommand with new flag
# detect_secrets.main.main(["--no-version-check", "scan", "--update", ".secrets.baseline"])
# detect_secrets.main.main(["--no-version-check", "scan"])

# Audit subcommand with new flag
# detect_secrets.main.main(["--no-version-check", "audit", ".secrets.baseline"])
# detect_secrets.main.main(["--no-version-check", "audit", "--report", ".secrets.baseline"])

# Pre-commit hook with new flag
# detect_secrets.pre_commit_hook.main(["--no-version-check"])

Copy link
Member

@victoria-miltcheva victoria-miltcheva left a comment

Choose a reason for hiding this comment

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

Before I merge, could you bump the version here? The 61 just needs to be changed to 62

Signed-off-by: Dominic Evans <dominic.evans@uk.ibm.com>
@victoria-miltcheva victoria-miltcheva merged commit d7c7992 into IBM:master Dec 4, 2023
4 checks passed
@dnwe dnwe deleted the no-version-check branch December 5, 2023 08:54
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.

[BUG] Flag to disable version check
2 participants