trufflesecurity / trufflehog

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

Broken Domains Used by Detectors #1998

Open rgmz opened 8 months ago

rgmz commented 8 months ago

Description

Since @lc is doing a great job validating existing detectors, I figured it would be useful to do a high-level check of any domains that no longer resolve or are expired.

I will continue to update this list with findings.

Broken

This could indicate that the specific endpoint is broken and needs attention (e.g., Gitter) or that the domain itself is no longer registered/resolves.

Parked

Other

fumblehool commented 8 months ago

@rgmz What if we add a function in Scanner{} to verify if host exists? I mean, something like s.isValidDetector() bool. Inside this function, we'll ping the api url to make sure domain exists.

This way, we can add a Github Action check to verify if any detector needs to be removed. WDYT?

rgmz commented 8 months ago

This could be automated to an extent: subdomains that no longer resolve or domains that have expired are easy to check, behavioral changes are a bit harder.

I am curious whether the team has an existing process to run all the TestX_FromChunk tests with live secrets and review problematic results.

ahrav commented 8 months ago

We have established a daily routine where an automated test suite is executed to assess the performance of our detectors, identifying any failures. However, a segment of these failures is attributed to the expiration of test tokens, which were configured during trial phases. Our current focus is on devising strategies to segregate genuine test failures from those arising due to expired credentials. Furthermore, we are in the preliminary stages of broadening our metrics around detection to garner more insights into the issue at hand.

As our detector arsenal expands, acquiring a deeper understanding of each detector's performance and validity becomes paramount. The experiences from this month alone have highlighted a noticeable count of detectors falling into obsolescence, reinforcing the necessity of this endeavor. 😅

This approach to automation, especially concerning the verification of subdomains and domain expirations, should hopefully aid in filtering out trivial issues, allowing us to prioritize addressing more complex behavioral changes.