aquasecurity / trivy

Find vulnerabilities, misconfigurations, secrets, SBOM in containers, Kubernetes, code repositories, clouds and more
https://aquasecurity.github.io/trivy
Apache License 2.0
23.68k stars 2.33k forks source link

Add HTTP support for downloading HTTP #7891

Open knqyf263 opened 1 week ago

knqyf263 commented 1 week ago

Description

Adding HTTP support for downloading DBs in addition to OCI. If the DB repository starts with http:// or https://, Trivy downloads DBs via HTTP as below.

$ trivy image --scanners vuln --db-repository https://github.com/knqyf263/trivy-db/releases/download/v2/db.tar.gz alpine:3.20

OCI and HTTP locations can be used together.

$ trivy image --scanners vuln --db-repository ghcr.io/aquasecurity/trivy-db:2 --db-repository https://github.com/knqyf263/trivy-db/releases/download/v2/db.tar.gz alpine:3.20
orizerah commented 5 days ago

@knqyf263 Is it possible to add authorization to this feature?