From c39baefa782b019c80fcc65ab4bd1a25cc8b44f8 Mon Sep 17 00:00:00 2001 From: Darren <3759672+svdarren@users.noreply.github.com> Date: Mon, 23 Dec 2019 22:17:19 -0600 Subject: [PATCH] paste secret scanner workflow copied from https://github.com/svdarren/svdarren.github.io/blob/secrets-action/.github/workflows/secrets.yml --- .github/workflows/secrets.yml | 61 +++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/secrets.yml diff --git a/.github/workflows/secrets.yml b/.github/workflows/secrets.yml new file mode 100644 index 0000000..926e9e1 --- /dev/null +++ b/.github/workflows/secrets.yml @@ -0,0 +1,61 @@ +name: Scan for Secrets +on: [push] + +jobs: + trufflehog: + name: Scan with TruffleHog + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + # @todo port trufflehog parameters to new call + - uses: max/secret-scan@1.0.0 + - uses: edplato/trufflehog-actions-scan@v0.9e-beta + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install truffleHog + - run: trufflehog $GITHUB_WORKSPACE + + gitleak: + name: Scan with GitLeak + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Go v1 + uses: actions/setup-go@v1 + with: + go-version: 1.13 + id: go + - name: Install dependencies + # @todo should this 'go get' be removed? + run: | + go get -v -t -d ./... + if [ -f Gopkg.toml ]; then + curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh + dep ensure + fi + go get -u github.com/zricethezav/gitleaks + + # @todo command is failing + - run: go run gitleaks -v --exclude-forks --redact --threads=1 --branch=$GITHUB_REF --repo-path=$GITHUB_WORKSPACE + + # @todo port gitleaks parameters to new call + - uses: eshork/gitleaks-action@v1.0.0 + # uses: CySeq/gitcret@v2 + + seekret: + name: Scan with Seekret + runs-on: [ubuntu-latest] + steps: + # @todo implement a seekret call + - run: echo "hello world" + # https://github.com/cds-snc/github-actions/tree/master/seekret +