From 29bbbbb7036be8ebc92c29d3fa053fd441e4af76 Mon Sep 17 00:00:00 2001 From: Marvelg256 Date: Tue, 20 Oct 2026 13:05:35 +0100 Subject: [PATCH] docs: document interoperability and release corpus --- AUDIT_REPORT.md | 20 ++++---- CHANGELOG.md | 4 +- CONTRIBUTING.md | 2 +- FINAL_AUDIT.md | 12 +++-- PROJECT_CONTEXT.md | 8 +-- README.md | 24 ++++++++- ROADMAP.md | 13 ++++- docs/ATTESTATIONS.md | 29 +++++++++++ docs/DESIGN.md | 10 ++++ fixtures/corpus/README.md | 15 ++++++ fixtures/corpus/real-releases.json | 46 +++++++++++++++++ packaging/homebrew/releasecheck.rb | 34 +++++++++++++ packaging/scoop/releasecheck.json | 15 ++++++ tests/corpus_test.go | 79 ++++++++++++++++++++++++++++++ 14 files changed, 289 insertions(+), 22 deletions(-) create mode 100644 docs/ATTESTATIONS.md create mode 100644 fixtures/corpus/README.md create mode 100644 fixtures/corpus/real-releases.json create mode 100644 packaging/homebrew/releasecheck.rb create mode 100644 packaging/scoop/releasecheck.json create mode 100644 tests/corpus_test.go diff --git a/AUDIT_REPORT.md b/AUDIT_REPORT.md index 5ee5427..938b8dc 100644 --- a/AUDIT_REPORT.md +++ b/AUDIT_REPORT.md @@ -6,13 +6,15 @@ Current evidence supersedes older pre-release paragraphs below: v0.1.2 is public Scope: independent local and GitHub audit of the ReleaseCheck organization, the three discovered repositories, the Go implementation, the GitHub Action, release workflows, documentation, repository governance, license records, and funding readiness. This report records the release evidence and remaining stabilization work; it does not claim that the immutable v0.1.1 binary contains fixes merged afterward. +All paragraphs below that say no public release existed, that Action E2E was blocked, or that v0.1.0 remained unpublished are historical checkpoint records from before v0.1.2. They are retained for audit traceability and are superseded by the current v0.1.2 evidence above. + ## Executive verdict ReleaseCheck is a real, tested Go CLI with a public v0.1.2 release for deterministic non-executing npm and PyPI release-integrity evidence. The v0.1.2 tag workflow `39166239320` passed cross-platform validation, archive inspection, and checksum validation and published six assets. The post-release Action E2E run `39166480228` passed against that exact immutable binary. Drips claim and funding configuration remain owner-controlled. -The audit confirmed two important P1 defects: the Action checksum parser rejected checksum lines emitted by the core release script, and the tag-triggered release workflow published without running its own validation gate. The original audit PR and follow-up checksum-path PR are now merged. The follow-up validates the exact publish-job artifacts, and the P1 network-boundary hardening change is merged. No release or tag has been created. +The audit confirmed two important P1 defects: the Action checksum parser rejected checksum lines emitted by the core release script, and the tag-triggered release workflow published without running its own validation gate. The original audit PR and follow-up checksum-path PR are now merged. The follow-up validates the exact publish-job artifacts, and the P1 network-boundary hardening change is merged. At the original audit checkpoint no release or tag had been created; v0.1.2 is now public and its release gates passed. -Contributor readiness is moderate: the code, fixtures, governance files, CI, and documentation exist, but the public repositories have no protected `main`, no open contributor issues, no public release, and no verified end-to-end Action run. Funding readiness is opportunity-dependent and unconfirmed; Drips is the strongest near-term fit, while Stellar/GrantFox fit is currently weak or unknown because ReleaseCheck has no Stellar-specific capability. +Contributor readiness is moderate to strong for focused work: the code, fixtures, governance files, CI, public release, Action E2E evidence, and documentation exist. Branch protection and funding configuration remain owner-controlled, and no adoption or external impact is claimed. Drips fit remains opportunity-dependent; Stellar/GrantFox fit is weak or unknown because ReleaseCheck has no Stellar-specific capability. ## Organization inventory @@ -36,11 +38,11 @@ On 2026-10-18, authenticated GitHub API checks confirmed that the remediation is | `ReleaseCheck/releasecheck-action` | `6094827362e608d8729f9444950024813450da5f` | PR #1 merged; checksum validation hardening is on `main` | | `ReleaseCheck/releasecheck-docs` | `fbc38073899f82b6a07d7c2daad33df275a38980` | PR #1 merged; status documentation is on `main` | -The local checkouts are intentionally on separate `audit/readiness-2026-10-18` branches for this documentation/status refresh. No local `main` branch was rewritten, no release tag was created, and no release was published. The local branches must be pushed and reviewed through normal pull requests before these status-refresh changes become part of public `main`. +The local checkouts were intentionally on separate `audit/readiness-2026-10-18` branches for the earlier documentation/status refresh. No local `main` branch was rewritten during that audit. The current public release state is recorded above; new status-refresh changes must still be pushed and reviewed through normal pull requests before becoming part of public `main`. ## Phase 17 implementation refresh -The current review branch adds a read-only `scripts/rehearse-release.sh` and manual `release-rehearsal.yml` workflow, stable report reason/explanation/missing/conflicting-evidence/recommended-action fields with focused tests, a manual post-release Action E2E workflow, an expanded Action nonzero-exit regression test, and the contributor-ready issue catalog plus submission brief. The core CI matrix and race jobs pass on the implementation branch. The rehearsal workflow cannot be dispatched through GitHub until its workflow file is merged into the default branch, and the Action E2E workflow remains blocked by the absence of an authorized public core release. +The earlier review branch added a read-only `scripts/rehearse-release.sh` and manual `release-rehearsal.yml` workflow, stable report reason/explanation/missing/conflicting-evidence/recommended-action fields with focused tests, a manual post-release Action E2E workflow, an expanded Action nonzero-exit regression test, and the contributor-ready issue catalog plus submission brief. The core CI matrix and race jobs passed, and the public v0.1.2 release plus Action E2E gate subsequently passed. The remaining rehearsal/release limitations are retained below as historical evidence and current scope boundaries. ## Product and implementation assessment @@ -100,7 +102,7 @@ Residual risk: ReleaseCheck is still a local analysis tool, not a general networ Severity: P1 documentation/governance. The phase register previously said `AUDIT REQUIRED` while the detailed Phase 16 section said `NOT STARTED`. -Correction: the register, detailed phase, README, `PROJECT_CONTEXT.md`, release documentation, Action README, and user docs now identify Phase 16 as `COMPLETE`. The fixes were reviewed and merged through normal pull requests; Phase 17 remains open for hosted release validation. +Correction at that checkpoint: the register, detailed phase, README, `PROJECT_CONTEXT.md`, release documentation, Action README, and user docs identified Phase 16 as `COMPLETE`. The fixes were reviewed and merged through normal pull requests; Phase 17 later completed through hosted release validation. ## License assessment @@ -115,7 +117,7 @@ GitHub reports `NOASSERTION`/`Other` for the API license field in all three repo - All three repositories are public with default branch `main`; all have issues/projects/wiki enabled; all had zero open issues and zero open pull requests at audit time. - `main` branch protection API returned `404 Branch not protected` for the core repository. Rulesets returned an empty list. Equivalent protection checks for the other repositories should be repeated by the organization owner if the API view changes; no protection was evidenced in the initial inventory. - Core workflow run `37855548443` on commit `4b469e5` completed successfully. Earlier successful runs `37852987328` and `37853277292` remain recorded. Historical failures/cancellation are visible in GitHub and should not be hidden. -- No GitHub releases or tags were returned for the core repository. The Action therefore cannot complete a real public-release end-to-end run. +- At the original inventory date no GitHub releases or tags were returned for the core repository. This is superseded by the public v0.1.2 release and passing Action E2E run recorded at the top of this report. - No `FUNDING.yml` or verified sponsorship profile was found in the repository trees inspected. ## Test matrix @@ -133,7 +135,7 @@ GitHub reports `NOASSERTION`/`Other` for the API license field in all three repo | Hosted Action CI | PASS after correction | Readiness PR run `39159955341` passed; earlier correction runs `37930070590` and `37930076098` also passed | | `govulncheck`, `gosec`, `golangci-lint` | NOT RUN | Not installed; no result claimed | | Live registry tests | NOT RUN | Offline fixtures are authoritative for default tests | -| Public Action end-to-end | BLOCKED | No public core release exists; this is a release-state limitation, not an Action CI failure | +| Public Action end-to-end | PASS | v0.1.2 core release exercised by hosted Action E2E run `39166480228` | | Branch protection/rulesets | PARTIAL | Core explicitly unprotected/empty rulesets; organization profile/settings require owner review | The initial Go test attempts encountered Windows cache/process-lock issues. Re-running with repository-local `GOCACHE`, `GOTMPDIR`, and serialized package execution completed successfully; this environment detail is retained rather than hidden. @@ -152,7 +154,7 @@ Audit date: 2026-10-09. No funding application, approval, adoption, contributor ## Remaining manual actions -1. Run a safe hosted release rehearsal on Ubuntu/GitHub Actions, then inspect the generated archives and checksum manifest. Do not publish v0.1.0 until Phase 17 and later release gates pass. +1. Historical action completed: run a safe hosted release rehearsal on Ubuntu/GitHub Actions, inspect the generated archives and checksum manifest, then publish only after the release gates pass. v0.1.2 now records that evidence. 2. Require pull requests and successful core/Action CI before merging. Protect `main` and configure a release/tag policy through GitHub repository settings or organization rulesets. 3. Add a minimal organization profile README in `ReleaseCheck/.github` and set a factual organization description/website if desired. 4. Decide whether to enable Discussions/Wiki and issue templates based on actual maintainer capacity; do not create superficial issues. @@ -161,7 +163,7 @@ Audit date: 2026-10-09. No funding application, approval, adoption, contributor ## Release decision -`v0.1.0` is **BLOCKED pending release validation**. The core implementation is substantial and testable, and the audit remediation is merged. There is no public release, no protected main branch, no Action end-to-end evidence, and no actual tag-triggered release rehearsal. The product must not be described as fully release-ready or funded. +The original v0.1.0 checkpoint was **BLOCKED pending release validation**. That historical conclusion is superseded by the public v0.1.2 release and passing Action E2E evidence. The product still must not be described as fully safe, cryptographically provenance-verified, adopted, or funded. ## Prioritized next steps diff --git a/CHANGELOG.md b/CHANGELOG.md index bc709c6..bb57806 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,10 +14,12 @@ All notable changes to ReleaseCheck will be documented here. ## Unreleased +- Documented Sigstore, SLSA, and GitHub artifact-attestation interoperability boundaries. +- Added v0.1.2 package-manager metadata and a pinned real npm/PyPI corpus record. - Fixed inspection of GNU tar archives containing PAX global metadata headers. - Added stable report reason, explanation, missing/conflicting-evidence, and recommended-action fields with renderer tests. - Added a read-only non-publishing release rehearsal script/workflow and expanded contributor-ready issue specifications. -- Refreshed the independent audit and phase register after the core checksum-path remediation, Action hardening, and documentation changes were merged; Phase 17 hosted release validation remains open. +- Refreshed the independent audit and phase register through the public v0.1.2 release and passing Action E2E validation. - Bootstrapped the repository documentation, scope, architecture, security boundary, and executable roadmap. - Established the Go module, governance files, CI skeleton, and initial package boundary. - Added the Phase 2 domain model, registry/cache contracts, typed evidence and error categories, and deterministic unit tests. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d12bdce..790a64a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,7 +2,7 @@ ReleaseCheck is being built phase by phase. Start with [PROJECT_CONTEXT.md](PROJECT_CONTEXT.md), [ROADMAP.md](ROADMAP.md), and [docs/DESIGN.md](docs/DESIGN.md). Repository state is authoritative over stale chat context. -The current milestone is pre-v0.1. Phase 15 remediation and the independent Phase 16 re-audit are complete; Phase 17 hosted release validation is the active gate. Read [FINAL_AUDIT.md](FINAL_AUDIT.md), [AUDIT_REPORT.md](AUDIT_REPORT.md), and [ROADMAP.md](ROADMAP.md) before proposing release-related changes. +The current milestone is public v0.1.2 stabilization and interoperability documentation. Read [FINAL_AUDIT.md](FINAL_AUDIT.md), [AUDIT_REPORT.md](AUDIT_REPORT.md), and [ROADMAP.md](ROADMAP.md) before proposing release-related changes. The project organization has three repositories: [core](https://github.com/ReleaseCheck/releasecheck), [Action](https://github.com/ReleaseCheck/releasecheck-action), and [docs](https://github.com/ReleaseCheck/releasecheck-docs). Route core verifier bugs to the core repository, Action behavior bugs to the Action repository, and user-documentation issues to the docs repository. diff --git a/FINAL_AUDIT.md b/FINAL_AUDIT.md index 353435b..6dc93da 100644 --- a/FINAL_AUDIT.md +++ b/FINAL_AUDIT.md @@ -6,13 +6,13 @@ Older pre-release findings in this document are retained as audit history; they Audit date: 2026-10-18 (status addendum; original Phase 15 review dated 2026-10-08) -Audit scope: current `main` after the Phase 15 remediation changes. This document supersedes the stale Phase 14 checkpoint wording; it is an audit update, not a claim that v0.1 is released. +Audit scope: current `main` after the Phase 15 remediation changes and the v0.1.2 release evidence. This document supersedes the stale Phase 14 checkpoint wording. Older conditional release-gate language is retained as historical audit context, not current release state. ## Executive result -**Recommendation: CONDITIONAL. Do not declare v0.1 complete yet.** +**Recommendation: CONDITIONAL for v0.1.2 stabilization.** The public release and Action E2E gates passed; remaining limitations are explicitly accepted for v0.1.2 and must not be described as package-safety or cryptographic-provenance guarantees. -The non-execution boundary remains credible, and the remediation adds bounded manifest analysis, default-deny restricted-network checks for artifact downloads, full-length commit recognition, and a repository line-ending policy for cross-platform formatting. Hosted CI runs `37852987328` and `37853277292` passed all declared jobs. The independent re-audit is now recorded in `AUDIT_REPORT.md`; release-workflow validation remains open. +The non-execution boundary remains credible, and the remediation adds bounded manifest analysis, default-deny restricted-network checks for artifact downloads, full-length commit recognition, and a repository line-ending policy for cross-platform formatting. Hosted CI runs `37852987328` and `37853277292` passed all declared jobs. The independent re-audit is recorded in `AUDIT_REPORT.md`; the later v0.1.2 release workflow and Action E2E evidence completed the release-validation gate. ## Verified strengths @@ -73,9 +73,11 @@ The workstation does not provide every security analysis tool. `go vet` and the - No malware, vulnerability, SBOM, or arbitrary-build analysis. - No stable public SDK compatibility promise. - Local/private mirror use requires explicit controlled configuration and is not a hosted isolation boundary. -- A safe hosted release-workflow rehearsal remains required; no public tag or release has been created. +- The release workflow does not publish Sigstore, SLSA, or GitHub artifact attestations in v0.1.2; consumers must treat the published SHA256SUMS as checksum evidence only. -## Release gate +## Historical release gate + +The following v0.1.0 gate is retained as an audit record. It is superseded by the v0.1.2 release workflow and Action E2E evidence recorded at the top of this document. Do not publish or describe `v0.1.0` as complete until: diff --git a/PROJECT_CONTEXT.md b/PROJECT_CONTEXT.md index ad72c09..a73c248 100644 --- a/PROJECT_CONTEXT.md +++ b/PROJECT_CONTEXT.md @@ -146,7 +146,7 @@ git diff --check Commands may evolve with the implementation. Never run package managers or builds against untrusted artifacts as part of ReleaseCheck. -## Known limitations at Phase 14 audit checkpoint +## Known limitations at the v0.1.2 post-release checkpoint - No public SDK implementation exists. Comparison, security analysis, provenance parsing, and report rendering are wired to the initial CLI; broader API compatibility remains deferred. - Manifest analysis reads bounded safe archive members in memory and wires supported package.json, setup.py, and pyproject.toml observations into CLI reports. Detailed TOML backend semantics remain out of scope. @@ -160,13 +160,13 @@ Commands may evolve with the implementation. Never run package managers or build - The module path is provisional until the hosting namespace is confirmed. - Remote and GitHub repository metadata are configured for the three-repository organization layout. Maintainer identity remains the authenticated organization account, not a product capability claim. - Research is a focused initial pass, not a complete literature or market survey. -- GitHub-hosted validation is observed on the public repositories. The Action CI passed at its initial commit. Core remediation CI runs `37852987328` and `37853277292` passed Linux, Windows, macOS, and race jobs. A reviewed release workflow remains outstanding. +- GitHub-hosted validation is observed on the public repositories. Core release workflow `39166239320` passed cross-platform artifact validation and publication for v0.1.2; Action E2E run `39166480228` passed against that exact release. Release signing, package-manager index publication, and cryptographic provenance verification remain outside v0.1.2. - Release archives are reproducible enough for v0.1 preparation under the documented build inputs; independent cross-machine bit-for-bit reproducibility has not yet been established. - The release workflow creates GitHub releases using the runner's preinstalled `gh` CLI. Release signing and package-registry publishing are intentionally not implemented. - Documentation links and examples were reviewed locally; GitHub's rendered Markdown, issue-template UI, and a first-time external contributor walkthrough still require hosted or independent review. -- Final audit limitations and findings are recorded in FINAL_AUDIT.md. Do not declare v0.1 complete until its release recommendation is changed by evidence, not by deadline pressure. +- Final audit limitations and findings are recorded in FINAL_AUDIT.md. Do not claim that a public release proves package safety, source equivalence, or cryptographic provenance. -Phase 15 resolved the supported manifest-analysis and artifact-download network findings and the hosted cross-platform matrix now passes. Phase 16 independently reviewed the changes and is complete. Source archive-to-commit proof and cryptographic provenance verification remain limitations; ReleaseCheck is not a network-isolated service, has no stable public SDK, and has no adoption or ecosystem proof. Phase 17 remains open for hosted release rehearsal and artifact inspection. +Phase 15 resolved the supported manifest-analysis and artifact-download network findings and the hosted cross-platform matrix now passes. Phase 16 independently reviewed the changes, Phase 17 validated the hosted release path, and v0.1.2 was published and exercised through the Action. Source archive-to-commit proof and cryptographic provenance verification remain limitations; ReleaseCheck is not a network-isolated service, has no stable public SDK, and has no adoption or ecosystem proof. ## Future-agent operating rule diff --git a/README.md b/README.md index 99d8cc6..966fc85 100644 --- a/README.md +++ b/README.md @@ -63,12 +63,34 @@ The core repository remains the authoritative home of implementation, architectu ## Installation -There is no package-manager distribution yet. Build from a checked-out release or commit with Go 1.25 or newer: +The safest default is a pinned GitHub release binary. Verify the checksum before placing it on `PATH`: + +```text +Download the archive for your platform from https://github.com/ReleaseCheck/releasecheck/releases/tag/v0.1.2 +Download SHA256SUMS from the same release +Verify the selected archive against SHA256SUMS +Extract releasecheck and run releasecheck --version +``` + +Package-manager metadata for v0.1.2 is provided for local formula/bucket maintainers: + +- Homebrew formula: [packaging/homebrew/releasecheck.rb](packaging/homebrew/releasecheck.rb) +- Scoop manifest: [packaging/scoop/releasecheck.json](packaging/scoop/releasecheck.json) + +These files are not an assertion that ReleaseCheck is already accepted into the official Homebrew or Scoop indexes. Until a maintainer publishes a tap/bucket, install the checked release archive directly or build from a checked-out release with Go 1.25 or newer: ```text go build -trimpath -o releasecheck ./cmd/releasecheck ``` +Go's module installer is also supported for a pinned release: + +```text +go install github.com/ReleaseCheck/releasecheck/cmd/releasecheck@v0.1.2 +``` + +The Homebrew formula and Scoop manifest are release metadata prepared for future tap/bucket publication; they are not official package indexes yet. + The Phase 12 release workflow publishes archives for Linux amd64/arm64, macOS amd64/arm64, and Windows amd64 when a version tag is created. See [docs/RELEASE.md](docs/RELEASE.md). ## Usage diff --git a/ROADMAP.md b/ROADMAP.md index 129af59..a5dc59f 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -64,6 +64,15 @@ This is the single status overview for the whole roadmap. The detailed sections | v4.0 reserved | 50-59 | DEFERRED | Reserved discovery-gated planning band | v4 discovery | | v5.0+ reserved | Future | DEFERRED | No fixed feature promises; evidence-led discovery required | Future discovery | +## Current Post-Release Workstream + +| Work item | Status | Evidence | Boundary | +| --- | --- | --- | --- | +| Release-state and license truth pass | COMPLETE | Current v0.1.2 state in `PROJECT_CONTEXT.md`, `README.md`, `AUDIT_REPORT.md`, `FINAL_AUDIT.md`, Action README, and docs README; Apache-2.0 remains the canonical license in all three repositories | Historical audit checkpoints remain labeled as history; no false release or license claim is retained | +| Sigstore/SLSA/GitHub attestation interoperability | COMPLETE | `docs/ATTESTATIONS.md`, `docs/DESIGN.md`, and docs repository `docs/attestations.md` | v0.1.2 consumes/reports evidence boundaries; it does not implement trust-root verification or publish GitHub attestations | +| Package-manager installation metadata | COMPLETE | `packaging/homebrew/releasecheck.rb`, `packaging/scoop/releasecheck.json`, pinned `go install` instructions | Official Homebrew tap and Scoop bucket publication are not claimed | +| Real npm/PyPI compatibility corpus | COMPLETE | `fixtures/corpus/real-releases.json`, corpus README, offline schema test | Metadata and digests are pinned; package bytes are not committed or executed, and live registry checks remain opt-in | + ## Current Repository Architecture The initial organization architecture is established as three repositories. The migration milestone was completed on 2026-10-08 after all three public repositories existed, contained the intended history/content, and local `main` matched remote `main`. @@ -604,7 +613,9 @@ Agent/model: strongest available Codex; Antigravity/Claude implements fixes. Checkpoint: COMPLETE on 2026-10-08. Added `.gitattributes` for cross-platform formatting, bounded live manifest observations, default-deny restricted-network artifact acquisition, full 40-character commit classification, adversarial tests, and a current audit update. Hosted CI runs `37852987328` and `37853277292` passed Ubuntu, Windows, macOS, and race jobs. Independent re-audit and release-workflow validation remain required. -## v0.1.0 Release Candidate - Phases 15-19 +## Historical v0.1.0 Release Candidate - Phases 15-19 + +The detailed sections below are retained as an execution record. Their original v0.1.0 wording is historical; the current product state is the public v0.1.2 release recorded in the canonical phase register above. These phases are the executable path from the current audited repository to a defensible first public release. Phase 15 is complete; Phase 16 is the current audit gate. diff --git a/docs/ATTESTATIONS.md b/docs/ATTESTATIONS.md new file mode 100644 index 0000000..5a7625d --- /dev/null +++ b/docs/ATTESTATIONS.md @@ -0,0 +1,29 @@ +# Attestation Interoperability + +ReleaseCheck is compatible with attestation ecosystems without replacing them. + +## Evidence roles + +| System | What it can establish | What ReleaseCheck does with it | +| --- | --- | --- | +| Sigstore/Cosign | Signature, certificate identity, bundle and transparency-log evidence when verified | Consume an external verification result or parse supplied evidence; do not claim cryptographic verification unless a supported verifier performed it | +| SLSA provenance | Claims about builder, source/materials, build instructions, and artifact subjects | Report provenance claims separately from source/artifact comparison | +| GitHub artifact attestations | A cryptographically verifiable relationship between an artifact and GitHub build workflow/repository | Accept as adjacent build evidence when available; it does not establish npm/PyPI source equivalence | +| npm provenance/signatures | Registry-specific publishing and provenance evidence | Consume as registry evidence; do not recreate npm trust infrastructure | +| PyPI attestations | Release-file attestations and PEP 740 provenance | Consume as registry evidence; cryptographic trust-root verification remains outside v0.1 | + +## Recommended external verification + +For a GitHub-produced binary, a consumer may independently verify an attestation with: + +```text +gh attestation verify ./releasecheck -R ReleaseCheck/releasecheck +``` + +For Sigstore artifacts, use the official Cosign verification flow appropriate to the artifact type and signature format. For SLSA provenance, verify the envelope/signature, trusted builder identity, expected build type, subject digest, and policy expectations. These commands are external verification steps; ReleaseCheck never executes package code or arbitrary build commands to obtain them. + +## Current release limitation + +ReleaseCheck v0.1.2 publishes signed-by-checksum GitHub release archives but does not publish GitHub artifact attestations or claim Sigstore verification. The release asset SHA-256 manifest proves only the downloaded asset's digest matches the published manifest; it is not a signature, provenance statement, or source-equivalence proof. + +Primary references: [GitHub artifact attestations](https://docs.github.com/en/actions/concepts/security/artifact-attestations), [GitHub verification](https://docs.github.com/en/actions/how-tos/secure-your-work/use-artifact-attestations/use-artifact-attestations), [Sigstore verification](https://docs.sigstore.dev/cosign/verifying/verify/), [SLSA v1.2 provenance](https://slsa.dev/spec/v1.2/provenance), and [SLSA artifact verification](https://slsa.dev/spec/v1.2/verifying-artifacts). diff --git a/docs/DESIGN.md b/docs/DESIGN.md index d1ee25b..858bdf4 100644 --- a/docs/DESIGN.md +++ b/docs/DESIGN.md @@ -131,6 +131,16 @@ Provenance states are intentionally distinct: The current parser therefore reports structurally bound evidence as `insufficient`, not `present`. A matching attestation does not prove source/artifact equality, benignness, or absence of malicious code. npm's current documentation says provenance formats may change and directs signature/provenance verification through npm tooling; ReleaseCheck does not invoke npm or package installation. PyPI's PEP 740 model similarly leaves cryptographic trust-root verification to a verifier and permits provenance objects to change over time. Sources checked 2026-10-08: [npm provenance](https://docs.npmjs.com/generating-provenance-statements/), [npm signature verification](https://docs.npmjs.com/verifying-registry-signatures), [PyPI attestations](https://docs.pypi.org/attestations/), [PyPI Integrity API](https://docs.pypi.org/api/integrity/), and [PEP 740](https://peps.python.org/pep-0740/). +### Interoperability with Sigstore, SLSA, and GitHub attestations + +ReleaseCheck interoperates at the evidence boundary. It may consume registry-provided or externally supplied provenance-shaped evidence, bind subjects to the selected artifact digest where possible, and report the resulting state. It does not implement Sigstore trust-root verification, Rekor/Fulcio validation, SLSA policy evaluation, or GitHub's attestation verifier. + +- **Sigstore:** use Cosign or another Sigstore verifier to validate signatures, certificates, bundles, and transparency-log inclusion. Pass the verified result into a ReleaseCheck workflow as external evidence; do not treat a parsed bundle as cryptographically verified. +- **SLSA:** SLSA provenance describes how an artifact was produced and what materials/build instructions were involved. A verifier must check the signature, trusted builder, expected build type, and policy. ReleaseCheck can report those claims and still separately compare the artifact with the claimed source snapshot. +- **GitHub artifact attestations:** `gh attestation verify` is the authoritative GitHub verification path for GitHub-produced attestations. A verified attestation can establish a relationship between a released binary and a GitHub workflow/repository, but it does not prove that an npm/PyPI package is source-equivalent or safe. + +The v0.1.2 release workflow does not publish GitHub artifact attestations. This is an explicit limitation, not an implied guarantee. Future attestation support must preserve separate states for absent, externally verified, structurally parsed, invalid, and insufficient evidence and requires independent security review. + ## Reports, verdicts, exit codes, caching, and errors `internal/report` normalizes evidence before rendering. It copies and sorts comparisons, security observations, evidence, and provenance so input map/slice order cannot change output. JSON schema version `1.0` is rendered with stable indentation and no generated timestamp by default. A caller may explicitly request a timestamp for a human workflow, but deterministic fixtures use the default. Human output uses `OK`, `WARN`, and `INFO` markers and repeats the same evidence categories; it does not create a second verdict system. diff --git a/fixtures/corpus/README.md b/fixtures/corpus/README.md new file mode 100644 index 0000000..4ec2fbc --- /dev/null +++ b/fixtures/corpus/README.md @@ -0,0 +1,15 @@ +# Real Package Corpus + +This directory records pinned public npm/PyPI examples for reproducible compatibility checks. It stores metadata and expected digests, not installed packages or executable package code. + +The records are supplemental to the offline test suite. They are not fetched during default CI because public registries, source hosts, and release metadata can change or become unavailable. A live corpus check must be explicit, network-enabled, bounded, and non-executing. + +Each record includes: + +- registry, package, and version; +- selected artifact filename, URL, size, and SHA-256 or registry integrity; +- source repository and exact source reference when the registry publishes one; +- the expected evidence state and comparison limitation; +- the observation date and primary metadata URL. + +The corpus intentionally includes both a strong npm source reference and PyPI distributions where the source repository is visible but an exact release commit is not supplied. That distinction is a product behavior, not a test failure. diff --git a/fixtures/corpus/real-releases.json b/fixtures/corpus/real-releases.json new file mode 100644 index 0000000..94067f1 --- /dev/null +++ b/fixtures/corpus/real-releases.json @@ -0,0 +1,46 @@ +{ + "schema_version": "1.0", + "observed_at": "2026-10-20", + "purpose": "Pinned metadata for reproducible, opt-in live release checks; package bytes are not committed or executed.", + "records": [ + { + "ecosystem": "npm", + "package": "is-number", + "version": "7.0.0", + "metadata_url": "https://registry.npmjs.org/is-number/7.0.0", + "artifact_filename": "is-number-7.0.0.tgz", + "artifact_url": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "artifact_size": 3730, + "artifact_sha256": "7b75c1057198cf97696909a9bee176c9c5e9bcb5b03bf3ecef2f484defadd51e", + "registry_integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "source_repository": "https://github.com/jonschlinkert/is-number", + "git_commit": "98e8ff1da1a89f93d1397a24d7413ed15421c139", + "expected_state": "reviewable-source-bound" + }, + { + "ecosystem": "pypi", + "package": "sampleproject", + "version": "4.0.0", + "metadata_url": "https://pypi.org/pypi/sampleproject/4.0.0/json", + "artifacts": [ + { + "artifact_filename": "sampleproject-4.0.0.tar.gz", + "artifact_url": "https://files.pythonhosted.org/packages/48/8c/c18d25735962870ccb6d1cd2ac7bde40008a332211055e260cb7ec4c6bab/sampleproject-4.0.0.tar.gz", + "artifact_size": 5760, + "artifact_sha256": "0ace7980f82c5815ede4cd7bf9f6693684cec2ae47b9b7ade9add533b8627c6b", + "kind": "sdist" + }, + { + "artifact_filename": "sampleproject-4.0.0-py3-none-any.whl", + "artifact_url": "https://files.pythonhosted.org/packages/d7/73/c16e5f3f0d37c60947e70865c255a58dc408780a6474de0523afd0ec553a/sampleproject-4.0.0-py3-none-any.whl", + "artifact_size": 4661, + "artifact_sha256": "c23e447ea90d796d1e645c35c4b2de125040add12a845825546f91c93f391b6b", + "kind": "wheel" + } + ], + "source_repository": "https://github.com/pypa/sampleproject", + "git_commit": null, + "expected_state": "source-reference-without-published-commit" + } + ] +} diff --git a/packaging/homebrew/releasecheck.rb b/packaging/homebrew/releasecheck.rb new file mode 100644 index 0000000..2a7969a --- /dev/null +++ b/packaging/homebrew/releasecheck.rb @@ -0,0 +1,34 @@ +class Releasecheck < Formula + desc "Deterministic release-integrity evidence for npm and PyPI packages" + homepage "https://github.com/ReleaseCheck/releasecheck" + version "0.1.2" + license "Apache-2.0" + + on_macos do + if Hardware::CPU.arm? + url "https://github.com/ReleaseCheck/releasecheck/releases/download/v0.1.2/releasecheck-v0.1.2-darwin-arm64.tar.gz" + sha256 "a23cef31e1687dd9c61caa4813dbb8d7670b21890abfc54cd86a99dc1fa72838" + else + url "https://github.com/ReleaseCheck/releasecheck/releases/download/v0.1.2/releasecheck-v0.1.2-darwin-amd64.tar.gz" + sha256 "f4d85808a58faa2300fb77be5c5f651c88699de1e4df81599bb84062ff2c0505" + end + end + + on_linux do + if Hardware::CPU.arm? + url "https://github.com/ReleaseCheck/releasecheck/releases/download/v0.1.2/releasecheck-v0.1.2-linux-arm64.tar.gz" + sha256 "1dcc0b6b74c733681649b80e64b0bfdd27ca0dc0019fbc2171bbb3b370cfa281" + else + url "https://github.com/ReleaseCheck/releasecheck/releases/download/v0.1.2/releasecheck-v0.1.2-linux-amd64.tar.gz" + sha256 "6816c31d641f2467fa3c12f37f16c0861e8de99492a3f8275ebb0676142a6947" + end + end + + def install + bin.install "releasecheck" + end + + test do + assert_match "releasecheck", shell_output("#{bin}/releasecheck --version") + end +end diff --git a/packaging/scoop/releasecheck.json b/packaging/scoop/releasecheck.json new file mode 100644 index 0000000..9f3cfbf --- /dev/null +++ b/packaging/scoop/releasecheck.json @@ -0,0 +1,15 @@ +{ + "version": "0.1.2", + "description": "Deterministic release-integrity evidence for npm and PyPI packages", + "homepage": "https://github.com/ReleaseCheck/releasecheck", + "license": "Apache-2.0", + "url": "https://github.com/ReleaseCheck/releasecheck/releases/download/v0.1.2/releasecheck-v0.1.2-windows-amd64.zip", + "hash": "39406959b4ddcb152a946c59268a1b2bb35bf71d63fbce23fc70392c23fa9770", + "bin": "releasecheck.exe", + "checkver": { + "github": "https://github.com/ReleaseCheck/releasecheck" + }, + "autoupdate": { + "url": "https://github.com/ReleaseCheck/releasecheck/releases/download/v$version/releasecheck-v$version-windows-amd64.zip" + } +} diff --git a/tests/corpus_test.go b/tests/corpus_test.go new file mode 100644 index 0000000..695a53d --- /dev/null +++ b/tests/corpus_test.go @@ -0,0 +1,79 @@ +package tests + +import ( + "crypto/sha256" + "encoding/hex" + "encoding/json" + "net/url" + "os" + "path/filepath" + "regexp" + "testing" +) + +type corpus struct { + SchemaVersion string `json:"schema_version"` + ObservedAt string `json:"observed_at"` + Records []record `json:"records"` +} + +type record struct { + Ecosystem string `json:"ecosystem"` + Package string `json:"package"` + Version string `json:"version"` + MetadataURL string `json:"metadata_url"` + ArtifactURL string `json:"artifact_url"` + ArtifactSHA256 string `json:"artifact_sha256"` + SourceRepository string `json:"source_repository"` + Artifacts []artifact `json:"artifacts"` +} + +type artifact struct { + ArtifactURL string `json:"artifact_url"` + ArtifactSHA256 string `json:"artifact_sha256"` +} + +func TestRealReleaseCorpusIsPinnedAndWellFormed(t *testing.T) { + data, err := os.ReadFile(filepath.Join("..", "fixtures", "corpus", "real-releases.json")) + if err != nil { + t.Fatal(err) + } + var got corpus + if err := json.Unmarshal(data, &got); err != nil { + t.Fatalf("corpus JSON: %v", err) + } + if got.SchemaVersion != "1.0" || got.ObservedAt == "" || len(got.Records) != 2 { + t.Fatalf("unexpected corpus header: %#v", got) + } + for _, item := range got.Records { + if item.Package == "" || item.Version == "" || item.SourceRepository == "" { + t.Fatalf("incomplete record: %#v", item) + } + for _, raw := range []string{item.MetadataURL, item.SourceRepository} { + u, err := url.Parse(raw) + if err != nil || u.Scheme != "https" || u.Host == "" { + t.Fatalf("non-HTTPS URL in corpus: %q", raw) + } + } + if item.ArtifactURL != "" { + assertDigestURL(t, item.ArtifactURL, item.ArtifactSHA256) + } + for _, artifact := range item.Artifacts { + assertDigestURL(t, artifact.ArtifactURL, artifact.ArtifactSHA256) + } + } +} + +func assertDigestURL(t *testing.T, rawURL, digest string) { + t.Helper() + u, err := url.Parse(rawURL) + if err != nil || u.Scheme != "https" || u.Host == "" { + t.Fatalf("non-HTTPS artifact URL: %q", rawURL) + } + if !regexp.MustCompile(`^[0-9a-f]{64}$`).MatchString(digest) { + t.Fatalf("invalid SHA-256 digest %q", digest) + } + if len(hex.EncodeToString(make([]byte, sha256.Size))) != len(digest) { + t.Fatalf("unexpected SHA-256 length for %q", digest) + } +}