Skip to content
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

Error "accepts at most 1 arg(s), received 2" is there in v0 #447

Open
LinLiKinto opened this issue Mar 6, 2024 · 3 comments
Open

Error "accepts at most 1 arg(s), received 2" is there in v0 #447

LinLiKinto opened this issue Mar 6, 2024 · 3 comments

Comments

@LinLiKinto
Copy link

It worked well till 5th March. But on 6th March, job failed.
I never changed my source code during these 2 days.
I think it was because of this PR:#446
New version is released, v0(I was using) is also updated after this PR.
I tried the old version of v0.15.8. It worked.

image
@LinLiKinto LinLiKinto changed the title Error "accepts at most 1 arg(s), received 2" is there in tag v0 Error "accepts at most 1 arg(s), received 2" is there in v0 Mar 6, 2024
@harmw
Copy link

harmw commented Mar 6, 2024

Chiming in with two additional observations:

We see it failing specifically in case of running against a path:

Run anchore/sbom-action@v0
  with:
    syft-version: v0.86.1
    format: spdx-json
    artifact-name: data_sbom.spdx.json
    output-file: data_sbom.spdx.json
    path: .
    github-token: ***
    dependency-snapshot: false
    upload-artifact: true
    upload-artifact-retention: 0
    upload-release-assets: true
[...]
Error: The process '/opt/hostedtoolcache/syft/0.86.1/x64/syft' failed with exit code 1

Docker images are processed just fine:

Run anchore/sbom-action@v0
  with:
    format: spdx-json
    artifact-name: container_sbom.spdx.json
    output-file: container_sbom.spdx.json
    image: container:1.1.1
    path: .
    github-token: ***
    dependency-snapshot: false
    upload-artifact: true
    upload-artifact-retention: 0
    upload-release-assets: true

[...]
SBOM scan completed in: 11.002s
------------------------- Uploading workflow artifacts -------------------------
/tmp/sbom-action-H7hNah/container_sbom.spdx.json

Edit:
actually, removing the pin to v0.86.1 and having it use the upstream version v0.105.0 makes things work again 🎉

@kzantow
Copy link
Contributor

kzantow commented Mar 6, 2024

Thanks @harmw -- it looks like @LinLiKinto, you're using an older version of Syft and need to update to a version that uses the scan command, rather than packages. Just removing any pinned version should fix the problem. Are you able to give that a try?

@LinLiKinto
Copy link
Author

LinLiKinto commented Mar 7, 2024

@kzantow Thank you for your advice. But we are using xeol-io/xeol#294 after anchore/sbom-action. They are not updated for new version of syft. If we update the version of syft, we will encounter error in that GitHub Action.
But I got the point now. I will wait for their update. Before that, I will fix the version to v0.15.8.
Thank you very much.
I think we cleared this issue. Should we close it?

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

No branches or pull requests

3 participants