mirror of
https://github.com/trufflesecurity/trufflehog.git
synced 2024-11-10 07:04:24 +00:00
A few improvements (#809)
* Run integration tests * Update examples * Import mongodb
This commit is contained in:
parent
4382fd3441
commit
fcd580406e
4 changed files with 9 additions and 4 deletions
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
|
@ -28,7 +28,7 @@ jobs:
|
|||
workload_identity_provider: 'projects/811013774421/locations/global/workloadIdentityPools/github-pool/providers/github-provider'
|
||||
service_account: 'github-ci-external@trufflehog-testing.iam.gserviceaccount.com'
|
||||
- name: Test
|
||||
run: make test
|
||||
run: make test-integration
|
||||
test-detectors:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
|
|
3
Makefile
3
Makefile
|
@ -30,6 +30,9 @@ test-failing:
|
|||
test:
|
||||
CGO_ENABLED=0 go test -timeout=5m $(shell go list ./... | grep -v /vendor/ | grep -v pkg/detectors)
|
||||
|
||||
test-integration:
|
||||
CGO_ENABLED=0 go test -timeout=5m -tags=integration $(shell go list ./... | grep -v /vendor/ | grep -v pkg/detectors)
|
||||
|
||||
test-race:
|
||||
CGO_ENABLED=1 go test -timeout=5m -race $(shell go list ./... | grep -v /vendor/ | grep -v pkg/detectors)
|
||||
|
||||
|
|
|
@ -170,7 +170,7 @@ docker run -it -v "$PWD:/pwd" trufflesecurity/trufflehog:latest github --org=tru
|
|||
# Scan commits until here (usually dev branch).
|
||||
head: # optional
|
||||
# Extra args to be passed to the trufflehog cli.
|
||||
extra_args: # optional
|
||||
extra_args: --debug --only-verified
|
||||
```
|
||||
|
||||
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:
|
|||
with:
|
||||
fetch-depth: 0
|
||||
- name: TruffleHog OSS
|
||||
uses: trufflesecurity/trufflehog@v3.4.3
|
||||
uses: trufflesecurity/trufflehog@main
|
||||
with:
|
||||
path: ./
|
||||
base: ${{ github.event.repository.default_branch }}
|
||||
head: HEAD
|
||||
extra_args: --debug
|
||||
extra_args: --debug --only-verified
|
||||
```
|
||||
|
||||
### Precommit Hook
|
||||
|
|
|
@ -399,6 +399,7 @@ import (
|
|||
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors/mockaroo"
|
||||
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors/moderation"
|
||||
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors/monday"
|
||||
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors/mongodb"
|
||||
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors/monkeylearn"
|
||||
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors/moonclerck"
|
||||
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors/moonclerk"
|
||||
|
@ -1471,5 +1472,6 @@ func DefaultDetectors() []detectors.Detector {
|
|||
prodpad.Scanner{},
|
||||
transferwise.Scanner{},
|
||||
codemagic.Scanner{},
|
||||
mongodb.Scanner{},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue