10 src = fetchFromGitHub {
11 owner = "aquasecurity";
14 sha256 = "sha256-6xALedNX37+xUhvsVz7lWgqDppK0b3avUJ3zA6W2n6M=";
16 # hash missmatch on across linux and darwin
18 vendorSha256 = "sha256-CBsu2p66XgpeInKw/F6f6ULyoLc6cTtlXzNv3fI41YU=";
20 excludedPackages = "misc";
25 "-X main.version=v${version}"
28 # Tests require network access
31 doInstallCheck = true;
33 installCheckPhase = ''
34 runHook preInstallCheck
36 $out/bin/trivy --version | grep "v${version}"
37 runHook postInstallCheck
41 homepage = "https://github.com/aquasecurity/trivy";
42 changelog = "https://github.com/aquasecurity/trivy/releases/tag/v${version}";
43 description = "A simple and comprehensive vulnerability scanner for containers, suitable for CI";
45 Trivy is a simple and comprehensive vulnerability scanner for containers
46 and other artifacts. A software vulnerability is a glitch, flaw, or
47 weakness present in the software or in an Operating System. Trivy detects
48 vulnerabilities of OS packages (Alpine, RHEL, CentOS, etc.) and
49 application dependencies (Bundler, Composer, npm, yarn, etc.).
51 license = licenses.asl20;
52 maintainers = with maintainers; [ jk ];