All Projects → duo-labs → Secret Bridge

duo-labs / Secret Bridge

Licence: bsd-3-clause
Monitors Github for leaked secrets

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Secret Bridge

Subdomainizer
A tool to find subdomains and interesting things hidden inside, external Javascript files of page, folder, and Github.
Stars: ✭ 915 (+603.85%)
Mutual labels:  secrets
Helm Secrets
DEPRECATED A helm plugin that help manage secrets with Git workflow and store them anywhere
Stars: ✭ 1,129 (+768.46%)
Mutual labels:  secrets
Awx Migrate
Tool to migrate AWX to a new instance
Stars: ✭ 89 (-31.54%)
Mutual labels:  secrets
Drone Vault
Drone plugin for integrating with the Vault secrets manager
Stars: ✭ 36 (-72.31%)
Mutual labels:  secrets
Aws Secrets Manager Credentials Provider Plugin
AWS Secrets Manager Credentials Provider for Jenkins
Stars: ✭ 45 (-65.38%)
Mutual labels:  secrets
Secretserver
Secret Server PowerShell Module
Stars: ✭ 82 (-36.92%)
Mutual labels:  secrets
Whaler
Program to reverse Docker images into Dockerfiles
Stars: ✭ 670 (+415.38%)
Mutual labels:  secrets
K8s Gitops
Kubernetes cluster managed by GitOps - Git as a single source of truth, automated pipelines, declarative everything, next-generation DevOps
Stars: ✭ 110 (-15.38%)
Mutual labels:  secrets
Secrethub Go
Go client library for the SecretHub Secrets Management API
Stars: ✭ 50 (-61.54%)
Mutual labels:  secrets
Catesta
Catesta is a PowerShell module project generator. It uses templates to rapidly scaffold test and build integration for a variety of CI/CD platforms.
Stars: ✭ 88 (-32.31%)
Mutual labels:  secrets
Transcrypt
transparently encrypt files within a git repository
Stars: ✭ 993 (+663.85%)
Mutual labels:  secrets
Credentials Binding Plugin
Stars: ✭ 39 (-70%)
Mutual labels:  secrets
Envkey App
Secure, human-friendly, cross-platform secrets and config.
Stars: ✭ 83 (-36.15%)
Mutual labels:  secrets
Guardedbox
Online client-side manager for secure storage and secrets sharing.
Stars: ✭ 34 (-73.85%)
Mutual labels:  secrets
Secretary
DEPRECATED Secrets management for dynamic environments
Stars: ✭ 93 (-28.46%)
Mutual labels:  secrets
Secretscanner
Find secrets and passwords in container images and file systems
Stars: ✭ 895 (+588.46%)
Mutual labels:  secrets
Terraform Provider Credstash
Terraform provider for secrets stored with credstash
Stars: ✭ 68 (-47.69%)
Mutual labels:  secrets
Kubernetes Reflector
Custom Kubernetes controller that can be used to replicate secrets, configmaps and certificates.
Stars: ✭ 129 (-0.77%)
Mutual labels:  secrets
Squealer
Telling tales on you for leaking secrets!
Stars: ✭ 97 (-25.38%)
Mutual labels:  secrets
Secrets
secrets kept safe
Stars: ✭ 85 (-34.62%)
Mutual labels:  secrets

secret-bridge

A bridge to help increase your ability to detect secrets shared on Github.

More details on the methodology can be found in our blog post.

How It Works

There are two ways this can operate:

  • Event Polling - In this mode, the script polls the Github Events API for an organization, developer, or set or repositories. This is useful when you may not have control over the thing you're watching.
  • Webhook - In this mode, the script sets up a server which can receive webhook events. This is useful when you have control over the thing you're watching, since it provides data in near real-time.

Once events are received indicating that new code has been pushed, this script executes configured detectors to detect secrets in the changes. At this time, the following detectors are supported:

A more general listing of tools which can be used to detect secrets in Git repositories can be found in TOOLS.md

If a secret is found, it is sent upstream to a notifier. At this time, we support notifying both via stdout as well as Slack and Microsoft Teams.

Installation

Via Docker

The easiest way to get started is by using our Docker image. You can see how to run the Docker image in the Usage section.

Installation from Source

First, you need to clone the repository:

git clone https://github.com/duo-labs/secret-bridge.git

Then, install the required dependencies:

pip install -r requirements.txt

Configuration

Configuration is done through config.toml. In this file, you set your access_token, the organizations, developers, and repositories you want to monitor for secrets, and more.

Setting Up the Access Token

You may wish to avoid having the access token in a file. Instead, you can set this value to env, and put the access token in the GITHUB_WATCHER_TOKEN environment variable.

Setting Up the Monitors

If you're monitoring via event polling (as opposed to using the webhook server), then you can configure what to monitor via the monitors configuration value.

You have the option of configuring one or more Github organization, user, or repository.

Setting Up the Detectors

This tool doesn't actually implement secret detection for Git repositories, since we consider that largely a solved problem. Instead, we handle running various secret detection tools for you in near real-time.

Detectors are configured via the detectors configuration value. Right now, the following values are accepted:

  • detect-secrets
  • git-secrets
  • trufflehog

Note: It's expected that the detector you use is installed and available on your $PATH. If you are running this via the Docker image, all the required tools are pre-installed.

Setting Up the Notifiers

If a secret is detected, we will notify you using your configured notifiers. Currently, the two notification methods are printing to the console, and notifying via a Slack/Teams webhook.

For webhook notifications, both Slack and Microsoft Teams implementations work identically: the JSON structure used to call the Slack webhook is the same as for Microsoft Teams, the implementation is just currently not updated to reflect this. To configure Teams notifications, follow these same steps but with a Teams Connector.

To configure Slack/Teams notifications, create the following configuration option with the webhook_url provided by Slack:

[notifiers.slack_webhook]
    webhook_url='your_webhook_url'

Usage

python main.py --help
Usage: main.py [OPTIONS] COMMAND [ARGS]...

Options:
  -f, --config PATH  [default: config.toml]
  -v, --verbose      Print verbose debug information
  --help             Show this message and exit.

Commands:
  poll
  webhook

Running Via Docker

docker run -ti --rm -e GITHUB_WATCHER_TOKEN=your_access_token duolabs/secret-bridge poll

Note that this is the only docker command needed to get the tool up and running. Relevant images will be automatically pulled if they are not found locally.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].