Skip to content

ci(release): workflow-wide write token with floating third-party actions; binstall signatures not bound to name/version #2771

Closed

Description

@yigitdot

Related to #2397 (signing-time race) but distinct: this is about the token scope and action pinning of the release pipeline itself.

1. Every release job holds contents:write + packages:write, persists the token, and runs mutable third-party code

  • .github/workflows/release.yml:21-23 grants contents: write and packages: write workflow-wide; tag (:41), verify (:167), build-binaries (:352) and upload-assets (:574) all inherit it, while only docker (:639) needs packages.
  • actions/checkout at :51, :181, :416, :581, :674 keeps the default persist-credentials (contrast ci.yml:774, codeql.yml:40, sdk-contract.yml:64,94, which set false).
  • Mutable refs running under that token: anchore/sbom-action@v0 (:771), obi1kenobi/cargo-semver-checks-action@v2 (:299), Swatinem/rust-cache@v2 (:189), docker/*@v4/v6/v7 (:682-758), dtolnay/[email protected] (a branch), plus unpinned cross, git-cliff, cargo-nextest installs — and every dependency build.rs under cargo nextest / cargo publish --dry-run. security.yml:39,100 uses aquasecurity/[email protected], an action whose tags have been hijacked before. Meanwhile ci.yml:1083,1123 already SHA-pins slither/aderyn, so this is inconsistent with the repo's own practice.
  • Impact: a hijacked action tag or malicious build script in a release run reads the persisted GITHUB_TOKEN; with packages:write it pushes ghcr.io/decdn/sponsord:latest directly — deploy/sponsord/compose.yaml:24,44 defaults to :latest, so a backdoored image reaches the host holding the treasury keystore. With contents:write it can alter release assets and push to the unprotected main. That contradicts SECURITY.md:122 ("Every tag you can pull … is created only after that digest has been signed").
  • Workflow-level permissions: contents: read; grant contents: write only to the draft/upload steps, packages: write only to docker
  • persist-credentials: false on every checkout
  • Pin third-party actions by SHA; pin cross/git-cliff/cargo-nextest versions

2. Per-archive binstall signatures are not tied to name, version, or target

  • scripts/sign-release.sh:556 signs each archive with a bare minisign -S; crates/cli/Cargo.toml:53-56 names the pubkey. cargo-binstall only prints the trusted comment — it does not enforce it — so with release-asset write access (item 1) an older signed archive can be served under a newer name: a silent rollback. decdn self-update is unaffected (its signed SHA256SUMS binds versioned names and it refuses downgrades).
  • Add a trusted comment naming <name> <version> <target> for human checks, and document that the SHA256SUMS path is the rollback-proof one

Activity

  1. added
    kind:security
    prio:medium
    area:ci
    on Oct 30, 2026
  2. self-assigned this
    on Oct 30, 2026
  3. moved this from Backlog to In progress in deCDNon Oct 30, 2026
  4. moved this from In progress to Done in deCDNon Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:cikind:securityprio:medium

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions