fork
Configure Feed
Select the types of activity you want to include in your feed.
lol
fork
Configure Feed
Select the types of activity you want to include in your feed.
1{ lib
2, buildGoModule
3, fetchFromGitHub
4}:
5
6buildGoModule rec {
7 pname = "trivy";
8 version = "0.21.0";
9
10 src = fetchFromGitHub {
11 owner = "aquasecurity";
12 repo = pname;
13 rev = "v${version}";
14 sha256 = "sha256-weLzW1pyv9q9VKvFxno+f/L29wlpvxlVUZJUwx6Gn2A=";
15 };
16
17 vendorSha256 = "sha256-1kQ2m8gFBHKznbjNPtYN0BVrRbxyCs2H1f7+XZqgVvc=";
18
19 excludedPackages = "misc";
20
21 ldflags = [
22 "-s"
23 "-w"
24 "-X main.version=v${version}"
25 ];
26
27 doInstallCheck = true;
28 installCheckPhase = ''
29 runHook preInstallCheck
30 $out/bin/trivy --help
31 $out/bin/trivy --version | grep "v${version}"
32 runHook postInstallCheck
33 '';
34
35 meta = with lib; {
36 homepage = "https://github.com/aquasecurity/trivy";
37 changelog = "https://github.com/aquasecurity/trivy/releases/tag/v${version}";
38 description = "A simple and comprehensive vulnerability scanner for containers, suitable for CI";
39 longDescription = ''
40 Trivy is a simple and comprehensive vulnerability scanner for containers
41 and other artifacts. A software vulnerability is a glitch, flaw, or
42 weakness present in the software or in an Operating System. Trivy detects
43 vulnerabilities of OS packages (Alpine, RHEL, CentOS, etc.) and
44 application dependencies (Bundler, Composer, npm, yarn, etc.).
45 '';
46 license = licenses.asl20;
47 maintainers = with maintainers; [ jk ];
48 };
49}