From 14684ed595a30ce6288bd11b8af999bc8ecbc63d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 14 Oct 2024 14:57:34 +0200 Subject: [PATCH] vuls: init at 0.27.0 Agent-less vulnerability scanner https://github.com/future-architect/vuls --- pkgs/by-name/vu/vuls/package.nix | 40 ++++++++++++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++++ 2 files changed, 44 insertions(+) create mode 100644 pkgs/by-name/vu/vuls/package.nix diff --git a/pkgs/by-name/vu/vuls/package.nix b/pkgs/by-name/vu/vuls/package.nix new file mode 100644 index 000000000000..25cc8b5b5494 --- /dev/null +++ b/pkgs/by-name/vu/vuls/package.nix @@ -0,0 +1,40 @@ +{ + lib, + buildGoModule, + fetchFromGitHub, +}: + +buildGoModule rec { + pname = "vuls"; + version = "0.27.0"; + + src = fetchFromGitHub { + owner = "future-architect"; + repo = "vuls"; + rev = "refs/tags/v${version}"; + hash = "sha256-+KEcK9GLx1QErRQlSVGeFnvYoWY3lVFr7S4Zb34Djzo="; + fetchSubmodules = true; + }; + + vendorHash = "sha256-XTKPsXCOzrji3qq+L4NR8FLBnXcafLj8w3K+UwowLQU="; + + ldflags = [ + "-s" + "-w" + "-X=github.com/future-architect/vuls/config.Version=${version}" + "-X=github.com/future-architect/vuls/config.Revision=${src.rev}-1970-01-01T00:00:00Z" + ]; + + postFixup = '' + mv $out/bin/cmd $out/bin/trivy-to-vuls + ''; + + meta = { + description = "Agent-less vulnerability scanner"; + homepage = "https://github.com/future-architect/vuls"; + changelog = "https://github.com/future-architect/vuls/blob/${src.rev}/CHANGELOG.md"; + license = lib.licenses.gpl3Only; + maintainers = with lib.maintainers; [ fab ]; + mainProgram = "vuls"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e8d16d8139fd..7ca92de74566 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13660,6 +13660,10 @@ with pkgs; vul = callPackage ../applications/misc/vul { }; + vuls = callPackage ../by-name/vu/vuls/package.nix { + buildGoModule = buildGo123Module; + }; + xarchive = callPackage ../tools/archivers/xarchive { }; xarchiver = callPackage ../tools/archivers/xarchiver { }; -- 2.11.4.GIT