trufflesecurity / trufflehog

Find and verify secrets
https://trufflesecurity.com
GNU Affero General Public License v3.0
14.39k stars 1.57k forks source link

Fix race in `EscapedUnicode` decoder #3031

Open rgmz opened 5 days ago

rgmz commented 5 days ago

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: