-
Notifications
You must be signed in to change notification settings - Fork 0
Chore: [AEA-0000] - use gitleaks for secret scanning #98
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -23,6 +23,14 @@ repos: | |||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - repo: local | ||||||||||||||||||||||||||
| hooks: | ||||||||||||||||||||||||||
| - id: grype-scan-local | ||||||||||||||||||||||||||
| name: Grype scan local changes | ||||||||||||||||||||||||||
| entry: make | ||||||||||||||||||||||||||
| args: ["grype-scan-local"] | ||||||||||||||||||||||||||
|
Comment on lines
+28
to
+29
|
||||||||||||||||||||||||||
| entry: make | |
| args: ["grype-scan-local"] | |
| entry: bash | |
| args: | |
| - -c | |
| - | | |
| if ! command -v grype > /dev/null 2>&1; then | |
| echo "Error: grype is not installed or not available on PATH." | |
| echo "Please install grype to run this pre-commit hook." | |
| exit 1 | |
| fi | |
| grype dir:. |
Copilot
AI
Apr 17, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
always_run: true means the Grype scan will run on every commit regardless of what changed, and since it ultimately scans the whole repository (grype .) this can add significant overhead to the commit path. If the goal is to scan only when dependency-relevant files change, consider removing always_run and using files:/types: filters (or keeping it always-run but clearly documenting the performance impact in the hook name/description).
| always_run: true | |
| files: ^(Dockerfile|docker-compose\.ya?ml|requirements(\.txt|/.*\.txt)?|poetry\.lock|pyproject\.toml|Pipfile(\.lock)?|setup\.(py|cfg)|package(-lock)?\.json|npm-shrinkwrap\.json|yarn\.lock|pnpm-lock\.yaml|go\.(mod|sum)|Cargo\.(toml|lock)|Gemfile(\.lock)?|pom\.xml|build\.gradle(\.kts)?|gradle\.properties|gradle/libs\.versions\.toml|composer\.(json|lock)|\.github/workflows/.*\.ya?ml)$ |
Copilot
AI
Apr 17, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The gitleaks hook description claims it scans commits, commit messages, and --no-ff merges, but the configured command runs only against staged content (--staged) during the pre-commit stage. Please update the description to match the actual behavior, or add an additional commit-msg stage hook to scan commit messages (and include commit-msg in default_stages if needed).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hook is named “Grype scan local changes”, but the underlying
grype-scan-localtarget runsgrype .(repo-wide scan) rather than scanning only staged/local changes. Either rename the hook to reflect the actual behavior or adjust the target so it only scans what changed.