From d8394f4bbbacd31acec1043e272957ddb475cfa0 Mon Sep 17 00:00:00 2001 From: Barak Amar Date: Mon, 23 Nov 2020 13:02:13 +0200 Subject: [PATCH 1/4] fix gitleaks configuration --- .gitleaks.toml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.gitleaks.toml b/.gitleaks.toml index 14960fbbd73..f1f34647483 100644 --- a/.gitleaks.toml +++ b/.gitleaks.toml @@ -4,12 +4,11 @@ title = "gitleaks config" description = "AWS Manager ID" regex = '''(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}''' tags = ["key", "AWS"] - [[rules.allowlist]] - regex = '''(AKIAIOSFODNN7EXAMPLE|AKIAIO5FODNN7EXAMPLE|AKIA6HHRMQLJMDVXY6OR|AKIAIOSFODNN3EXAMPLE|AKIAIOSFODNS3EXAMPLE|AKIAIOSFOLAKEEXAMPLE|AKIAJ5SI5UWYOAXGHOXQ|AKIAJF2VSETNW3RTP3ZQ|AKIAJF4EV2DBC56IOAOQ|AKIAJIEMTME6UEVWXB2Q|AKIAJKKRUNSYM5MZSHDQ|AKIAJKLO4PDKEBQUDHYQ|AKIAJLQLVNL2XZ7EH6RQ|AKIAJNYOQZSWBSSXURPQ|AKIAJTZZYQTU5YGV4O3Q|AKIAJV3OAIYRIVODAQVQ|AKIAJVD5P3WTAFH7IN5Q|AKIAJXQPFV4FZH7UMMAQ|AKIAYRJJ6GNGCYQEPB7A).*''' - description = "ignore some aws keys" + [rules.allowlist] + description = "ignore some aws keys" + regex = '''(AKIAIOSFODNN7EXAMPLE|AKIAIO5FODNN7EXAMPLE|AKIA6HHRMQLJMDVXY6OR|AKIAIOSFODNN3EXAMPLE|AKIAIOSFODNS3EXAMPLE|AKIAIOSFOLAKEEXAMPLE|AKIAJ5SI5UWYOAXGHOXQ|AKIAJF2VSETNW3RTP3ZQ|AKIAJF4EV2DBC56IOAOQ|AKIAJIEMTME6UEVWXB2Q|AKIAJKKRUNSYM5MZSHDQ|AKIAJKLO4PDKEBQUDHYQ|AKIAJLQLVNL2XZ7EH6RQ|AKIAJNYOQZSWBSSXURPQ|AKIAJTZZYQTU5YGV4O3Q|AKIAJV3OAIYRIVODAQVQ|AKIAJVD5P3WTAFH7IN5Q|AKIAJXQPFV4FZH7UMMAQ|AKIAYRJJ6GNGCYQEPB7A).*''' [allowlist] - description = "Allowlisted files" - files = ['''^\.?gitleaks.toml$''', - '''(.*?)(jpg|gif|doc|pdf|bin)$''', - '''(go.mod|go.sum)$'''] \ No newline at end of file + description = "Allowlisted files" + files = [ '''^\.?gitleaks.toml$''', '''(.*?)(jpg|gif|doc|pdf|bin)$''', '''(go.mod|go.sum)$'''] + From 4af383df54775c6a3df93b8c961e60331bc0f73f Mon Sep 17 00:00:00 2001 From: Barak Amar Date: Mon, 23 Nov 2020 15:24:57 +0200 Subject: [PATCH 2/4] update gitleaks action version --- .github/workflows/go.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index a8c94d47115..53682ad5235 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -23,7 +23,7 @@ jobs: env: GOLANGCI_LINT_FLAGS: --out-format github-actions - name: gitLeaks - uses: zricethezav/gitleaks-action@v1.1.2 + uses: zricethezav/gitleaks-action@v1.1.4 test: name: Run Test Suite From c75e5acd5269cff6a7780e175e2878359e8e40ae Mon Sep 17 00:00:00 2001 From: Barak Amar Date: Mon, 23 Nov 2020 15:33:51 +0200 Subject: [PATCH 3/4] specify fetch deptch on checkout --- .github/workflows/go.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index 53682ad5235..2aed7dd9b64 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -11,6 +11,8 @@ jobs: steps: - name: Check-out code uses: actions/checkout@v2 + with: + fetch-depth: '0' - name: Setup Go uses: actions/setup-go@v2 with: From 94342d762756777fee45ad8d56d1f9cf3703a1aa Mon Sep 17 00:00:00 2001 From: Barak Amar Date: Mon, 23 Nov 2020 15:34:35 +0200 Subject: [PATCH 4/4] fix depth to 1 --- .github/workflows/go.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index 2aed7dd9b64..7b146dbc1dd 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -12,7 +12,7 @@ jobs: - name: Check-out code uses: actions/checkout@v2 with: - fetch-depth: '0' + fetch-depth: '1' - name: Setup Go uses: actions/setup-go@v2 with: