From 53433b644051b675f79260fa3d49f8a5c74e9841 Mon Sep 17 00:00:00 2001 From: Klaus Hartl Date: Mon, 20 Sep 2021 09:35:49 +0200 Subject: [PATCH 1/7] Revert "Add secret for testing" This reverts commit a32a5c7e1a3d250bf18a080a44a764d9b93b9690. --- password.txt | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 password.txt diff --git a/password.txt b/password.txt deleted file mode 100644 index 7532a65..0000000 --- a/password.txt +++ /dev/null @@ -1,2 +0,0 @@ -user=John -password=7FAB324C-585E-4085-874A-161FBA2AEDE8 From 75300727c398853b5a29f4cb4b844351f7091a5d Mon Sep 17 00:00:00 2001 From: Klaus Hartl Date: Mon, 20 Sep 2021 09:37:00 +0200 Subject: [PATCH 2/7] Detect in regular incoming commits on main --- .github/workflows/main.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5448f01..2631f85 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,5 +15,3 @@ jobs: fetch-depth: 0 # Ensure Talisman can operate on a valid revision range - name: Test action uses: ./ - with: - remote-sha: 89df42eb70ebff472b384403e6b17e44391eba79 From 9946bb8931c6d9f781c8163b823da153ea3d8ac9 Mon Sep 17 00:00:00 2001 From: Klaus Hartl Date: Thu, 23 Sep 2021 18:01:24 +0200 Subject: [PATCH 3/7] Run test workflow from any branch for testing --- .github/workflows/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2631f85..f325bba 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,7 +2,6 @@ name: Test on: push: - branches: [main] workflow_dispatch: jobs: From 4a31b2b153638b6295e0e51f2157c195d8400bf0 Mon Sep 17 00:00:00 2001 From: Klaus Hartl Date: Thu, 23 Sep 2021 20:39:28 +0200 Subject: [PATCH 4/7] Downgrade Talisman to v1.11.0 Overlooked that v1.22.0 was a preview anyway, there was a problem with entries in .talismanrc not correctly being considered. For some reason v1.11.0 didn't run in Alpine though, thus I switched to Ubuntu. Fixes #1 --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1d4a597..e451c1e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ -FROM alpine:3.13.6 +FROM ubuntu:20.04 -RUN apk update && apk add git +RUN apt update && apt install -y git -ADD ["https://github.com/thoughtworks/talisman/releases/download/v1.22.0/talisman_linux_amd64", "/talisman"] +ADD ["https://github.com/thoughtworks/talisman/releases/download/v1.11.0/talisman_linux_amd64", "/talisman"] RUN chmod +x /talisman COPY entrypoint.sh /entrypoint.sh From cd348e99542f79a432669c5996dc98aeb261448a Mon Sep 17 00:00:00 2001 From: Klaus Hartl Date: Thu, 23 Sep 2021 20:48:14 +0200 Subject: [PATCH 5/7] Brush up readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 63da498..5d54130 100644 --- a/README.md +++ b/README.md @@ -7,12 +7,12 @@ This action uses [Talisman](https://thoughtworks.github.io/talisman/) to scan th ```yml steps: - name: Detect secrets with Talisman in incoming commits - uses: carhartl/talisman-secrets-scan-action@v1.0 + uses: carhartl/talisman-secrets-scan-action@v1.0.1 ``` ## Caveat -When using this along with the `actions/checkout@v2` step, you'll need to configure it to fetch the entire history: +When using this along with the `actions/checkout@v2` step you'll need to configure it to avoid a too shallow clone: ```yml - uses: actions/checkout@v2 @@ -20,7 +20,7 @@ When using this along with the `actions/checkout@v2` step, you'll need to config fetch-depth: 0 ``` -Otherwise you'll run into talisman erroring out while it's trying to execute git with an invalid revision range: +Otherwise you may run into Talisman erroring out while it's trying to execute git with an invalid revision range: ``` time="2021-09-19T07:07:32Z" level=fatal msg="Git command execution failed" command="git diff 0c4a631e70056a95df1c235d238a80828e07cf9c..a32a5c7e1a3d250bf18a080a44a764d9b93b9690 --name-only --diff-filter=ACM" dir=/github/workspace error="exit status 128" output="fatal: Invalid revision range 0c4a631e70056a95df1c235d238a80828e07cf9c..a32a5c7e1a3d250bf18a080a44a764d9b93b9690\n" From 832c27cc84b45c6b52a3408691b63b952516e843 Mon Sep 17 00:00:00 2001 From: Klaus Hartl Date: Thu, 23 Sep 2021 20:52:39 +0200 Subject: [PATCH 6/7] Add .talismanrc --- .talismanrc | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .talismanrc diff --git a/.talismanrc b/.talismanrc new file mode 100644 index 0000000..f43bf9d --- /dev/null +++ b/.talismanrc @@ -0,0 +1,3 @@ +fileignoreconfig: +- filename: README.md + checksum: db50071255cfd6687a9011c05ef82c985afb25942a6537a839e30e8225445d72 From 9b5b58e1c5f5bfa0e9cd2f79b207342f48f2be47 Mon Sep 17 00:00:00 2001 From: Klaus Hartl Date: Thu, 10 Mar 2022 15:03:59 +0100 Subject: [PATCH 7/7] Upgrade Talisman to v1.25.0 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e451c1e..46be0e5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu:20.04 RUN apt update && apt install -y git -ADD ["https://github.com/thoughtworks/talisman/releases/download/v1.11.0/talisman_linux_amd64", "/talisman"] +ADD ["https://github.com/thoughtworks/talisman/releases/download/v1.25.0/talisman_linux_amd64", "/talisman"] RUN chmod +x /talisman COPY entrypoint.sh /entrypoint.sh