You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[CI/Supply chain] Reuse generated artifacts, minimize permissions, and pin Actions
Draft status: ready to create; not submitted by the audit run.
Priority: P1
Findings: ACT-025, ACT-031
Summary
The workflows provide useful cross-platform coverage, but expensive generation is repeated, the full desktop matrix receives contents: write, Actions use mutable version tags, and the Pages screenshot check only proves that a non-empty PNG file was produced.
Each desktop matrix entry generates/validates/prepares again.
Pages generates again separately.
The entire desktop matrix job has contents: write, including ordinary validation/PR contexts.
actions/checkout@v7, actions/setup-node@v7, swatinem/rust-cache@v2, and tauri-apps/tauri-action@v1 are referenced by mutable tags rather than commit SHA.
No CodeQL, Dependabot, actionlint/zizmor, cargo-audit/deny, SBOM, or release provenance workflow was found.
Pages browser smoke takes a screenshot and checks only test -s gallery-home.png; Registry errors, 404s, console errors, stale counts, or inaccessible interactions can still pass.
Proposed direction
Generate and validate canonical artifacts once in a read-only Linux job; upload a checksummed artifact for all downstream consumers.
Default all jobs to contents: read; isolate release upload/signing in a protected tag-only job.
Pin all Actions to full commit SHA with a comment showing the human-readable version.
Add dependency/workflow scanning and release SBOM/provenance.
Replace the non-empty screenshot smoke with Playwright assertions for console/network/card count/keyboard/axe/performance budget.
Acceptance criteria
One canonical generated artifact is reused by desktop OS matrices and Pages for the same commit.
PR and validation jobs have no write permission and cannot access release-signing secrets.
Only a protected release job receives contents: write and signing/update credentials.
All third-party and official Actions are pinned to immutable SHAs and automatically maintained through reviewed update PRs.
Workflow lint/security scanning runs in PRs.
Release artifacts include checksums, SBOM, build commit, platform/architecture, and provenance/attestation.
[CI/Supply chain] Reuse generated artifacts, minimize permissions, and pin Actions
Summary
The workflows provide useful cross-platform coverage, but expensive generation is repeated, the full desktop matrix receives
contents: write, Actions use mutable version tags, and the Pages screenshot check only proves that a non-empty PNG file was produced.中文摘要:CI 已有多平台基础,但同一输入被重复生成,桌面矩阵权限过宽,Action 未固定 commit,Pages 截图只检查文件非空。需要生成一次复用、最小权限、供应链检查与真正的页面断言。
Audit evidence
validategenerates/validates/tests once.contents: write, including ordinary validation/PR contexts.actions/checkout@v7,actions/setup-node@v7,swatinem/rust-cache@v2, andtauri-apps/tauri-action@v1are referenced by mutable tags rather than commit SHA.test -s gallery-home.png; Registry errors, 404s, console errors, stale counts, or inaccessible interactions can still pass.Proposed direction
contents: read; isolate release upload/signing in a protected tag-only job.Acceptance criteria
contents: writeand signing/update credentials.Related audit findings
ACT-025,ACT-031.A workflow design reference is available in
demo/ci/desktop-optimized.ymlin the audit bundle.