Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Can I block secrets from getting to git?

Jeff C November 19, 2019

I would like to find a way to block secrets (private keys, passwords, tokens) from being accepted to git.
I found this page: https://confluence.atlassian.com/bitbucketserverkb/how-to-scan-for-and-remove-passwords-or-secrets-in-bitbucket-server-repositories-973473524.html

But that is for bitbucket server. Is there a similar solution for bitbucket cloud?

2 answers

1 accepted

2 votes
Answer accepted
Mikael Sandberg
Community Champion
November 19, 2019

Hi @Jeff C,

Welcome to the Atlassian Community.

Bitbucket Cloud does not have hooks, but you can achieve it by using Git hooks. Take a look at these two blog posts on how to share hooks with your team:

https://www.darrenlester.com/blog/including-hooks-in-a-git-repository

https://www.viget.com/articles/two-ways-to-share-git-hooks-with-your-team/

The only drawback is that you would have to make sure each user that access your repository installs those hooks. There is a request to have hooks added to Bitbucket Cloud, BCLOUD-10471. Vote on it to let Atlassian know that you are also interested in seeing this implemented.  

Jeff C November 19, 2019

thank you very much :)

2 votes
Egor Kovetskiy
Contributor
November 20, 2019

Hi, you can block secrets from getting to git (only for Bitbucket Server) using  BitLeaks Bitbucket Add-on.

Let me know if you would like to get a discounter after the evaluation period I can issue one as community support (I'm co-maintainer).

Mikael Sandberg
Community Champion
November 20, 2019

@Egor Kovetskiy, the question was if it can be done on Bitbucket Cloud, and the app you are referencing is only working on Bitbucket Server...

Jeff C November 20, 2019

even though i accepted the other answer i do appreciate your response. thank you.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events