Skip to content

ci: give pip-audit a cache folder the runner owns - #3378

Merged
pateljannat merged 1 commit into
frappe:developfrom
pateljannat:ci/pip-audit-cache-dir
Nov 20, 2026
Merged

pateljannat merged 1 commit into
frappe:developfrom
pateljannat:ci/pip-audit-cache-dir

Conversation

@pateljannat

Copy link
Copy Markdown
Member

The Vulnerable Dependency Check runs again

The check fails on every pull request with PermissionError: /home/runner, writable by another user, before it audits anything. pip-audit looks up its default cache folder under the home folder through platformdirs, and platformdirs 4.14.8, installed fresh on each run, now refuses a home folder that another user can write to. The self-hosted runner's home folder is one.

pip-audit now gets --cache-dir with the job's own temp folder, so it skips that lookup. pip-audit 2.10.1 returns a given cache folder before it calls platformdirs (_get_cache_dir in pip_audit/_cache.py). This pull request's own Vulnerable Dependency Check is the test.

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.
@pateljannat
pateljannat merged commit d739be4 into frappe:develop Nov 20, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant