Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better documentation for connecting to self-hosted repos #3917

Open
elastic-pangolin opened this issue Feb 17, 2025 · 0 comments
Open

Better documentation for connecting to self-hosted repos #3917

elastic-pangolin opened this issue Feb 17, 2025 · 0 comments

Comments

@elastic-pangolin
Copy link

I have been trying for a week now to get this to work as a proof-of-concept, but it does not seem to be worth my time right now.

I want to scan repos on a self-hosted gitea, with a self-signed certificate.

Trufflehog would ideally run in a docker contain inside the gocd pipeline, and only proceed to clone and build the project if no credentials were found in the source repo. To do this, I have created a new Dockerfile in which I add the custom certificate, because I saw no other way to do it, is this right?

Now I can connect to the server and scan public repos on there, but to scan private ones, I need to authenticate. I have seen recommended to use ssh (not an option for a service account) or to use the scheme
https://user:password@gitea.custom.org
which seems to be a security risk (exposing username and password/PAT) in itself.
The flag --token=... is only available to scan e.g. github, not a 'plain' git.

How can I securely (i.e. via a docker secret) pass the authentication details to trufflehog?

Is the best option to clone and then scan the local repo with file:// ?

Please create some more documentation for this use-case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant