Skip to content

Display SLSA provenance level shield badges and Security tab - #9550

Draft
mosuem wants to merge 6 commits into
require-attestation-policyfrom
website-slsa-badges
Draft

mosuem wants to merge 6 commits into
require-attestation-policyfrom
website-slsa-badges

Conversation

@mosuem

@mosuem mosuem commented Aug 20, 2026 •

Copy link
Copy Markdown
Member

Note

This PR was generated by an AI coding agent (Jetski) on behalf of @mosuem.

Website UI Support for Signed Packages

  • Adds slsaLevel property to PackageVersion and VersionInfo.
  • In backend.dart, automatically populates slsaLevel when an attestation bundle is cryptographically verified during upload.
  • Adds slsaShieldBadgeNode in views/pkg/badge.dart rendering an SVG shield icon with the SLSA level number centered inside.
  • Displays the SLSA shield badge in the package page title/header and the versions tab table next to signed versions, linking to the package Security tab.
  • Adds .package-badge-slsa and .security-tab CSS styling in _pkg.scss.

Security Tab (OpenSSF Attestations Level AAA)

  • Dedicated Security tab (/packages/<pkg>/security and /packages/<pkg>/versions/<version>/security), rendered from the provenance facts persisted with the version at upload (PackageVersion.provenance, see Verify uploaded package attestations using package:sigstore #9546) - the bundle itself is not parsed by the website:
    • Source: Repository URL, commit SHA (linking to GitHub commit), and ref/tag.
    • Build: Builder ID / workflow name and workflow run URL.
    • Attestation & Transparency Log: Certificate issuer, SAN identity, Rekor Log ID, and Log Index (linking to Rekor search).
    • Integrity: Package archive filename and SHA-256 digest with copy button.
  • Links to the Sigstore attestation bundle download (/api/packages/<pkg>/versions/<version>/attestation).
  • Educational empty state for packages without build provenance with guidance and links to https://dart.dev/tools/pub/automated-publishing.
  • Responsive multi-column layout matching pub.dev styling.

@mosuem
mosuem force-pushed the website-slsa-badges branch from 3b11092 to 8eee090 Compare August 20, 2026 09:38
@mosuem
mosuem force-pushed the website-slsa-badges branch from 8eee090 to 17ba928 Compare August 20, 2026 11:17
@mosuem
mosuem force-pushed the website-slsa-badges branch from 17ba928 to 1cdb4b0 Compare August 20, 2026 11:34
@mosuem
mosuem force-pushed the website-slsa-badges branch from 1cdb4b0 to cf7dc13 Compare August 20, 2026 11:40
@mosuem
mosuem force-pushed the website-slsa-badges branch 2 times, most recently from c23df80 to aae1d61 Compare August 20, 2026 12:27
@mosuem
mosuem changed the base branch from integration-test-attestations to require-attestation-policy August 20, 2026 12:28
@mosuem
mosuem force-pushed the website-slsa-badges branch from aae1d61 to 73bce6c Compare August 21, 2026 16:17
@mosuem
mosuem force-pushed the website-slsa-badges branch 2 times, most recently from 0ea9f1e to 2670ca1 Compare August 24, 2026 08:32
@mosuem
mosuem force-pushed the website-slsa-badges branch from 2670ca1 to a85a8a5 Compare August 24, 2026 08:49
@mosuem mosuem changed the title Display SLSA provenance level shield badge next to package versions Display SLSA provenance level shield badges and Security tab Sep 2, 2026
@mosuem
mosuem force-pushed the website-slsa-badges branch from f49e705 to 85572d2 Compare September 3, 2026 15:38
@mosuem
mosuem force-pushed the website-slsa-badges branch 2 times, most recently from 1e9592a to f59f8ba Compare October 12, 2026 09:23
- Adds `slsaLevel` property to `PackageVersion` and `VersionInfo`.
- In `backend.dart`, populates `slsaLevel` when an attestation bundle is verified during upload.
- Adds `slsaShieldBadgeNode` in `views/pkg/badge.dart` rendering a shield icon with the SLSA level number.
- Displays SLSA shield badge in package page title and version rows.
- Styles `.package-badge-slsa` in `_pkg.scss`.
- Implement OpenSSF Level AAA Security tab displaying source, build, attestation, and integrity details.
- Parse Fulcio certificate extensions, Rekor log info, and package checksums from Sigstore bundle.
- Support downloading raw Sigstore attestation bundle (.sigstore.json).
- Render educational empty state for versions without build provenance.
- Link SLSA shield badges in header and versions table directly to the Security tab.
- Add routes for /packages/<package>/security and /packages/<package>/versions/<version>/security.
- Add explicit provenance vs code safety disclaimer in the status card per OpenSSF Principle 4 & 7.
- Add full URL disclosure hover tooltips for workflow run and Rekor log links.
- Add minimal build provenance bookmark block to the package info box linking to the Security tab.
`PackagePageData` now carries `assets` directly instead of a
`PackageVersionInfo`, and `_handlePackagePage` redirects tab pages whose
asset is missing to the readme. The security page is rendered for every
version, with or without an attestation, so it is exempt from that
redirect.
- `invalid_package_url_test` counts the two new `/security` routes.
- The security status icon background is defined in `_variables.scss`
  (light and dark theme) instead of inline in `_pkg.scss`, as required by
  `color_expressions_test`.
The attestation is no longer a PackageVersionAsset (it lives in the
canonical bucket, see #9545) and the facts pub.dev verified at upload are
persisted on the PackageVersion (#9546). The Security tab is now rendered
from those, instead of re-deriving them from the bundle (including the
ad-hoc ASN.1 string scan of the certificate), and the security page no
longer loads an asset.
@mosuem
mosuem force-pushed the website-slsa-badges branch from f59f8ba to b7c1e39 Compare October 12, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant