Closed rgmz closed 1 year ago
@rgmz
TruffleHog passes the githubScanEndpoint for GitHub_Token and GitHub_GithubApp auth, but not GitHub_BasicAuth or GitHub_Unauthenticated. This is not really an inconvenience but is nevertheless a bug.
Is this a bug for GitHub_Unauthenticated
? If a wants to scan github unauthenticated wouldn't we want to always hit api.github.com
?
Updated Basic Auth makes sense to me though.
Is this a bug for GitHub_Unauthenticated? If a wants to scan github unauthenticated wouldn't we want to always hit api.github.com?
The use case is for self-hosted instances of GitHub Enterprise Server. Arguably you should have credentials for private instances; regardless, TruffleHog ignoring the endpoint option and returning a 404 if you accidentally forget to pass in auth is a confusing experience.
Community Note
TruffleHog Version
3.43.0
Trace Output
TruffleHog passes the
githubScanEndpoint
forGitHub_Token
andGitHub_GithubApp
auth, but notGitHub_BasicAuth
orGitHub_Unauthenticated
. This is not really an inconvenience but is nevertheless a bug.https://github.com/trufflesecurity/trufflehog/blob/a99d89d71110b1111bb7f7724067fa8a43a2319e/pkg/sources/github/github.go#L353-L366
Expected Behavior
TruffleHog calls the endpoint specified with
--endpoint
and notapi.github.com
.Actual Behavior
TruffleHog ignores
--endpoint
and callsapi.github.com
:Steps to Reproduce
N/A
References
N/A