Merge pull request #14 from eSlider/fix/secret-scan-workflow#3
Lint / Lint (push) Skipped
Release Please / Release Please (push) Skipped
Release / GoReleaser (push) Skipped
Tests / Test (Go 1.22 / ubuntu-latest) (push) Skipped
Tests / Test (Go 1.23 / ubuntu-latest) (push) Skipped
Tests / Test (Go stable / macos-latest) (push) Skipped
Tests / Test (Go stable / ubuntu-latest) (push) Skipped
Tests / Test (Go stable / windows-latest) (push) Skipped
Secret scan / Secret scan (gitleaks) (push) Successful in 4s
Secret scan / Secret scan (gitleaks) (pull_request) Successful in 3s
Tests / Test (Go 1.22 / ubuntu-latest) (pull_request) Successful in 19s
Tests / Test (Go 1.23 / ubuntu-latest) (pull_request) Successful in 44s
Lint / Lint (pull_request) Successful in 49s
Tests / Test (Go stable / ubuntu-latest) (pull_request) Successful in 1m9s
Tests / Test (Go stable / macos-latest) (pull_request) Canceled after 0s
Tests / Test (Go stable / windows-latest) (pull_request) Canceled after 0s
Lint / Lint (push) Skipped
Release Please / Release Please (push) Skipped
Release / GoReleaser (push) Skipped
Tests / Test (Go 1.22 / ubuntu-latest) (push) Skipped
Tests / Test (Go 1.23 / ubuntu-latest) (push) Skipped
Tests / Test (Go stable / macos-latest) (push) Skipped
Tests / Test (Go stable / ubuntu-latest) (push) Skipped
Tests / Test (Go stable / windows-latest) (push) Skipped
Secret scan / Secret scan (gitleaks) (push) Successful in 4s
Secret scan / Secret scan (gitleaks) (pull_request) Successful in 3s
Tests / Test (Go 1.22 / ubuntu-latest) (pull_request) Successful in 19s
Tests / Test (Go 1.23 / ubuntu-latest) (pull_request) Successful in 44s
Lint / Lint (pull_request) Successful in 49s
Tests / Test (Go stable / ubuntu-latest) (pull_request) Successful in 1m9s
Tests / Test (Go stable / macos-latest) (pull_request) Canceled after 0s
Tests / Test (Go stable / windows-latest) (pull_request) Canceled after 0s
ci(secret-scan): fix gitleaks --source path (docker action host path)
This commit is contained in:
@@ -34,8 +34,20 @@ jobs:
|
||||
echo "Scanning range: $RANGE"
|
||||
|
||||
- name: Gitleaks (diff-only, fail on leak)
|
||||
uses: docker://zricethezav/gitleaks:latest
|
||||
env:
|
||||
GITLEAKS_RANGE: ${{ env.RANGE }}
|
||||
with:
|
||||
args: detect --source "${{ github.workspace }}" --log-opts="$GITLEAKS_RANGE" --redact --verbose
|
||||
run: |
|
||||
set -euo pipefail
|
||||
# install the gitleaks binary (linux-amd64) instead of a docker action:
|
||||
# the docker://zricethezav/gitleaks action hardcodes /github/workspace,
|
||||
# which does not exist on the Gitea (act) runner. $GITHUB_WORKSPACE is the
|
||||
# checkout dir on BOTH runners (GitHub and Gitea act).
|
||||
curl -fsSLo /tmp/gitleaks.tar.gz \
|
||||
https://github.com/gitleaks/gitleaks/releases/download/v8.30.1/gitleaks_8.30.1_linux_x64.tar.gz
|
||||
tar -xzf /tmp/gitleaks.tar.gz -C /tmp gitleaks
|
||||
chmod +x /tmp/gitleaks
|
||||
/tmp/gitleaks detect \
|
||||
--source "$GITHUB_WORKSPACE" \
|
||||
--log-opts="$GITLEAKS_RANGE" \
|
||||
--redact \
|
||||
--verbose
|
||||
|
||||
Reference in New Issue
Block a user