GithubHelp home page GithubHelp logo

azure-devops-gitleaks-monitor's Introduction

azure-devops-gitleaks-monitor

Gitleaks wrapper to monitor Azure DevOps repositories for new secrets and send the results to a Slack channel or a csv file.

If a repository has already been scanned, only new commits will be analyzed.

Setup

Install Gitleaks

GO111MODULE=on go get github.com/zricethezav/gitleaks/v7

Install azure-devops-gitleaks-monitor

python3 setup.py install

Usage

usage: azure-devops-gitleaks-monitor [-h] [--config CONFIG_FILE] [--cache CACHE_PATH] [--all] [--output OUTPUT_FILE] [-v] [-q]

Azure DevOps Gitleaks monitor

optional arguments:
  -h, --help            show this help message and exit
  --config CONFIG_FILE, -c CONFIG_FILE
                        Configuration file. Defaults to config.yaml
  --cache CACHE_PATH    Cache location. Defaults to ~/.azure-devops-secret-finder
  --all, -a             Also outputs the previously found results.
  --output OUTPUT_FILE, -o OUTPUT_FILE
                        File where a CSV report will be saved. Defaults to /dev/null
  --slack, -s           Send slack notifications to the configured webhooks when secrets are found.                      
  --lock, -l            Only allow one instance of the tool to run at the time.
  -v                    Increases output verbosity.
  -q                    Sets log level to error.

Recommended usage

Generate a report with all the existing secrets. You might need to configure custom whitelists to avoid false positives.

azure-devops-gitleaks-monitor --config config.xml --all --output report.csv

Create a cron job that executes the following command to send new secrets to Slack. It is recommended to run the tool on all repositories at least once before to avoid sending too many messages to Slack.

azure-devops-gitleaks-monitor --config config.xml --lock --slack

License

Copyright © 2021, GSoft inc. This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license here.

azure-devops-gitleaks-monitor's People

Contributors

mlefebvre avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.