praetorian-inc / noseyparker

Nosey Parker is a command-line program that finds secrets and sensitive information in textual data and Git history.
Apache License 2.0
1.66k stars 79 forks source link

Add Bitbucket enumeration support #37

Open Coruscant11 opened 1 year ago

Coruscant11 commented 1 year ago

Hello, Since my company is actually working with Bitbucket, I would be glad to work in order to add the same features for Github to Bitbucket. For example listing Bitbucket project repositories, listing user repositories, and ensure that each feature of noseyparker is working on it.

I could take inspiration from the existing code for Github and make a Bitbucket version. Why not GitLab too in the future? :smile:

bradlarsen commented 1 year ago

Hello again @Coruscant11 :)

Yes, having support for enumerating repositories from Bitbucket would be welcome.

I'm not all that familiar with Bitbucket. It looks like they have a cloud-hosted offering as well as self-hosted options. Which type of deployment is most relevant to you? I would start with getting that working.

I took a quick look at things, and have some high-level notes and pointers for you:

bradlarsen commented 1 year ago

Again, I'm happy to answer any questions you may have about this!

Coruscant11 commented 1 year ago

Great answer as always!

Yes, the main goal would be to allow people to also scan their private Bitbucket server. Like in my case for my company. Normally, the cloud and the self-hosted has the same API scheme, so just giving the Bitbucket URL to Nosey Parker should be enough. As you said, we only need to call the API in order to find the git url, and reqwest should do the work perfectly.

We can generate authentication token with Bitbucket, and I think that it should be the way to use authentication on tools like scanners. Users should use read-only tokens for this kind of stuff and that is why I think that only supporting bearer token-based authentication is a good thing.

I will try to work on it and keep you updated if I need something! Thank you so much :smiley:

Coruscant11 commented 1 year ago

Hello, sorry I was quite busy the past months. I will work on this issue very soon :smile:

bradlarsen commented 1 year ago

No problem at all :)