-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add --exclude parameter support for secret extension [PS-260] #22
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
Open
alexandru-manea-snyk
wants to merge
13
commits into
main
Choose a base branch
from
feat/PS-260/have-exclude-flag-capabilities
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat: add --exclude parameter support for secret extension [PS-260] #22
alexandru-manea-snyk
wants to merge
13
commits into
main
from
feat/PS-260/have-exclude-flag-capabilities
Conversation
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
) * feat: file filtering methods based on metadata and contents [PS-105] * feat: concurrent listing of files [PS-105] * feat: concurrent file filtering [PS-105] * feat: respect ignore files and new glob file filter [PS-105] * refactor: simplified file filtering using GAF/pkg/utils.FileFilter and exposed results via channels [PS-105] * feat: allow filtering for multiple input paths + tests for filefilter pkg [PS-105] * refactor: moved StreamAllowedFiles into file filter package and added tests [PS-105] * refactor: added custom glob patterns param, added timeout for file finding process [PS-105]
* chore: upgrade go version and add makefile * chore: downgrade back to 1.24 to comply with CLI * revert img upgrade * chore: fix linter version and exclusions * chore: add secret scanning * chore: format * chore: remove dev deps and unused make
Co-authored-by: Alina Matei <alina-daniela.matei@snyk.io>
* feat: call new file upload * feat: file upload draft [PS-87] * feat: file upload & refactored filtering [PS-87] * feat: tests, mocks [PS-87] * fix: timeout [PS-87] * fix: linting [PS-87] * feat: wait for test and retrieve findings * fix: fix error messages * fix: align StartTestParams type to new GAF * chore: add tests * chore: rebase and lint * chore: draft output * fix: better ctx handling * fix: cleanup code * fix: align tests * fix: lint * fix: tests and linting --------- Co-authored-by: Alina Matei <alina-daniela.matei@snyk.io>
59ecd40 to
e60fb50
Compare
e60fb50 to
e330ed5
Compare
Contributor
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.
Unrelated to this PR since this was merged before, but how did we end up with all the files in this directory named with "-" instead of "_"?
eded02b to
fa52284
Compare
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.
What does this PR do?
This PR implements the --exclude flag for the secrets-extension CLI. This implementation is designed to be consistent with the existing behavior in
snyk testby using basename global matching: docs.Implementation Details:
/or\) to ensure the flag remains easy to use and consistent with existing--excludeimplementations.**/patterns (distbecomes**/distand**/dist/**), ensuring the item is excluded regardless of its depth in the project tree.Where should the reviewer start?
buildExclusionGlobs: Review the logic that transforms raw string inputs into global glob patterns.Test_buildExclusionGlobs: Check the unit tests covering empty inputs, multiple entries, and the rejection of slashes.README.md: Review the updated documentation and examples for user-facing instructions.How should this be manually tested?
go run cmd/develop/main.go secrets --exclude=mocksand verify that any file or folder named mocks is skipped throughout the entire project.go run cmd/develop/main.go secrets --exclude="testshim,snykclient"and verify all are ignored.go run cmd/develop/main.go secrets --exclude="internal/mocks". It should return a clear error stating that paths are not allowed, consistent with the basename-only requirement.What are the relevant tickets?