Skip to content

Commit ae20e7e

Browse files
committed
ci: give pip-audit a cache folder the runner owns
The Vulnerable Dependency Check fails on every pull request with "PermissionError: /home/runner, writable by another user". pip-audit looks up its default cache under the home folder through platformdirs, and platformdirs 4.14.8 refuses a home folder that another user can write to, which the self-hosted runner's is. Passing --cache-dir with the job's own temp folder skips that lookup.
1 parent be85362 commit ae20e7e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎.github/workflows/linters.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,6 @@ jobs:
104104
- name: Install and run pip-audit
105105
run: |
106106
pip install pip-audit
107-
pip-audit --desc on .
107+
# Its default cache sits under the home folder, which platformdirs refuses on this
108+
# self-hosted runner ("writable by another user"); the job's own temp folder is fine.
109+
pip-audit --desc on --cache-dir "$RUNNER_TEMP/pip-audit-cache" .

0 commit comments

Comments
 (0)