GHA: set persist-credentials: false

Suggested by zizmor GHA analysis tool.

Also:
- Move GH variables within single-quotes.
- Prefer single-quotes in shell code. (tidy-up)

Ref: https://github.com/actions/checkout/issues/485
Ref: https://github.com/actions/checkout/pull/1687
Ref: https://woodruffw.github.io/zizmor/

Closes #15746
This commit is contained in:
Viktor Szakats 2024-12-15 00:45:04 +01:00
parent 9991f255dd
commit ba9fe58d43
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
13 changed files with 72 additions and 5 deletions

View file

@ -55,6 +55,8 @@ jobs:
- run: git config --global core.autocrlf input
shell: pwsh
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
persist-credentials: false
- uses: cygwin/cygwin-install-action@006ad0b0946ca6d0a3ea2d4437677fa767392401 # v4
with:
platform: ${{ matrix.platform }}
@ -187,6 +189,8 @@ jobs:
shell: pwsh
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
persist-credentials: false
- uses: msys2/setup-msys2@d44ca8e88d8b43d56cf5670f91747359d5537f97 # v2
if: ${{ matrix.sys == 'msys' }}
@ -409,6 +413,8 @@ jobs:
- run: git config --global core.autocrlf input
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
persist-credentials: false
- name: 'configure'
timeout-minutes: 5
@ -495,6 +501,8 @@ jobs:
run: sudo apt-get --quiet 2 --option Dpkg::Use-Pty=0 install mingw-w64 ${{ matrix.build == 'cmake' && 'ninja-build' || '' }}
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
persist-credentials: false
- name: 'autoreconf'
if: ${{ matrix.build == 'autotools' }}
@ -662,6 +670,8 @@ jobs:
fail-fast: false
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
persist-credentials: false
- name: 'vcpkg cache setup'
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7