2020-10-13 13:18:41 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "trivy";
|
2020-12-21 09:50:00 +00:00
|
|
|
version = "0.15.0";
|
2020-10-13 13:18:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "aquasecurity";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-12-21 09:50:00 +00:00
|
|
|
sha256 = "11fd32qb69g23lxrynsnfy8a783sl60rzknvq4shdg41p2ikigdk";
|
2020-10-13 13:18:41 +00:00
|
|
|
};
|
|
|
|
|
2020-12-21 09:50:00 +00:00
|
|
|
vendorSha256 = "09birwc8x90l2y0znf4fwny3phnmq0cz0l2z3xzwg0j3msrdl2np";
|
2020-10-13 13:18:41 +00:00
|
|
|
|
2020-10-13 14:24:22 +00:00
|
|
|
subPackages = [ "cmd/trivy" ];
|
|
|
|
|
2020-10-13 13:18:41 +00:00
|
|
|
buildFlagsArray = [
|
|
|
|
"-ldflags="
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X main.version=v${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A simple and comprehensive vulnerability scanner for containers, suitable for CI";
|
|
|
|
longDescription = ''
|
|
|
|
Trivy is a simple and comprehensive vulnerability scanner for containers
|
|
|
|
and other artifacts. A software vulnerability is a glitch, flaw, or
|
|
|
|
weakness present in the software or in an Operating System. Trivy detects
|
|
|
|
vulnerabilities of OS packages (Alpine, RHEL, CentOS, etc.) and
|
|
|
|
application dependencies (Bundler, Composer, npm, yarn, etc.).
|
|
|
|
'';
|
|
|
|
homepage = src.meta.homepage;
|
2020-12-02 09:51:19 +00:00
|
|
|
changelog = "${src.meta.homepage}/releases/tag/v${version}";
|
2020-10-13 13:18:41 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ jk ];
|
|
|
|
};
|
|
|
|
}
|