unsloth/scripts
Daniel Han ee64eec51a
release-desktop: add a VirusTotal pre-flight scan of the release bundles (#8089)
* release-desktop: add a VirusTotal pre-flight scan of the release bundles

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* virustotal_scan: register the signed upload URL with add-mask

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* virustotal_scan: check out the script, stop replaying single-use upload URLs, bound every request by the deadline

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* virustotal_scan: fail closed on malformed hash lookups and cap pacing by the deadline

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Bound VirusTotal socket calls to the deadline and scan only validated releases

- Pass a per-call socket timeout through the transport, clamped to the
  remaining scan deadline, so a request starting just before the deadline
  cannot consume the full 300s cushion ahead of the step timeout.
- Retry a malformed upload acknowledgement instead of aborting, since the
  disclosure cost of the upload has already been paid at that point.
- Move the scan after 'Create or validate versioned release' so a run that
  is rejected has not already uploaded all four bundles.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Defer non-draft release creation past the scan and cap retry backoff

- Split 'Create or validate versioned release' into a validation step that
  runs before the scan and a creation step that runs after it. A dispatch
  with draft=false and a new tag previously published an empty release that
  stayed assetless for the length of the scan, and permanently so if the run
  was cancelled part way through.
- Clamp the exponential retry backoff to the remaining deadline, so a 429 or
  5xx arriving late cannot sleep past --timeout-seconds before the loop
  notices and writes its summary.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Keep release notes unconditional, fail closed on lookup errors, fix the permission test

- Write desktop-release-notes.md in the validation step, which always runs.
  The updater metadata step reads it on every run, so leaving the write in
  the conditional create step broke reruns against an existing release.
- Only treat a lookup as a missing release when gh reports 'release not
  found'. Any other failure now fails the step, rather than proceeding to
  disclose the bundles for a run that cannot publish.
- Point test_release_desktop_permissions at the renamed validation step and
  assert the deferred create step and its gate.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Escape third-party text in the VirusTotal warning annotations

Engine names, detection labels and API error strings are third-party data
written straight into a workflow command. Actions truncates an annotation at
the first newline and mis-parses a bare %, so a crafted or merely awkward
detection string could drop the engine list exactly when the scan is trying
to alert a maintainer. Mirrors _gha_escape in lockfile_supply_chain_audit.py,
including the replace-% first ordering.

* Never report an unanalysed bundle as clean, and escape the summary

- A hash known to VirusTotal can have no completed analysis, in which case
  last_analysis_stats is absent and parse_stats yields all zeros. That row
  read as 'known to VirusTotal' with zero detections, which looks like 70
  engines cleared a bundle that none of them scanned. Such a row now reports
  'no completed analysis' with stats left unset, so it renders as dashes and
  cannot trip the threshold. The upload path polls until status is completed,
  so it only requires a stats object.
- Escape third-party engine names, detection labels and error strings in the
  job summary. It is appended to GITHUB_STEP_SUMMARY and rendered as
  Markdown, so a newline ended the row and | opened a new cell.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Avoid a CodeQL clear-text-logging false positive on the skip message

Interpolating API_KEY_ENV into the skip log trips CodeQL's
py/clear-text-logging-sensitive-data rule at high severity, because the
constant's name ends in _KEY. It only ever holds the env var name, never the
value, but the repo uses CodeQL default setup so there is no config to filter
the query on. Write the name out literally and pin it against the constant in
test_missing_key_skips_without_failing so the two cannot drift.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-08-07 03:27:08 -07:00
..
data Make the Colab oracle tripwire able to fire, and stop blaming start.py for a hung agent CLI (#7838) 2026-08-04 07:42:42 -07:00
build_prequant_checkpoint.py Studio: add image generation, editing workflows and LoRA training with Unsloth GGUFs (#6763) 2026-08-04 08:11:01 -07:00
build_te_prequant_checkpoint.py Studio: add image generation, editing workflows and LoRA training with Unsloth GGUFs (#6763) 2026-08-04 08:11:01 -07:00
build_whisper_cpp.sh Studio: add local speech-to-text dictation engine (#7095) 2026-07-23 01:39:03 -07:00
check_frontend_dep_removal.py Reduce and tighten code comments and docstrings repo-wide (#6095) 2026-06-08 23:09:51 -07:00
check_new_install_scripts.py Reduce and tighten code comments and docstrings repo-wide (#6095) 2026-06-08 23:09:51 -07:00
compare_engines.py Studio: add image generation, editing workflows and LoRA training with Unsloth GGUFs (#6763) 2026-08-04 08:11:01 -07:00
compile_probe.py Studio: add image generation, editing workflows and LoRA training with Unsloth GGUFs (#6763) 2026-08-04 08:11:01 -07:00
diffusion_bench.py Studio: add image generation, editing workflows and LoRA training with Unsloth GGUFs (#6763) 2026-08-04 08:11:01 -07:00
diffusion_quality.py Studio: add image generation, editing workflows and LoRA training with Unsloth GGUFs (#6763) 2026-08-04 08:11:01 -07:00
enforce_kwargs_spacing.py Reduce and tighten code comments and docstrings repo-wide (#6095) 2026-06-08 23:09:51 -07:00
fbcache_flux_probe.py Studio: add image generation, editing workflows and LoRA training with Unsloth GGUFs (#6763) 2026-08-04 08:11:01 -07:00
fp8_overflow_check.py Studio: add image generation, editing workflows and LoRA training with Unsloth GGUFs (#6763) 2026-08-04 08:11:01 -07:00
image_speedmem_bench.py Studio: add image generation, editing workflows and LoRA training with Unsloth GGUFs (#6763) 2026-08-04 08:11:01 -07:00
install_gemma4_mlx.sh Update Install Scripts (#5968) 2026-06-03 05:39:42 -07:00
install_qwen3_6_mlx.sh Studio: drop the mlx-lm 0.31.3 exclusion so current mlx-vlm resolves (#7061) 2026-08-07 02:41:04 -03:00
install_rocm_wsl_strixhalo.sh Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
int8_linear_probe.py Studio: add image generation, editing workflows and LoRA training with Unsloth GGUFs (#6763) 2026-08-04 08:11:01 -07:00
leverage_probe.py Studio: add image generation, editing workflows and LoRA training with Unsloth GGUFs (#6763) 2026-08-04 08:11:01 -07:00
lint_workflow_triggers.py tests: read checked-in files as UTF-8 instead of the platform default (#7438) 2026-07-26 23:31:56 -07:00
lockfile_supply_chain_audit.py Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
make_dmg_background.py add a background image to the macos dmg install window (#7827) 2026-08-04 18:57:29 -07:00
notebook_to_python.py Reduce and tighten code comments and docstrings repo-wide (#6095) 2026-06-08 23:09:51 -07:00
notebook_validator.py Make the Colab oracle tripwire able to fire, and stop blaming start.py for a hung agent CLI (#7838) 2026-08-04 07:42:42 -07:00
nvfp4_probe.py Studio: add image generation, editing workflows and LoRA training with Unsloth GGUFs (#6763) 2026-08-04 08:11:01 -07:00
nvfp4_t211_probe.py Studio: add image generation, editing workflows and LoRA training with Unsloth GGUFs (#6763) 2026-08-04 08:11:01 -07:00
perf_levers_probe.py Studio: add image generation, editing workflows and LoRA training with Unsloth GGUFs (#6763) 2026-08-04 08:11:01 -07:00
perf_verify.py Studio: add image generation, editing workflows and LoRA training with Unsloth GGUFs (#6763) 2026-08-04 08:11:01 -07:00
prequant_probe.py Studio: add image generation, editing workflows and LoRA training with Unsloth GGUFs (#6763) 2026-08-04 08:11:01 -07:00
profile_startup.py Measure where Studio's startup time actually goes (#7553) 2026-07-28 22:24:34 -07:00
quant_probe.py Studio: add image generation, editing workflows and LoRA training with Unsloth GGUFs (#6763) 2026-08-04 08:11:01 -07:00
run_ruff_format.py Reduce and tighten code comments and docstrings repo-wide (#6095) 2026-06-08 23:09:51 -07:00
scan_npm_packages.py Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
scan_npm_packages_baseline.json scan_packages: key baseline on matched-code hash so payloads in baselined files are not auto-suppressed (#6552) 2026-07-01 04:03:59 -07:00
scan_packages.py Security: pin the credential-send allowlist entry to the reviewed file (#8104) 2026-08-07 03:15:48 -07:00
scan_packages_baseline.json Security: pin the credential-send allowlist entry to the reviewed file (#8104) 2026-08-07 03:15:48 -07:00
sd_cpp_smoke.py Studio: add image generation, editing workflows and LoRA training with Unsloth GGUFs (#6763) 2026-08-04 08:11:01 -07:00
sdpa_mask_backend_probe.py Diffusion: replace the attention perf claims with re-measured numbers (#8021) 2026-08-06 05:47:31 -07:00
sparse_accum_probe.py Studio: add image generation, editing workflows and LoRA training with Unsloth GGUFs (#6763) 2026-08-04 08:11:01 -07:00
stamp_studio_release.py Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
sync_allow_scripts_pins.py Studio: auto-sync allowScripts pins after dependency bumps (#6136) 2026-06-10 02:35:37 -07:00
uninstall.ps1 Studio: add image generation, editing workflows and LoRA training with Unsloth GGUFs (#6763) 2026-08-04 08:11:01 -07:00
uninstall.sh Studio: add image generation, editing workflows and LoRA training with Unsloth GGUFs (#6763) 2026-08-04 08:11:01 -07:00
verify_comment_only_diff.py Reduce and tighten code comments and docstrings repo-wide (#6095) 2026-06-08 23:09:51 -07:00
verify_import_hoist.py feat(studio): rework train page setup flow (#7633) 2026-08-06 04:26:05 -07:00
verify_prequant_backend.py Studio: add image generation, editing workflows and LoRA training with Unsloth GGUFs (#6763) 2026-08-04 08:11:01 -07:00
video_quality.py Studio: add image generation, editing workflows and LoRA training with Unsloth GGUFs (#6763) 2026-08-04 08:11:01 -07:00
virustotal_scan.py release-desktop: add a VirusTotal pre-flight scan of the release bundles (#8089) 2026-08-07 03:27:08 -07:00