depot/third_party/nixpkgs/pkgs/tools/security/govulncheck/default.nix
Default email 9c6ee729d6 Project import generated by Copybara.
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
2023-07-15 19:15:38 +02:00

51 lines
2 KiB
Nix

{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "govulncheck";
version = "1.0.0";
src = fetchFromGitHub {
owner = "golang";
repo = "vuln";
rev = "v${version}";
sha256 = "sha256-cewQ03dK/k3mXevE09M01Yox/3ZWP6IrG0H4QsZMzy8=";
};
vendorSha256 = "sha256-r9XshbgVA5rppJF46SFYPad344ZHMLWTHTnL6vbIFH8=";
subPackages = [ "cmd/govulncheck" ];
# Vendoring breaks tests
doCheck = false;
ldflags = [ "-s" "-w" ];
meta = with lib; {
homepage = "https://pkg.go.dev/golang.org/x/vuln/cmd/govulncheck";
downloadPage = "https://github.com/golang/vuln";
description = "The database client and tools for the Go vulnerability database, also known as vuln";
longDescription = ''
Govulncheck reports known vulnerabilities that affect Go code. It uses
static analysis of source code or a binary's symbol table to narrow down
reports to only those that could affect the application.
By default, govulncheck makes requests to the Go vulnerability database at
https://vuln.go.dev. Requests to the vulnerability database contain only
module paths, not code or other properties of your program. See
https://vuln.go.dev/privacy.html for more. Set the GOVULNDB environment
variable to specify a different database, which must implement the
specification at https://go.dev/security/vuln/database.
Govulncheck looks for vulnerabilities in Go programs using a specific
build configuration. For analyzing source code, that configuration is the
operating system, architecture, and Go version specified by GOOS, GOARCH,
and the go command found on the PATH. For binaries, the build
configuration is the one used to build the binary. Note that different
build configurations may have different known vulnerabilities. For
example, a dependency with a Windows-specific vulnerability will not be
reported for a Linux build.
'';
license = with licenses; [ bsd3 ];
maintainers = with maintainers; [ jk SuperSandro2000 ];
};
}