You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a non-TTY environment (GitHub Actions), it's just:
syft attest --key cosign.key ghcr.io/edgelesssys/constellation/joinservice:v2.6.0-pre.0.20230131140552-27cae81bd7bc@sha256:cd33aacb5733f6cb7c9d9694a8d6c5337c78e019274ea1d531e25114f86b537b -o cyclonedx-json
2023/01/31 14:14:16 error during command execution: 1 error occurred:
* unable to attest SBOM: exit status 1
Here, the error does not seem to be printed at all.
What you expected to happen:
Syft either passes or gives an actionable error message rather than just the exit code which, as for most Go tools, is almost always just "1" in case of an error.
Anything else we need to know?:
Not sure, feel free to ask.
Introduced with #1502 I suppose.
Nirusu
changed the title
Syft does not return the actual error message from Cosign attestation with a private key fails
Syft does not return the actual error message from Cosign when attestation with a private key fails
Jan 31, 2023
Hi @Nirusu, thanks for the issue. I think a workaround here would be to use the -v option to set verbose mode. Would that work for you? We'll take a look at the issue further but I wanted to give you a quick solution that might work. Thanks,
This looks like it's a TUI related bug in how we handle the stdout/stderr reader from cosign when there is no TTY present. Ultimately there is a reader for stdout/err that is published on the bus for a UI consumer to read. However, we disable the UI when there is no TTY, thus, we don't read from the reader.
Please provide a set of steps on how to reproduce the issue
What happened:
Syft fails with an error message that does not help debugging the actual issue.
(Works fine with Syft 0.65.0)
This is the output I get on my local machine (with a proper TTY):
The output here seems to be truncated.
In a non-TTY environment (GitHub Actions), it's just:
Here, the error does not seem to be printed at all.
What you expected to happen:
Syft either passes or gives an actionable error message rather than just the exit code which, as for most Go tools, is almost always just "1" in case of an error.
Anything else we need to know?:
Not sure, feel free to ask.
Introduced with #1502 I suppose.
Environment:
syft version
:cat /etc/os-release
or similar):macOS Ventura 13.2 arm64 (also fails on Ubuntu 22.04 in the GitHub Actions CI runner)
The text was updated successfully, but these errors were encountered: