-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uploading dependency snapshot is not working because of PURL containing backslash #414
Comments
I am facing the same issue using this workflow name: Testing
on: [push]
jobs:
SBOM:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: SBOM
uses: anchore/sbom-action@v0
with:
image: *******
registry-username: ${{ secrets.DOCKER_LOGIN }}
registry-password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
output-file: "sbom.spdx.json"
dependency-snapshot: true
artifact-name: "sbom.spdx.json" |
@KimBartikowski5337 I don't believe this is a configuration issue but rather a situation where a backslash may not be properly escaped. The PURL spec doesn't specifically mention backslashes: https://github.com/package-url/purl-spec/blob/master/PURL-SPECIFICATION.rst#character-encoding, but I'd need to see exactly what PURL is generated and how it's encoded in JSON. Do either of you, @KimBartikowski5337 or @mortenhauberg happen to have a public image that exhibits this behavior? |
I've tried with
Looks like it's any Please let me know if there's anything else I can do to help |
Hi all -- I've had a bit of a look at this and from what I can tell, the only thing Syft is doing (for example with As a workaround, I've made a change to the GitHub exporter that hopefully solves the problem for you: anchore/syft#1782 |
Hi @KimBartikowski5337 @mortenhauberg -- would you be able to try |
- name: Generate SBOM
uses: anchore/sbom-action@v0.14.2
with:
image: 'php:8.2-alpine3.17'
output-file: sbom.spdx.json
dependency-snapshot: ${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
artifact-name: sbom.spdx.json
format: spdx-json is giving me
|
Hi @kzantow, I've tested v0.14.2 on behalf of @KimBartikowski5337 since we're on the same team. Sadly, we're also getting the same result as Morten:
|
Using the latest version of syft fixed it for me: - uses: anchore/sbom-action@v0.14.3
with:
syft-version: v0.92.0 |
Can confirm it's working now, thank you very much! I suggest we close this issue. |
As @LennardWesterveld wrote, using the more recent syft version (v0.92.0) fixed the problem. |
I dont think this problem is resolved. In the comment from @LennardWesterveld , the code example does not set |
Apologies for the delay here. I've tried this again with the latest release and latest on
However, note that according to the documentation, none of the fields starting with As far as I can tell, the |
What happened:
The step
Uploading workflow artifacts
resulted in an error.The error message contains the following:
What you expected to happen:
Upload of the dependency snapshot is successful.
Steps to reproduce the issue:
Environment:
Do you have any idea whether this is a misconfiguration or is this maybe a bug?
The text was updated successfully, but these errors were encountered: