Repository navigation
Windows: fail fast in the agent action and add an sbom input to attest - #142
Merged
ronens88 merged 3 commits intoOct 28, 2026
Conversation
The Cimon agent is built on eBPF and exists only for Linux. The Windows and macOS releases of cimon are attest-only builds with no `agent` command, so pointing this action at them (or letting it download the Linux tarball on a Windows runner) ended in a confusing `unknown command "agent" for "cimon-attest"` from the binary. The main step now throws an explanatory error before downloading anything when process.platform is not linux, honouring fail-on-error like every other startup error. The post step skips its stop call on non-Linux runners instead of trying to run the Linux install script. The README gains a Supported platforms table pointing Windows and macOS users at the attest sub-action, and the action description says the same. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
On Windows and macOS there is no Cimon agent, so automatic SBOM generation is not available. cimon v1.0.27 ships `cimon attest sbom`, which wraps an SBOM produced by another tool (CycloneDX JSON/XML, SPDX 2.x JSON/YAML/tag-value) in a signed in-toto attestation over the build artifacts. Expose it through the action: - `sbom`: path to the SBOM file. When set, the action runs `cimon attest sbom` after the provenance run, over the same subjects and with the same key / keyless / KMS / timestamp settings. - `signed-sbom-output`: output path (default sbom.intoto.jsonl.sig), also published as the `signed-sbom-path` step output and uploaded as a workflow artifact when report-artifact is on. The backend and signing flags are factored into helpers shared by both subcommands so the two attestations cannot drift apart. A bad `sbom` path fails before the provenance run. The Windows verify-pr job now exercises the input with a minimal CycloneDX document. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Author
|
Pushed 8f394fd with a round of follow-ups:
Still open: the |
ronens88
approved these changes
Oct 28, 2026
- Check the sbom path only after the provenance run, so a wrong value for this optional input can no longer block the provenance attestation (with the default fail-on-error: false it used to skip both and warn). - README: say the step logs an explanatory error and fails only with fail-on-error: true. - action.yml: shorten the Marketplace description to under 125 chars. - attest/README: add client-id/secret to the sbom and verify examples and note the CIMON_CLIENT_ID/CIMON_SECRET env alternative; drop the KMS mention (the kms input lands separately in CycodeLabs#135). - Rebuild attest/dist. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
WaleedMahamid
force-pushed
the
fix/windows-attest-only-guard-and-sbom-input
branch
from
October 28, 2026 16:56
8f394fd to
5a293f4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Running
cycodelabs/cimon-actionon awindows-2022runner fails withError: unknown command "agent" for "cimon-attest", and nothing in the action or its docs explains how to get an SBOM for an application built on Windows. The Windows release of cimon is an attest-only build (a singlecimon.exe, noagentcommand), and the agent that generates SBOMs automatically is eBPF-based and Linux-only.Three commits:
1.
fix:fail fast on non-Linux runners, document the Linux-only agentsrc/main/index.js: throw an explanatory error before downloading anything whenprocess.platform !== 'linux', pointing atcycodelabs/cimon-action/attest@v1. Goes through the existing catch sofail-on-errorapplies as for any other startup error (with the defaultfalsethe step logs the error and continues).src/post/index.js: skip the stop call on non-Linux runners instead of trying to run the Linux install script.README.md: new Supported platforms table;action.ymldescription says Linux only.2.
feat(attest):sbominput to sign a tool-generated SBOM attestationcimon v1.0.27 ships
cimon attest sbom, which wraps an SBOM produced by another tool (CycloneDX JSON/XML, SPDX 2.x JSON/YAML/tag-value) in a signed in-toto attestation over the build artifacts. On Windows/macOS this is the only way to get an SBOM attestation.sbomandsigned-sbom-output(defaultsbom.intoto.jsonl.sig), new step outputsigned-sbom-path.sbomis set, runscimon attest sbomaftergenerate-and-signover the same subjects with the same key / keyless / timestamp flags. Backend and signing flags are factored intobackendArgs()/signingArgs()shared by both subcommands.report-artifactis on.attest/README.md: new SBOM attestation section with a Windows example and the matchingcimon attest verify --type sbomcommand; inputs/outputs tables updated.verify-pr.yaml: the existingverify-attest-windowsjob now passes a minimal CycloneDX document through the new input.3. Review follow-ups
sbompath is checked only after the provenance run, so a wrong value for this optional input cannot block the provenance attestation.fail-on-error: false;action.ymldescription under 125 characters; credentials added to the attest README examples.--kmsand the key-based timestamp condition belong insigningArgs()so the SBOM attestation is signed the same way.Test plan
npm test(41 passing); all threedist/bundles rebuilt with ncccimonthat logs argv: both invocations carry identical signing flags,signed-sbom-pathoutput set, a missing SBOM path errors after the provenance invocationverify-attest-windowsCI job: realcimon attest sbomrun onwindows-latestwith the repo secrets. This PR comes from a fork, so repo secrets are not available to its CI run; pushing the branch to this repo would let that job run end to end.🤖 Generated with Claude Code