Skip to content

feat: publish this plugin to grc.store - #456

Open
eddie-knight wants to merge 2 commits into
ossf:mainfrom
eddie-knight:feat/publish-to-grc-store
Open

feat: publish this plugin to grc.store#456
eddie-knight wants to merge 2 commits into
ossf:mainfrom
eddie-knight:feat/publish-to-grc-store

Conversation

@eddie-knight

@eddie-knight eddie-knight commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Declare the publication metadata pvtr publish reads out of the built binary: Publisher ossf (coordinate ossf/github-repo), the Apache-2.0 license grc.store requires on every publication, and the namespace that owns each embedded catalog. The vendored OSPS Baseline YAML carries no metadata.author.id and pvtr will not guess an owner, so the mapping is declared here.

None of it is reachable at run time, so the orchestrator setup moves into newOrchestrator and a test asserts the resulting publish manifest — otherwise a wrong coordinate or a newly embedded, unmapped catalog would first surface as a failed release.

Add the publish workflow itself. It stays workflow_dispatch-only: the first successful publish TOFU-pins the signer identity to this file's path, so it must be deliberate and every later publish must run from here. PVTR_VERSION is a placeholder until the pvtr release carrying pvtr publish is cut.

Also carries one unrelated bugfix, kept here because it lives in the lines this PR was already moving: the NewPluginCommands arguments were shifted a slot, so VersionPostfix landed in buildGitCommitHash and GitCommitHash in buildTime, and BuiltAt — set by both .goreleaser.yaml and the Makefile — was passed nowhere. Version already carries the postfix, so the fix drops it and passes GitCommitHash and BuiltAt into their own slots. This changes what the plugin reports for its commit and build time.

Declare the publication metadata `pvtr publish` reads out of the built
binary: Publisher ossf (coordinate ossf/github-repo), the Apache-2.0
license grc.store requires on every publication, and the namespace that
owns each embedded catalog. The vendored OSPS Baseline YAML carries no
metadata.author.id and pvtr will not guess an owner, so the mapping is
declared here.

None of it is reachable at run time, so the orchestrator setup moves into
newOrchestrator and a test asserts the resulting publish manifest —
otherwise a wrong coordinate or a newly embedded, unmapped catalog would
first surface as a failed release.

Add the publish workflow itself. It stays workflow_dispatch-only: the
first successful publish TOFU-pins the signer identity to this file's
path, so it must be deliberate and every later publish must run from
here. PVTR_VERSION is a placeholder until the pvtr release carrying
`pvtr publish` is cut.

Signed-off-by: Eddie Knight <knight@linux.com>
eddie-knight

This comment was marked as resolved.

Trim the added comments to the one-line style used elsewhere in main.go,
and drop the sentences that restate either the SDK's own field docs or
the code on the next line.

Tighten the publish step: it ran under GitHub's default `bash -e`, with
no pipefail, so a failed token mint left PVTR_TOKEN empty (or the literal
"null", which pvtr's TrimSpace accepts) and the step still reached
`privateer publish`. Set -euo pipefail and guard the token the same way
the audience above it was already guarded. `--dist` is the flag default,
so drop it.

Assert the exact catalog count in the publish manifest test — `== 0` only
caught losing every catalog, not one dropping out of the embed glob — and
use strings.HasPrefix over the hand-rolled slice compare.

While here, fix the NewPluginCommands arguments: they were shifted a slot,
so VersionPostfix landed in buildGitCommitHash and GitCommitHash in
buildTime, and BuiltAt — set by both goreleaser and the Makefile — was
passed nowhere. Version already carries the postfix.

Signed-off-by: Eddie Knight <eknight@revanite.io>
@eddie-knight
eddie-knight marked this pull request as ready for review August 18, 2026 23:20
@eddie-knight
eddie-knight requested a review from a team as a code owner August 18, 2026 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant