Name: cred-alert
Owner: Pivotal Cloud Foundry
Description: Scans repos for credentials and then shouts if it finds them
Created: 2016-06-08 19:30:04.0
Updated: 2018-05-24 16:28:30.0
Pushed: 2018-05-24 16:28:29.0
Size: 6108
Language: Go
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
scans repos for credentials and then shouts if it finds them
Pre-built versions of the cred-alert-cli
binary are available for download. To
install download the correct version (macOs or Linux),
rename the file cred-alert-cli
, make it executable, and move it to a directory in ${PATH}
.
ame=$(uname | awk '{print tolower($1)}')
-o cred-alert-cli \
tps://s3.amazonaws.com/cred-alert/cli/current-release/cred-alert-cli_${os_name}
d 755 cred-alert-cli
red-alert-cli /usr/local/bin # <= or other directory in ${PATH}
The command line application can be built with the following command. Your
$GOPATH
should already be set correctly by direnv
.
$ go build cred-alert/cmd/cred-alert-cli
The default behavior of the cli is to read from standard input, scan for secrets, and report any matches on standard output. It can also be used to recursively scan files in a directory. Use –help to see all options.
$ ./cred-alert-cli scan -f src/cred-alert/product.zip
$ ./cred-alert-cli scan -f src/cred-alert
$ cat src/cred-alert/sniff/patterns/samples_for_test.go | ./cred-alert-cli scan
Cred alert supports scanning diffs on standard input. When scanning a diff use the
--diff
flag.
$ git diff | ./cred-alert-cli scan --diff
To override the default RegExp in order to scan for a specific vulnerability, use –regexp for a single RegExp or –regexp-file for newline delimited RegExp file
$ git diff | ./cred-alert-cli scan --diff --regexp-file custom-regexp
0
No error occurred and no credentials found
1
Miscellaneous error occurred
3
Found credentials
Cred-Alert CLI Instructions - SIMPLE
You'll need to install gosub
in order to manage the submodules of this
project. It can be installed by running the following command (try to install
this in an outer $GOPATH so that you do not clutter up this directory with the
tooling):
$ go get github.com/vito/gosub
In order to have your $GOPATH and $PATH set up properly when you enter this
directory you should install direnv
. On macOS you can install this by running
this command and following the instructions to set up your shell:
$ brew install direnv
The tests can be run using the ginkgo
command line tool. This can be
installed with:
$ go install github.com/onsi/ginkgo/ginkgo
The fakes can be generated using the counterfeiter
tool. This can be
installed with:
$ go get github.com/maxbrunsfeld/counterfeiter
You can go get
and edit the files like normal in this repository. If any
dependencies have changed them make sure to run scripts/sync-submodules
in
order to make sure that the submodules are updated correctly.
You can generate a pretty commit message by running scripts/commit-with-log
.
The srcint cli is used to query all the repos that cred-alert scans for a particular pattern. It can take a text or a regex as query
More information available here