Repository navigation
Closed
Description
Feature Proposal
Problem
Fetch, provenance, signing, and secret-handling paths are trust-on-first-use or print-only with no enforcement. Checked open 776-922 (incl. #911-915 hygiene, #916-922 arch, #768 idea, #812 audit inputs, #460/#311 GHCR): none owns the items below.
Evidence:
.github/workflows/ghcr.yml:122-124cosign fetchcurl -sLx2, no-f/--retry/--proto, checksums.txt over same unauthenticated channel, no signature on checksums. Canonical.github/actions/setup-bazelisk/action.yml:99usescurl -fsSL --retry 3 --retry-delay 2. Same anti-pattern in.devcontainer/Dockerfile.prebuilt:43-45bazelisk fetch.deploy/release/sbom.bzl:24,54-55builder_id defaults to publish-dry-run.yml with comment real releases replace it, no fail().deploy/release/src/lib.rs:124-140render_provenance hardcodes buildType release@v1, invocationId dry-run, arbitrary &str builder with no allowlist.:402-438sbom_verify_files checks spdxVersion/digest/_type/predicateType only — forged builder.id passes.deploy/release/src/lib.rs:743,764,809,813,897https://example.com/builder SLSA IDs in 4 tests + goldens; write_provenance(src,dst,builder) :162-168 accepts any string — copy-paste to prod risk.deploy/release/src/lib.rs:290-316signing_run live path returns dry-run text even live, never Command cosign sign-blob --bundle.deploy/release/signing.bzl:112-116is_file presence check, no SIGNING_COSIGN_VERSION=v2.4.1 enforcement, no bundle verify.deploy/rules/maven_deploy.py:149-151-Dgpg.passphrase= on cmdline (ps-visible), unsigned publish allowed (maven.bzl:270 + maven_deploy.py:6); settings.xml with password in mkdtemp never chmod 0600/unlink (:114-133).- Registry auth single-string gate: crates_deploy.py:192-213, pypi_deploy.py:122-138, oci_deploy.py:189-213, npm_deploy.py:124-131, promotion_deploy.py:313-337 token + approved==1, no OIDC/expiry. npm_deploy.py:159-170 NamedTemporaryFile(delete=False) with authToken, unlink only in finally; pypi_deploy.py:82-84 TWINE_PASSWORD copies full parent env; crates_deploy.py:144-145 same for cargo.
quality/artifacts/update.py:432-436_download urlopen(timeout=300) no retry/hash/TLS-pin; :554-567 checksums file itself unauthenticated; :552 fallback checksum_source=maintainer-established byte identity for buildifier/biome/taplo silently trusts first bytes.quality/artifacts/extension.bzl:92-133ctx.download(sha256=outer) then extract + chmod, never checks executable_sha256/member_sha256 recorded in taplo/vale/ruff *.bzl:16. raw conflates outer/inner..gitleaks.toml:4-6allowlist regexes=[SBOM/provenance] broad, no expiry/owner.cli/cli/src/exec/audit.rs:332-336auto-trusts committed .gitleaks.toml if is_file, no hash pin.cli/audit/src/secrets.rs:173-179+ backend.rs:158-163 CONFIG_DISCOVERY_ORDER pushes arbitrary --config; hermetic_env clears env but not file — attacker config can disable rules.
Proposed Scope
- Harden all curl fetches (-fS --retry --proto=https --tlsv1.2), pin cosign SHA + verify bundle/signature, not just sha256sum presence.
- Bind builder.id allowlist + fail() if dry-run default ships; verify builder in sbom_verify_files; replace example.com IDs with invalid.test or constants.
- Implement live cosign sign-blob --bundle + version enforcement + bundle verify; mandate GPG or record unsigned with approval; fix passphrase via env-fd + 0600 + unlink.
- Harden registry auth (short-lived/OIDC or document single-string risk), 0600 temp files, minimal env for twine/cargo.
- Authenticate checksums_url (signature or pinned hash), retry + TLS; enforce inner executable/member sha256 in extension.bzl.
- Narrow gitleaks allowlist with owner/expiry; pin committed config or warn on auto-trust; document --config trust boundary.
Alternatives Considered
- Leave TOFU (tools already pinned): rejected, first-seen trust + print-only signing give false assurance.
- Per-tool one-offs: preferred incrementally, tracked here as checklist.
Compatibility Impact
May turn unsigned/unverified publishes red (honest fail-closed); fetches gain retries (fewer flakes). No API break.
Metadata
Metadata
Assignees
Labels
No labels
Activity
#780: Docs pipeline renderer and site execution (mdBook) (#924) (#933)
#924: Supply-chain hardening: fetch robustness, provenance/signature …
#924: Supply-chain hardening: fetch robustness, provenance/signature …
llvm: bump to 0.8.27 and drop the macOS linkstatic defaults (closes #…
llvm: bump to 0.8.27 and drop the macOS linkstatic defaults (closes #…
llvm: bump to 0.8.27 and drop the macOS linkstatic defaults (closes #…