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

filesystem support for exclude and include filters (2nd attemp) #1033

Merged
merged 3 commits into from
Jan 26, 2023

Conversation

mac2000
Copy link
Contributor

@mac2000 mac2000 commented Jan 22, 2023

Sorry I have messed up completely and somehow GitHub did not recognize that I want only my 2 commits to be merged and showed up bunch of changes from upstream 🤷‍♂️

Previous "broken" attempt: #881 had approve but were not merged and later on broken by me trying to fix conflicts


Closes: #536 and technically closes: #865

What has been done:

I have moved the git filter creation a little bit lower into its switch case
And created similar filter creation in the filesystem switch case
Because of that go asked me to put err := below
For filesystem engine, itself did not want to touch it so just added one more "method" WithFilter() so it can be used where needed

In the same way, as in the git source, we are checking if the filter is not nil and the current file passes it

Copy link
Contributor

@dustin-decker dustin-decker left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution!

@dustin-decker dustin-decker merged commit b29b78c into trufflesecurity:main Jan 26, 2023
@mac2000 mac2000 deleted the fs-exclude branch January 27, 2023 12:53
javajawa added a commit to mewbotorg/mewbot that referenced this pull request Feb 12, 2023
Sourced from trufflesecurity/trufflehog's releases.

v3.27.0
What's Changed
Bump golang.org/x/oauth2 from 0.3.0 to 0.4.0 by @​dependabot in trufflesecurity/trufflehog#1039
add bodyclose linter to help prevent file handle leaks by @​dustin-decker in trufflesecurity/trufflehog#1048
braintree detector: use production API URL instead of the test sandbo… by @​swdbo in trufflesecurity/trufflehog#1054
Update float detector with correct User-Agent and regex by @​ahrav in trufflesecurity/trufflehog#1061
update webex detector regex by @​ahrav in trufflesecurity/trufflehog#1062
Handle errors in a thread safe manner by @​ahrav in trufflesecurity/trufflehog#1052
Add TruffleHog version input for GitHub action by @​mcastorina in trufflesecurity/trufflehog#1064
Revert "Add TruffleHog version input for GitHub action (#1064)" by @​mcastorina in trufflesecurity/trufflehog#1068
Pull gitparse config options out of pkg consts by @​bill-rich in trufflesecurity/trufflehog#1072
Add include exclude spaces for confluence source. by @​ahrav in trufflesecurity/trufflehog#1073
Add max commit size by @​bill-rich in trufflesecurity/trufflehog#1079
Make archive handler configurable by @​bill-rich in trufflesecurity/trufflehog#1077
[chore] - Add tests for errors by @​ahrav in trufflesecurity/trufflehog#1071
Skip repo and continue scanning when encountering an error by @​mcastorina in trufflesecurity/trufflehog#1080
[chore] - Dont pre-allocate errors slice by @​ahrav in trufflesecurity/trufflehog#1083
Add Type() to detector interface by @​trufflesteeeve in trufflesecurity/trufflehog#1088
[chore] Remove logrus from engine package by @​mcastorina in trufflesecurity/trufflehog#1085
[chore] Remove logrus from github source by @​mcastorina in trufflesecurity/trufflehog#1086
Bump github.com/joho/godotenv from 1.4.0 to 1.5.1 by @​dependabot in trufflesecurity/trufflehog#1075
[chore] Remove logrus from circleci, filesystem, gitlab, and s3 sources by @​mcastorina in trufflesecurity/trufflehog#1089
[chore] - Remove monolithic config struct by @​ahrav in trufflesecurity/trufflehog#1091
Make detectors configurable by @​ahrav in trufflesecurity/trufflehog#1084
New Contributors
@​swdbo made their first contribution in trufflesecurity/trufflehog#1054
Full Changelog: trufflesecurity/trufflehog@v3.26.0...v3.27.0

v3.26.0
What's Changed
Add openssh-client to trufflehog container by @​mcastorina in trufflesecurity/trufflehog#1045
Bump github.com/rabbitmq/amqp091-go from 1.5.0 to 1.6.0 by @​dependabot in trufflesecurity/trufflehog#1036
filesystem support for exclude and include filters (2nd attemp) by @​mac2000 in trufflesecurity/trufflehog#1033
Fix the typo "programatic" by @​nezakoo in trufflesecurity/trufflehog#1046
Add file to confluence proto. by @​ahrav in trufflesecurity/trufflehog#1049
Remove false positive detection for CustomRegex by @​mcastorina in trufflesecurity/trufflehog#1050
@mac2000 mac2000 mentioned this pull request Aug 17, 2023
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.

gitignore Add --exclude-paths flag to filesystem module
2 participants