There may be a better solution to this specific issue. My interpretation, validated by testing, is that sources.Chunk is being mutated and read in multiple places and needs to be cloned.
Checklist:
[ ] Tests passing (make test-community)?
[ ] Lint passing (make lint this requires golangci-lint)?
Description:
This fixes one of the races mentioned in https://github.com/trufflesecurity/trufflehog/issues/3027.
There may be a better solution to this specific issue. My interpretation, validated by testing, is that
sources.Chunk
is being mutated and read in multiple places and needs to be cloned.Checklist:
make test-community
)?make lint
this requires golangci-lint)?