Skip to content

Commit fcd5804

Browse files
A few improvements (#809)
* Run integration tests * Update examples * Import mongodb
1 parent 4382fd3 commit fcd5804

4 files changed

Lines changed: 9 additions & 4 deletions

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
workload_identity_provider: 'projects/811013774421/locations/global/workloadIdentityPools/github-pool/providers/github-provider'
2929
service_account: 'github-ci-external@trufflehog-testing.iam.gserviceaccount.com'
3030
- name: Test
31-
run: make test
31+
run: make test-integration
3232
test-detectors:
3333
runs-on: ubuntu-latest
3434
permissions:

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ test-failing:
3030
test:
3131
CGO_ENABLED=0 go test -timeout=5m $(shell go list ./... | grep -v /vendor/ | grep -v pkg/detectors)
3232

33+
test-integration:
34+
CGO_ENABLED=0 go test -timeout=5m -tags=integration $(shell go list ./... | grep -v /vendor/ | grep -v pkg/detectors)
35+
3336
test-race:
3437
CGO_ENABLED=1 go test -timeout=5m -race $(shell go list ./... | grep -v /vendor/ | grep -v pkg/detectors)
3538

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ docker run -it -v "$PWD:/pwd" trufflesecurity/trufflehog:latest github --org=tru
170170
# Scan commits until here (usually dev branch).
171171
head: # optional
172172
# Extra args to be passed to the trufflehog cli.
173-
extra_args: # optional
173+
extra_args: --debug --only-verified
174174
```
175175
176176
The TruffleHog OSS Github Action can be used to scan a range of commits for leaked credentials. The action will fail if
@@ -189,12 +189,12 @@ jobs:
189189
with:
190190
fetch-depth: 0
191191
- name: TruffleHog OSS
192-
uses: trufflesecurity/trufflehog@v3.4.3
192+
uses: trufflesecurity/trufflehog@main
193193
with:
194194
path: ./
195195
base: ${{ github.event.repository.default_branch }}
196196
head: HEAD
197-
extra_args: --debug
197+
extra_args: --debug --only-verified
198198
```
199199
200200
### Precommit Hook

pkg/engine/defaults.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@ import (
399399
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors/mockaroo"
400400
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors/moderation"
401401
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors/monday"
402+
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors/mongodb"
402403
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors/monkeylearn"
403404
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors/moonclerck"
404405
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors/moonclerk"
@@ -1471,5 +1472,6 @@ func DefaultDetectors() []detectors.Detector {
14711472
prodpad.Scanner{},
14721473
transferwise.Scanner{},
14731474
codemagic.Scanner{},
1475+
mongodb.Scanner{},
14741476
}
14751477
}

0 commit comments

Comments
 (0)