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

Add --exclude-paths support for gitlab scanning module #919

Merged
merged 1 commit into from Nov 15, 2022

Conversation

jesslam948
Copy link
Contributor

Closes #918

Similar to the PR for adding exclude-paths to the filesystem module, I:

  • in main.go, I added filter creation to the gitlab switchcase
  • in the gitlab engine, I created git ScanOptions in the same way that that the git engine does it
  • in the gitlab source, instead of having it use git.NewScanOptions(), I have it use the ScanOptions we created using the passed in filter

Tests:
As with the filesystem PR, I didn't see any similar tests for exclude-paths in the git source and wasn't sure how to add tests for this PR.

@jesslam948 jesslam948 requested review from a team as code owners November 14, 2022 19:25
@CLAassistant
Copy link

CLAassistant commented Nov 14, 2022

CLA assistant check
All committers have signed the CLA.

@jesslam948 jesslam948 changed the title Add filter as scan option to gitlab module's git scan Add --exclude-paths support for gitlab scanning module Nov 15, 2022
Copy link
Collaborator

@ahrav ahrav left a comment

Choose a reason for hiding this comment

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

Thanks @jesslam948 this looks great. Really appreciate the contribution.

@ahrav ahrav merged commit 3d50197 into trufflesecurity:main Nov 15, 2022
mac2000 pushed a commit to mac2000/trufflehog that referenced this pull request Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Add --exclude-paths flag to gitlab module
3 participants