trufflehog icon indicating copy to clipboard operation
trufflehog copied to clipboard

Support for self hosted git repositories

Open 036 opened this issue 3 years ago • 1 comments

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

We would like to use Trufflehog to scan our git repositories within our self-hosted git before moving to a non self-hosted platform. I've tried the git option

trufflehog git http://selfhosted.git.com/myrepo.git

It is a self hosted Bitbucket instance but Trufflehog asks me to login to Atlassians Bitbucket. It would be great to add support for self hosted Bitbucket & Gitlab instances.

Problem to be Addressed

Being able to run Trufflehog against a self-hosted git system. Using the filesystem option does now scan git history so we cannot use filesystem as an alternative.

Description of the Preferred Solution

The preferred solution would be something along the lines of

trufflehog git http://selfhosted.git.com/myrepo.git --selfhosted=true --system=bitbucket

This would allow you to specify the type of hosted system and whether it is self-hosted.

Additional Context

References

036 avatar Jun 30 '22 09:06 036

Are there any plans on this? Just set up trufflehog to check self-hosted gitlab and was very saddened to find out it's unsupported as of now.

thistehneisen avatar Dec 14 '22 07:12 thistehneisen

This is supported. You can auth using ssh or basic auth https://github.com/trufflesecurity/trufflehog/blob/b3040b1227b6d46392e7633570a38464c13402bc/pkg/sources/git/git.go#L224-L240

zricethezav avatar Dec 14 '23 21:12 zricethezav