Giter Club home page Giter Club logo

ministryofjustice.git-secrets-ahoy's Introduction

git-secrets-ahoy

Implementation of truffleHog in docker image with git hooks scripts

How to use:

The docker image allows easy execution of truffleHog against a chosen git repo. Note: the docker image expects to find your repo mounted inside the image at /git, see -v option in examples.

First...

cd your_git_repo
docker pull mojdigitalstudio/git-secrets-ahoy

Examples

To scan the entire commit history of your repo:

docker run -t --rm -v "$PWD:/git" mojdigitalstudio/git-secrets-ahoy

To scan the last commit, provide the --since_commit option with the commit hash of where to start scanning: e.g.

docker run -t --rm -v "$PWD:/git" mojdigitalstudio/git-secrets-ahoy --use_current_branch --since_commit $(git rev-parse HEAD~1)

Output in json:

docker run -t --rm -v "$PWD:/git" mojdigitalstudio/git-secrets-ahoy --json

Install Git Hooks

Run the install_hooks.sh helper script in the root of your repo.

bash <(curl -fsSL https://raw.githubusercontent.com/ministryofjustice/git-secrets-ahoy/master/install_hooks.sh)

post-commit

Just displays a warning if you commit something potentially sensitive. You can optionally revert your commit at this stage e.g. before you push it to a public repo.

pre-push

If truffleHog finds potentially sensitive data in your commits, the hook will abort the push. You have the option to disregard and push again with the --no-verify option, which will skip the pre-push hook.

ministryofjustice.git-secrets-ahoy's People

Contributors

glenjamin avatar mattops 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.