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

fix(plugin): do not call GitHub content API for releases and tags #7274

Merged
merged 1 commit into from
Jul 31, 2024

Conversation

knqyf263
Copy link
Collaborator

@knqyf263 knqyf263 commented Jul 31, 2024

Description

$ trivy plugin install referrer
...
2024-07-31T14:51:48+04:00       FATAL   Fatal error     plugin install error: failed to install the plugin: unable to download the execution file (https://github.com/aquasecurity/trivy-plugin-referrer/releases/download/v0.3.1/trivy_plugin_referrer_0.3.1_macOS-ARM64.tar.gz): failed to download https://github.com/aquasecurity/trivy-plugin-referrer/releases/download/v0.3.1/trivy_plugin_referrer_0.3.1_macOS-ARM64.tar.gz: Get "https://github.com/aquasecurity/trivy-plugin-referrer/releases/download/v0.3.1/trivy_plugin_referrer_0.3.1_macOS-ARM64.tar.gz": failed to round trip: failed to get the file content: GET https://api.github.com/repos/aquasecurity/trivy-plugin-referrer/contents/releases/download/v0.3.1: 404 Not Found []

Related issues

Checklist

  • I've read the guidelines for contributing to this repository.
  • I've followed the conventions in the PR title.
  • I've added tests that prove my fix is effective or that my feature works.
  • I've updated the documentation with the relevant information (if needed).
  • I've added usage information (if the PR introduces new options)
  • I've included a "before" and "after" example to the description (if the PR is a user interface change).

@knqyf263 knqyf263 self-assigned this Jul 31, 2024
@knqyf263 knqyf263 mentioned this pull request Jul 31, 2024
2 tasks
Copy link
Contributor

@DmitriyLewen DmitriyLewen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes work correctly:

➜  ./trivy -d plugin install referrer
2024-07-31T17:07:18+06:00       DEBUG   Cache dir       dir="/Users/dmitriy/Library/Caches/trivy"
2024-07-31T17:07:18+06:00       INFO    [plugin] Installing the plugin...       src="github.com/aquasecurity/trivy-plugin-referrer"
2024-07-31T17:07:20+06:00       DEBUG   [plugin] Loading the plugin metadata...
2024-07-31T17:07:20+06:00       DEBUG   Installing the plugin...        path="/Users/dmitriy/.trivy/plugins/referrer"
2024-07-31T17:07:20+06:00       DEBUG   Platform found  os="darwin" arch="arm64"
2024-07-31T17:07:20+06:00       DEBUG   Downloading the execution file...       uri="https://github.com/aquasecurity/trivy-plugin-referrer/releases/download/v0.3.1/trivy_plugin_referrer_0.3.1_macOS-ARM64.tar.gz"
2024-07-31T17:07:22+06:00       INFO    [plugin] Plugin successfully installed  name="referrer" version="0.3.1"
➜  ./trivy plugin list                 
Installed Plugins:
  Name:    referrer
  Version: 0.3.1

@knqyf263 knqyf263 marked this pull request as ready for review July 31, 2024 11:08
@knqyf263 knqyf263 added this pull request to the merge queue Jul 31, 2024
Merged via the queue into aquasecurity:main with commit b3ee6da Jul 31, 2024
13 checks passed
@knqyf263 knqyf263 deleted the fix/github_releases branch July 31, 2024 11:37
@knqyf263
Copy link
Collaborator Author

@aqua-bot backport release/v0.54

@aqua-bot
Copy link
Contributor

Backport PR created: #7279

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

Successfully merging this pull request may close these issues.

v0.54.0 is not installing plugins
3 participants