feat(build): native add-on publish/sign/verify pipeline + forgejo lane (#3425) #3475
No reviewers
Labels
No labels
1week
2weeks
Failed compliance check
IP cameras
NATS
Possible security concern
Review effort 1/5
Review effort 2/5
Review effort 3/5
Review effort 4/5
Review effort 5/5
UI
aardvark
accessibility
amd64
api
arm64
auth
back-end
bgp
blog
bug
build
checkers
ci-cd
cleanup
cnpg
codex
core
dependencies
device-management
documentation
duplicate
dusk
ebpf
enhancement
eta 1d
eta 1hr
eta 3d
eta 3hr
feature
fieldsurvey
github_actions
go
good first issue
help wanted
invalid
javascript
k8s
log-collector
mapper
mtr
needs-triage
netflow
network-sweep
observability
oracle
otel
plug-in
proton
python
question
reddit
redhat
research
rperf
rperf-checker
rust
sdk
security
serviceradar-agent
serviceradar-agent-gateway
serviceradar-web
serviceradar-web-ng
siem
snmp
sysmon
topology
ubiquiti
wasm
wontfix
zen-engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
carverauto/serviceradar!3475
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/native-addon-publish-pipeline"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
The native add-on publish / sign / verify pipeline + forgejo lane (build-signing §2.1/2.3/2.4). Faithfully mirrors the proven WASM-plugin rails, adding the per-arch dimension WASM has no analogue for, and wiring in the per-arch artifact signer from #3474.
Components
build/native_addons/publish_addon.sh+ per-bundle_pushsh_binarytargets (defs.bzl, aggregated byall_push_targets): push the OCI artifact = bundle zip + bundle-level ed25519 upload-signature (reusesupload_signature_tool) + each per-arch tarball + its agent-release ed25519 signature (addon_artifact_signature_tool).orasstamps each layer's title so(os, arch)is recoverable downstream.scripts/push_all_native_addons.sh— runs every_pushtarget (≈push_all_wasm_plugins.sh).scripts/sign-native-addon-publish.sh— cosign-signs each pushed artifact by digest (OCI 1.1 referrer + legacy detached signature, identical mechanics to the WASM signer so the verify-then-mirror importer accepts it).scripts/verify-native-addon-publish.sh— verify-before-release: artifactType, the bundle + upload-signature layers + the ed25519 upload-signature, the Cosign signature, and every per-arch tarball against its agent-release signature.scripts/generate-native-addon-import-index.sh—serviceradar-native-addon-index.jsonwith a per-archartifacts[](os/arch+ bare-binarysha256+ tarballsha256+ OCI tarball/signature layer digests) for the §4 importer..forgejo/workflows/native-addons.yml—workflow_dispatchlane mirroringwasm-plugins.yml: OpenBao cosign env + the agent-release key (derives the public key for verify) → push → sign → verify → index → upload release asset.Verification
buildifier,bash -non all scripts, YAML parse;bazel query //build/native_addons:allloads and the three_pushtargets resolve; the import-index per-arch jq join produces correct{os,arch,sha256,tarball_sha256,tarball_digest,signature_digest}against assembler fixtures + a synthetic OCI manifest.Not validated locally (CI-only)
cosign-releaseis reached via the in-cluster OpenBao k8s auth.openbao-systemto reach the production signing key is beyond the granted scope) — sensible guardrail. Happy to run it if you enable that access (or run the port-forward yourself), but the lane mirrors the in-production WASM signing path that already works.Next
The §4 control-plane importer (Elixir): verify-then-mirror the per-arch artifacts to object storage and record
object_key/sha256/signatureon theAddonPackageso the agent's pushed-artifact fetch resolves.🤖 Generated with Claude Code
build-signing §2.1/2.3/2.4 + the publish lane. Mirrors the proven WASM-plugin rails for native add-ons, adding the per-arch dimension WASM lacks. - build/native_addons/publish_addon.sh + per-bundle `_push` sh_binary targets (defs.bzl): push the OCI artifact = bundle zip + bundle-level ed25519 upload-signature (reused upload_signature_tool) + each per-arch tarball + its agent-release ed25519 signature (addon_artifact_signature_tool). oras stamps each layer's title so the os/arch is recoverable. all_push_targets aggregates them. - scripts/push_all_native_addons.sh: runs every _push target. - scripts/sign-native-addon-publish.sh: cosign-signs each pushed artifact (OCI 1.1 referrer + legacy detached signature) by digest — same mechanics as the wasm signer so the verify-then-mirror importer accepts it. - scripts/verify-native-addon-publish.sh: verify-before-release — artifactType, bundle + upload-signature layers + the ed25519 upload-signature, the Cosign signature, AND every per-arch tarball against its agent-release signature. - scripts/generate-native-addon-import-index.sh: serviceradar-native-addon-index.json with a per-arch artifacts[] (os/arch + bare-binary sha256 + tarball sha256, OCI layer digest, and signature layer digest) for the importer. - .forgejo/workflows/native-addons.yml: workflow_dispatch lane mirroring wasm-plugins.yml — OpenBao cosign env + the agent-release key (derives the public key for verify), push -> sign -> verify -> index -> upload release asset. Validated locally: buildifier + shell `bash -n` + YAML parse clean; bazel package loads and the three `_push` targets resolve; the import-index per-arch jq join produces correct {os,arch,sha256,tarball_sha256,tarball_digest,signature_digest} against assembler fixtures. The per-arch signer it drives is unit-tested + was exercised on a real tarball (#3474). The registry push + cosign signing run in the forgejo lane (Harbor robot creds + the release/upload keys are CI secrets; OpenBao cosign-release is reached via the in-cluster k8s auth). Production signing is CI-only — local registry push and the openbao-system port-forward are not available from this host. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>Live-validated against the real registry + OpenBao 🔬
Ran the pipeline end to end on the
democluster (assembler-built bundle, throwaway artifact keys, prodcosign-releasevia OpenBao,--tlog-upload=false, a throwawayserviceradar/native-addon-livetestrepo). This surfaced + fixed two bugs and one design mismatch (see the latest commit):publish_addon.shreused the wasmupload_signature_tool, but it's wasm-specific (needsplugin.yaml+ a single wasm module) — failed withplugin.yaml entry is missing. Native bundles don't fit that shape, and the bundle is already covered by the Cosign signature while each per-arch tarball carries the agent-release ed25519 sig the agent verifies. Removed it everywhere (publish/_push/verify/index/lane).oras pushrejects absolute paths, and layer titles (which carry os/arch) must be clean basenames — now stages all layers in one dir and pushes by basename.Verified end to end:
publish_addon.sh→ OCI artifact pushed (bundle + per-arch tarball/sig layers, clean basename titles, correct media types).cosign public-key --key hashivault://cosign-release== committeddocs/cosign.pub.cosign sign --key hashivault://cosign-release→cosign verify --key docs/cosign.pub= Verified OK.⚠️ Cleanup needed: the throwaway test repo
serviceradar/native-addon-livetestis still in Harbor — theserviceradar-cirobot is push-only (403 on delete), so it needs a project-admin to remove. Nothing was written to the public Rekor log (--tlog-upload=false).