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

Unable to Install Syft #1523

Closed
nblack-er opened this issue Jan 28, 2023 · 7 comments
Closed

Unable to Install Syft #1523

nblack-er opened this issue Jan 28, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@nblack-er
Copy link

nblack-er commented Jan 28, 2023

Please provide a set of steps on how to reproduce the issue

Starting a few hours ago, it was noticed that installation of Syft is no longer working with the install.sh script.

What happened:

curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
[info] checking github for the current release tag 
[error] unable to find tag='' 
[error] do not specify a version or select a valid version from https://github.com/anchore/syft/releases 

What you expected to happen:

No errors

Anything else we need to know?:

Environment:

  • Output of syft version:
  • OS (e.g: cat /etc/os-release or similar): 22.04.1 LTS (Jammy Jellyfish)
@nblack-er nblack-er added the bug Something isn't working label Jan 28, 2023
@edtan-caseware
Copy link

edtan-caseware commented Jan 28, 2023

Seems like github may have changed the endpoint format? I turned trace level debugging on to find the curl command, and see:

curl -w '%{http_code}' -sL -H "Accept: application/json"  "https://github.com/anchore/syft/releases/latest"

<!DOCTYPE html>
<html lang="en" ....

I'm guessing that this used to return json instead of html.

@nblack-er
Copy link
Author

Ah, right!

https://github.com/orgs/community/discussions/45590

@kzantow
Copy link
Contributor

kzantow commented Jan 28, 2023

Hi @nkreiger I've just tried this out again for macOS and Linux and it seems to be working fine for me at this point, could you retry?

NOTE I also saw a failure yesterday where https://github.com/anchore/grype/releases/download/v0.56.0/grype_0.56.0_linux_arm64.deb was returning 403 for some reason, but seems to be fine now.

Similar to Grype, as @jdolitsky noted, it might be good to add a fallback to the API call here: https://api.github.com/repos/{org}/{repo}/releases/latest

@cw-alexcroteau
Copy link

Hi @nkreiger I've just tried this out again for macOS and Linux and it seems to be working fine for me at this point, could you retry?

NOTE I also saw a failure yesterday where https://github.com/anchore/grype/releases/download/v0.56.0/grype_0.56.0_linux_arm64.deb was returning 403 for some reason, but seems to be fine now.

Similar to Grype, as @jdolitsky noted, it might be good to add a fallback to the API call here: https://api.github.com/repos/{org}/{repo}/releases/latest

I would agree with the benefits of a fallback, as long as it doesn't become the only option.

Sadly, the API requires a GitHub token even for public repositories. The default GitHub token provided in GitHub Actions doesn't work for this purpose, so repositories might have to use a PAT/application token. This might not be feasible for public repositories and would pose a security risk for something that should be public.

@kzantow
Copy link
Contributor

kzantow commented Jan 28, 2023

I finally got around to trying this, and curl -s https://api.github.com/repos/anchore/syft/releases/latest seems to work fine without any token specified...

@nblack-er
Copy link
Author

GitHub reverted the change, and I am able to use the install.sh script again.

@tgerla
Copy link
Contributor

tgerla commented Mar 9, 2023

We'll close this one out but if GitHub makes any more changes we will definitely follow up. Thanks!

@tgerla tgerla closed this as not planned Won't fix, can't repro, duplicate, stale Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

5 participants