2021-07-14 22:03:04 +00:00
|
|
|
{ lib
|
2022-03-30 09:31:56 +00:00
|
|
|
, buildGoModule
|
2021-07-14 22:03:04 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
buildGoModule rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "tfsec";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "1.28.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-07-14 22:03:04 +00:00
|
|
|
owner = "aquasecurity";
|
2023-10-09 19:29:22 +00:00
|
|
|
repo = "tfsec";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-zMOAXuMOuWzV5uqzNvw+2DiEA9o/80v7DW5KDhoT/fg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
ldflags = [
|
2022-06-26 10:26:21 +00:00
|
|
|
"-s"
|
|
|
|
"-w"
|
2023-10-09 19:29:22 +00:00
|
|
|
"-X=github.com/aquasecurity/tfsec/version.Version=v${version}"
|
2022-03-30 09:31:56 +00:00
|
|
|
## not sure if this is needed (https://github.com/aquasecurity/tfsec/blob/master/.goreleaser.yml#L6)
|
|
|
|
# "-extldflags '-fno-PIC -static'"
|
|
|
|
];
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
vendorHash = "sha256-nBjlsDFjkqwFBwNnGk8WC+XM5xBuopyrloPlQyOReuY=";
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
subPackages = [
|
|
|
|
"cmd/tfsec"
|
|
|
|
"cmd/tfsec-docs"
|
|
|
|
"cmd/tfsec-checkgen"
|
2021-07-14 22:03:04 +00:00
|
|
|
];
|
2020-07-18 16:06:22 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2021-07-14 22:03:04 +00:00
|
|
|
description = "Static analysis powered security scanner for terraform code";
|
|
|
|
homepage = "https://github.com/aquasecurity/tfsec";
|
2023-10-09 19:29:22 +00:00
|
|
|
changelog = "https://github.com/aquasecurity/tfsec/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2022-03-30 09:31:56 +00:00
|
|
|
maintainers = with maintainers; [ fab marsam peterromfeldhk ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|