Skip to content

Omit empty sbom-format from Verify invocation - #1028

Open
puerco wants to merge 1 commit into
chainguard-dev:mainfrom
puerco:spdx-default
Open

Omit empty sbom-format from Verify invocation#1028
puerco wants to merge 1 commit into
chainguard-dev:mainfrom
puerco:spdx-default

Conversation

@puerco

@puerco puerco commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

The template-injection hardening in #901 moved the optional sbom-format input into a quoted env var. This turns into an empty string when the input is not set and now the java invocation of thes SPDX fail on all workflows that don't define a value:

Invalid file type:
  Process completed with exit code 1.

(see for example this run on the kubernetes org)

The action needs to support omitting the format positional argument to rely on the SPDX tools' format detection.

This PR modifies the invocation to pass the value with ${INPUTS_SBOM_FORMAT:+...} so the argument is only passed when the input is non-empty.

The template-injection hardening in chainguard-dev#901 moved the optional sbom-format
input into a quoted env var. This turns into an empty string when the
input is not set and the java invocation fails:

Invalid file type:
  Process completed with exit code 1.

But the action needs to omit the format positional argument to rely on
the SPDX tools' format detection.

This PR modifies the invocation to pass the value with
${INPUTS_SBOM_FORMAT:+...} so the argument is only passed when the
input is non-empty.

Signed-off-by: Adolfo García Veytia (Puerco) <puerco@carabiner.dev>
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