Skip to content

Commit 5252471

Browse files
committed
Replace action/upload-artifact with a more secure alternative
Related: AAP-46204
1 parent 9958e82 commit 5252471

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

.github/workflows/tox.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,9 @@ jobs:
175175
echo "$SCRIPTS_DIR" >> $GITHUB_PATH
176176
echo "Added $SCRIPTS_DIR to PATH to avoid further issues."
177177
fi
178-
python3 -m pip install --disable-pip-version-check --upgrade --user --break-system-packages pip uv 'tox>=4.23.2' 'tox-uv>=1.16.0'
178+
python3 -m pip install --disable-pip-version-check --upgrade --user --break-system-packages pip uv 'tox>=4.23.2' 'tox-uv>=1.16.0' tox-extra
179179
which -a uv pip tox
180+
python3 -m pip install git+https://github.com/tox-dev/tox.git@fix/3542
180181
echo "uv tool update-shell"
181182
tox --version
182183
echo "Log installed dists"
@@ -200,8 +201,8 @@ jobs:
200201
if: ${{ inputs.run_post }}
201202
run: ${{ inputs.run_post }}
202203

203-
- name: Archive logs and coverage data
204-
uses: actions/upload-artifact@v4
204+
- name: Archive logs and coverage data (secured)
205+
uses: coactions/upload-artifact@fix/multi-folders
205206
with:
206207
name: logs-${{ matrix.name }}.zip
207208
include-hidden-files: true
@@ -225,6 +226,7 @@ jobs:
225226
# shellcheck disable=SC2016
226227
echo -n '::error file=git-status::'
227228
printf '### Failed as git reported modified and/or untracked files\n```\n%s\n```\n' "$(git status -s)" | tee -a "$GITHUB_STEP_SUMMARY"
229+
git diff
228230
exit 99
229231
fi
230232
# https://github.com/actions/toolkit/issues/193

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,11 @@ repos:
3636
- id: ansible-lint
3737
language_version: "3.12"
3838
args: [--fix]
39+
- repo: https://github.com/gitleaks/gitleaks
40+
rev: v8.27.0
41+
hooks:
42+
- id: gitleaks
43+
name: Look for leaked decrets in all files, including build logs
44+
entry: gitleaks dir -v --redact=100 --no-banner --max-archive-depth=2 .
45+
pass_filenames: false
46+
always_run: true

tox.ini

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ uv_seed = true
6363
[testenv:docs]
6464
description = Build docs
6565
extras = docs
66-
passenv =
67-
*
6866
setenv =
6967
# see https://github.com/tox-dev/tox/issues/2092#issuecomment-2538729079
7068
# see https://github.com/Kozea/CairoSVG/issues/392#issuecomment-2538707712

0 commit comments

Comments
 (0)