Add-on can be installed from Atlassian Marketplace.
BitLeaks add-on enhaces security of your organization by preventing secret information leaks into source code repositories.
BitLeaks add-on detects attempts to push following cryptographic keys & secret tokens:
api_key
or apikey
)secret
)BitLeaks does not provide any configuration options right now.
In order to start preventing secrets leaks into repository just enable BitLeaks Add-On Hook after installation.
It can be done by navigating into Repository Settings
→ Hooks
in Bitbucket
interface and enabling it from there:
Try to push file with following contents into repository:
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABlwAAAAdzc2gtcn
NhAAAAAwEAAQAAAYEAlnlCvLhpIvRI9yps/qiALSl6DCkBSiOn4/ed5xqVZ+42KR6crpym
otPf2UV9jw6NXzY/ABcwKmDVavCS06gl7f26P9JvpMDgBFSj35Ejg3+rGYrsRWhMlcl+/b
fzg/Xj7Ucrv0hlER3oKXTWom7wgk45y9tPL7nM8vuAfw4s0wOi2ki9iEyhE/oWtAL/LUcl
/WEu6612EbNJ6g/XiVwcwisZWYTnqQ09EtL4L+DAblw7qUBa5ROSlyVmsD1jZdpUAXgmoE
gF4qy0aMi7Ht9F2hI+Y9DAOZOYHjRLmMvBJ15HYPtD9L+/4qdSm0jO8iMx+Ljfa7aaijbH
DHJ4FY3vb1kBXHJu338PaO6zQg8mJ6iQuE0JcSZTuwM89tM/S9i5tUgNSjpAR8KcukdNaa
gtigvE85hCqVdVs2UXmv25PKDlM3dUWAIU0ku8jf2/wCy/d0MH+Z3/MOWWGNt8quY087+R
H/cUtdptaF3Lra1Xusa3cHvPqpWcbXBRFFjKBuX5AAAFiI9JmymPSZspAAAAB3NzaC1yc2
EAAAGBAJZ5Qry4aSL0SPcqbP6ogC0pegwpAUojp+P3necalWfuNikenK6cpqLT39lFfY8O
jV82PwAXMCpg1WrwktOoJe39uj/Sb6TA4ARUo9+RI4N/qxmK7EVoTJXJfv2384P14+1HK7
9IZREd6Cl01qJu8IJOOcvbTy+5zPL7gH8OLNMDotp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