False detection of Tunnel dummy keys
Please review the Community Note before submitting
TruffleHog Version
v3.97.4
Trace Output
n/a
Expected Behavior
When scanning a VS Code extension .vsix package (or its unpacked node_modules), TruffleHog should not flag the RSA private keys under node_modules/tunnel/test/keys/ (e.g. agent1-key.pem, client1-key.pem, server1-key.pem, proxy1-key.pem, etc.) as a credential finding.
Actual Behavior
TruffleHog reports a PrivateKey finding for these files. They are static, publicly committed test fixtures shipped with every published version of the tunnel npm package (https://www.npmjs.com/package/tunnel), used only to spin up local HTTPS servers for that package's own unit tests. The same key files, under the same filenames, ship unmodified in every install of tunnel and appear in unrelated downstream projects that depend on it — they are not a leaked or reachable credential in the scanned artifact.
Steps to Reproduce
- Install any npm package that depends on
tunnel(e.g. an Azure SDK package that uses it for HTTP(S) proxy tunneling), ornpm install tunneldirectly. - Run TruffleHog (filesystem scan) against the resulting
node_modulesdirectory. - Observe a
PrivateKeyfinding fornode_modules/tunnel/test/keys/*.pem.
Suggested Fix
Consider adding tunnel's test fixture keys (or the well-known Node.js core TLS test-fixture key set they're derived from) to TruffleHog's known-test-key/allowlist detection, similar to how other widely-known dummy keys (e.g. Node.js's own test/fixtures/keys/) are commonly excluded by secret scanners.
Source: trufflesecurity/trufflehog