Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README: added command line usage hints #81

Merged
merged 1 commit into from
Oct 3, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ this package is designed with the enterprise client in mind: providing a

This way, you create a
[separation of concern](https://en.wikipedia.org/wiki/Separation_of_concerns):
accepting that there may *currently* be secrets hiding in your large repository,
accepting that there may *currently* be secrets hiding in your large repository
(this is what we refer to as a _baseline_),
but preventing this issue from getting any larger, without dealing with the
potentially gargantuous effort of moving existing secrets away.

Expand All @@ -39,7 +40,7 @@ For a look at recent changes, please see the
$ detect-secrets scan > .secrets.baseline
```

### Pre-commit Hook
### pre-commit Hook

```
$ cat .pre-commit-config.yaml
Expand All @@ -51,7 +52,7 @@ $ cat .pre-commit-config.yaml
exclude: .*/tests/.*
```

### Auditing Baseline
### Auditing a Baseline

```
$ detect-secrets audit .secrets.baseline
Expand All @@ -66,6 +67,13 @@ For upgrading baselines lower than that version, just recreate it.
$ detect-secrets scan --update .secrets.baseline
```

### Command Line

`detect-secrets` is designed to be used as a git pre-commit hook, but you can also invoke `detect-secrets scan [path]` directly (`path` defaults to `.` if not specified).

It should be noted that by default, `detect-secrets scan` only operates on files that are tracked by git. So if you intend to scan files outside of a git repository, you will need to pass the `--all-files` flag.


## Installation

There are three components that you can setup, depending on your purposes.
Expand Down