2023-08-22 20:05:09 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
2024-01-02 11:29:13 +00:00
|
|
|
, substituteAll
|
2023-08-22 20:05:09 +00:00
|
|
|
}:
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
buildGoModule rec {
|
2022-09-09 14:08:57 +00:00
|
|
|
pname = "govulncheck";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "1.1.3";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "golang";
|
|
|
|
repo = "vuln";
|
2023-08-22 20:05:09 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-ydJ8AeoCnLls6dXxjI05+THEqPPdJqtAsKTriTIK9Uc=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
patches = [
|
|
|
|
# patch in version information
|
|
|
|
(substituteAll {
|
|
|
|
src = ./version.patch;
|
|
|
|
inherit version;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
vendorHash = "sha256-jESQV4Na4Hooxxd0RL96GHkA7Exddco5izjnhfH6xTg=";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
subPackages = [
|
|
|
|
"cmd/govulncheck"
|
|
|
|
];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
# Vendoring breaks tests
|
|
|
|
doCheck = false;
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://pkg.go.dev/golang.org/x/vuln/cmd/govulncheck";
|
2023-03-04 12:14:45 +00:00
|
|
|
downloadPage = "https://github.com/golang/vuln";
|
2024-06-20 14:57:18 +00:00
|
|
|
changelog = "https://github.com/golang/vuln/releases/tag/v${version}";
|
|
|
|
description = "Database client and tools for the Go vulnerability database, also known as vuln";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "govulncheck";
|
2022-09-09 14:08:57 +00:00
|
|
|
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 ];
|
2023-03-27 19:17:25 +00:00
|
|
|
maintainers = with maintainers; [ jk SuperSandro2000 ];
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
}
|