unsloth/.github/workflows
Daniel Han 70a090fd26 studio: harden lockfile supply-chain audit followups for #5604
Three regressions surfaced after #5604 landed. All addressed here with
matching pytest coverage.

1. Default mode no longer blocks on `unsupported-lockfile-version`. A
   lockfile downgraded to v1 (or bumped to an unsupported future
   version) silently passes default CI because the auditor's structural
   walk only runs on v2/v3, so `blocked-known-malicious` /
   `known-ioc-string` findings cannot be produced. v1 downgrade is a
   documented supply-chain attack shape; restoring it to BLOCKING_KINDS.

2. `UNSLOTH_LOCKFILE_AUDIT_SKIP` warnings interpolated the raw env var
   value into `:⚠️:` workflow commands without `_gha_escape()`,
   so a value containing `\n::error::...` was emitted as a second
   physical workflow-command line (GH Actions parses workflow commands
   per physical line). Routing both branches through `_gha_escape()`
   collapses any control char onto a single annotation line.

3. The two workflows that consume `studio/package-lock.json` --
   `studio-tauri-smoke.yml` and `release-desktop.yml` -- did not invoke
   `scripts/lockfile_supply_chain_audit.py` before their `npm install`
   steps. Lifecycle scripts in a compromised lockfile would run before
   the audit could refuse the lockfile, defeating the script's
   "pre-install" guarantee. `release-desktop.yml` additionally has
   `contents: write`, so the gap had real publish-attacker blast
   radius. Both workflows now run the audit before any `npm install`
   or `npm ci`.

Tests
-----
- test_unsupported_lockfile_version_blocks_default: v1 lockfile must
  exit 1 in default mode.
- test_blocking_kinds_contains_unsupported_lockfile_version: direct
  module-level pin against future regressions.
- test_skip_env_warning_escapes_workflow_command_injection: both
  skip-env branches must escape `\n` / `%` so no injected physical
  workflow-command line is produced.
- test_audit_runs_before_npm_install_in_consumer_workflows: regex
  ordering check on the `run:` lines in the two consumer workflows so
  a future reorder cannot silently bring back the pre-install gap.

16/16 pytest pass; default-mode audit still rc=0 on real lockfiles.
2026-05-22 13:00:02 +00:00
..
consolidated-tests-ci.yml studio/ci: harden three pre-existing CI flakes (#5627) 2026-05-20 02:20:15 -07:00
lint-ci.yml security: persist-credentials:false on every actions/checkout (org-wide sweep) (#5413) 2026-05-13 22:02:35 -07:00
lockfile-audit.yml ci: advisory lockfile supply-chain audit (no install-script changes) (#5604) 2026-05-19 05:56:56 -07:00
mlx-ci.yml ci: route every hf download through xet-tuned stall-retry wrapper (#5476) 2026-05-15 21:11:56 -07:00
notebooks-ci.yml ci: merge duplicate with: keys in workflow checkout steps (#5447) 2026-05-15 16:05:14 +04:00
release-desktop.yml studio: harden lockfile supply-chain audit followups for #5604 2026-05-22 13:00:02 +00:00
security-audit.yml ci: drop cache: 'npm' from setup-node (silent abort on Windows) (#5474) 2026-05-15 20:49:05 -07:00
stale.yml CI: scope GITHUB_TOKEN permissions, add MLX CI, unblock ~60 skipped tests (#5312) 2026-05-11 03:19:13 -07:00
studio-api-smoke.yml ci: route every hf download through xet-tuned stall-retry wrapper (#5476) 2026-05-15 21:11:56 -07:00
studio-backend-ci.yml security: persist-credentials:false on every actions/checkout (org-wide sweep) (#5413) 2026-05-13 22:02:35 -07:00
studio-frontend-ci.yml ci: deterministic check for studio/frontend dep removals (#5478) 2026-05-16 05:46:22 -07:00
studio-inference-smoke.yml studio: unblock /load event loop on detect_audio_type (#5642, #5635) (#5669) 2026-05-22 05:47:58 -07:00
studio-load-orchestrator-ci.yml studio: unblock /load event loop on detect_audio_type (#5642, #5635) (#5669) 2026-05-22 05:47:58 -07:00
studio-mac-api-smoke.yml ci: route every hf download through xet-tuned stall-retry wrapper (#5476) 2026-05-15 21:11:56 -07:00
studio-mac-inference-smoke.yml studio/ci: harden three pre-existing CI flakes (#5627) 2026-05-20 02:20:15 -07:00
studio-mac-ui-smoke.yml Studio: stop hint, Uvicorn log rename, reachability check + Mac UI CI retry hardening (#5503) 2026-05-17 07:44:06 -07:00
studio-mac-update-smoke.yml Move uninstall scripts into scripts/ and fix references (#5644) 2026-05-20 04:42:03 -07:00
studio-tauri-smoke.yml studio: harden lockfile supply-chain audit followups for #5604 2026-05-22 13:00:02 +00:00
studio-ui-smoke.yml Studio: IME / multilingual composer regression test + RTL dir="auto" (#5485) 2026-05-17 04:20:46 -07:00
studio-update-smoke.yml Move uninstall scripts into scripts/ and fix references (#5644) 2026-05-20 04:42:03 -07:00
studio-windows-api-smoke.yml ci: route every hf download through xet-tuned stall-retry wrapper (#5476) 2026-05-15 21:11:56 -07:00
studio-windows-inference-smoke.yml studio/ci: harden three pre-existing CI flakes (#5627) 2026-05-20 02:20:15 -07:00
studio-windows-ui-smoke.yml ci: route every hf download through xet-tuned stall-retry wrapper (#5476) 2026-05-15 21:11:56 -07:00
studio-windows-update-smoke.yml Move uninstall scripts into scripts/ and fix references (#5644) 2026-05-20 04:42:03 -07:00
version-compat-ci.yml tests: pinned-symbol canary for unsloth-zoo save_pretrained_merged guards (#5410) (#5433) 2026-05-17 01:35:28 -07:00
wheel-smoke.yml ci: drop cache: 'npm' from setup-node (silent abort on Windows) (#5474) 2026-05-15 20:49:05 -07:00