feat: sync Shanhe 2.2 source and add remote package verification
Shanhe source and offline package checks / verify (pull_request) Failing after 5s

This commit is contained in:
2026-11-01 17:13:46 +08:00
parent 465fee1d07
commit 4845826deb
396 changed files with 6748 additions and 411 deletions
+19
View File
@@ -0,0 +1,19 @@
"""Install only the pinned official package auditor inside the remote CI image."""
import hashlib
import io
from pathlib import Path
import urllib.request
import zipfile
url = 'https://fe-static.xhscdn.com/minitool/20261015161653/minitool-zip-builder-1.8.0.skill'
with urllib.request.urlopen(url, timeout=120) as response:
archive = zipfile.ZipFile(io.BytesIO(response.read()))
matches = [name for name in archive.namelist() if name.endswith('scripts/audit_artifact.py')]
if len(matches) != 1:
raise SystemExit('Official auditor missing or ambiguous')
content = archive.read(matches[0])
if hashlib.sha256(content).hexdigest() != '62ff11eae1d5bb566a6f74b0fa102fe2eb3ffe982b87596aca2f93485cc9de21':
raise SystemExit('Official auditor changed; review before updating the pinned checksum')
target = Path('.codex/skills/minitool-zip-builder/scripts/audit_artifact.py')
target.parent.mkdir(parents=True, exist_ok=True)
target.write_bytes(content)