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";
|
2022-10-30 15:09:59 +00:00
|
|
|
version = "1.28.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-07-14 22:03:04 +00:00
|
|
|
owner = "aquasecurity";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-10-30 15:09:59 +00:00
|
|
|
hash = "sha256-44DN3lV9BLBFr6kkD3IcamQg+t+xUqqao83f0nBKZvI=";
|
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"
|
2022-11-21 17:40:18 +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'"
|
|
|
|
];
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
vendorSha256 = "sha256-NQUDeNAWSWcIoSZjdbaFQTB3nMFGbLZLUDNFHMk6Enw=";
|
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";
|
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
|
|
|
};
|
|
|
|
}
|