Skip to content

Script to analyse all repositories in a specific workspace in Bitbucket account through Trufflehog3

License

Notifications You must be signed in to change notification settings

lucapisciotta/bitbucketSearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bitbucket repositories security check with Trufflehog3

License: GPL v3 GitHub: Release

Table of Contents

About

This script permits you to analyze all repositories in your Bitbucket account (If you have got the permissions) through Trufflehog3 and find all occurrences based on the secrets.yaml file.

Prerequisites

There are few requirements to run this:

  • Python 3.6.0+
  • Trufflehog3
  • A git-credential-helper

The software has only been tested on OS X

Trufflehog3 is available as a pip module so, you can use this command to install it:

    pip install -U --use-feature=2020-resolver trufflehog3

Getting Started

To make all functions available, you must copy the dist file removing the .dist suffix.

cp secrets.yaml.dist secrets.yaml
cp credentials.json.dist credentials.json

After that, you can edit copied files, for credential.json you can fill it with your OAuth consumers credentials.
In secrets.yaml you find all secrets definition and, you can add yours. These secrets are used by the re Python module, be careful defining these.

The last step involves editing two variables in the bitbucketSearch.py file.

bitbucket_workspace = 'YOUR_WORKSPACE'
trufflehog_format = 'TRUFFLEHOG_FILE_FORMAT' # Valid format are {json, yaml and html}

Usage

Usage is simple, just run the following command:

python bitbucketSearch.py

To Do

  • Add function to enable command line arguments

Thanks To

Thanks to feeltheajf to have made Trufflehog3

About

Script to analyse all repositories in a specific workspace in Bitbucket account through Trufflehog3

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages