Skip to content

fix(tools): prevent panic in tools sbom config - #5217

Draft
theZMC wants to merge 1 commit into
zarf-dev:mainfrom
theZMC:4338-fix-sbom-config-panic
Draft

fix(tools): prevent panic in tools sbom config#5217
theZMC wants to merge 1 commit into
zarf-dev:mainfrom
theZMC:4338-fix-sbom-config-panic

Conversation

@theZMC

@theZMC theZMC commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds a workaround for the vendored syft CLI to prevent a panic when invoking its config subcommand. There is a fundamental flaw in the way Anchore's fangs library parses CLI flags, making it less flexible than the way pflag processes those same flags. This conflicts with a custom flag defined by the vendored yq command.

This PR mitigates this issue by simply removing the vendored yq command from the cobra command graph when running zarf tools sbom config, ensuring the vendored syft command simply never sees that problematic custom flag from yq.

Related Issue

Fixes #4338

Checklist before merging

@netlify

netlify Bot commented Aug 13, 2026

Copy link
Copy Markdown

Deploy Preview for zarf-docs canceled.

Name Link
🔨 Latest commit 7a23413
🔍 Latest deploy log https://app.netlify.com/projects/zarf-docs/deploys/6a7dda2650c2fc0008132f37

Signed-off-by: Zach Callahan <zach@zmc.dev>
@theZMC
theZMC force-pushed the 4338-fix-sbom-config-panic branch from 7abc6b9 to 7a23413 Compare August 13, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

zarf tools sbom config results in panic

1 participant