unsloth/.github/workflows
Daniel Han f76e05a81d CI(security): per-file audit, strip git+, pin setuptools in build env
Last push surfaced two silent failures:

  1. pip-audit aborted on openai-whisper. The package's setup.py
     imports pkg_resources, which the isolated build env's modern
     setuptools no longer ships by default. Because we passed every
     -r file in one invocation, that single build failure killed the
     audit for ALL files (the run reported success only because
     continue-on-error swallowed exit 1).
  2. scan_packages --with-deps aborted on the first git+ spec it
     hit (triton-kernels.txt's git+https://github.com/triton-lang
     /triton.git, plus OpenEnv in extras-no-deps.txt). Same
     all-or-nothing behaviour: the entire transitive scan reported
     "0 archives downloaded" and "all clean" -- meaning we silently
     scanned nothing.

Fixes:

  - Build a filtered audit-reqs/ tree first. Each Studio requirements
    file is copied with `git+` lines stripped (replaced with a
    `# [security-audit] skipped` marker so the exclusion is auditable
    in the artifact). Pure git refs are out of scope for both pip-
    audit (CVE DB only knows PyPI versions) and scan_packages (it
    inspects PyPI archives, not git HEADs).
  - Run pip-audit per-file in a loop. One bad file no longer takes
    out the whole audit.
  - Pin setuptools<78 + wheel into pip's isolated build env via
    PIP_CONSTRAINT, so legacy setup.py packages (openai-whisper) can
    still emit metadata for the resolver.
  - Run scan_packages per-file too, with the same git+ filter and a
    skip for files that are empty after filtering (triton-kernels.txt
    becomes a comments-only file and would otherwise spam the log
    with `--help`).

Net effect: pip-audit now actually emits CVE findings (we know the
default branch carries 17), and scan_packages downloads + pattern-
scans the full transitive closure of every PyPI-only requirements
file plus unsloth's pyproject deps.
2026-05-06 23:08:55 +00:00
..
lint-ci.yml CI: add codespell + shellcheck to Lint CI; add Security audit workflow 2026-05-06 21:21:59 +00:00
mlx-ci.yml ci(mlx): fix path filter that pointed at a non-existent file 2026-05-06 12:13:21 +00:00
release-desktop.yml Fix Studio desktop tray installer and titlebar and bux fixes (#5179) 2026-04-30 08:40:39 -07:00
security-audit.yml CI(security): per-file audit, strip git+, pin setuptools in build env 2026-05-06 23:08:55 +00:00
stale.yml chore: Update outdated GitHub Actions version (#3936) 2026-01-27 07:19:38 -08:00
studio-backend-ci.yml CI(lint): split Python lint into a multi-language Lint CI workflow 2026-05-06 21:08:44 +00:00
studio-frontend-ci.yml CI: scope GITHUB_TOKEN permissions and unblock ~60 skipped tests 2026-05-06 11:52:21 +00:00
studio-inference-smoke.yml CI: pass GH_TOKEN to install/update steps to dodge GitHub API rate limits 2026-05-06 13:20:45 +00:00
studio-tauri-smoke.yml CI: scope GITHUB_TOKEN permissions and unblock ~60 skipped tests 2026-05-06 11:52:21 +00:00
studio-ui-smoke.yml CI: pass GH_TOKEN to install/update steps to dodge GitHub API rate limits 2026-05-06 13:20:45 +00:00
studio-update-smoke.yml CI: pass GH_TOKEN to install/update steps to dodge GitHub API rate limits 2026-05-06 13:20:45 +00:00
wheel-smoke.yml CI: scope GITHUB_TOKEN permissions and unblock ~60 skipped tests 2026-05-06 11:52:21 +00:00