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-08-21 13:32:41 +00:00
|
|
|
version = "1.27.2";
|
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-08-21 13:32:41 +00:00
|
|
|
hash = "sha256-SFh8LHHEdyjPmQDWcDIH/zfGvJanHcuOfVAjTFBwnoY=";
|
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-03-30 09:31:56 +00:00
|
|
|
"-X github.com/aquasecurity/tfsec/version.Version=${version}"
|
|
|
|
## not sure if this is needed (https://github.com/aquasecurity/tfsec/blob/master/.goreleaser.yml#L6)
|
|
|
|
# "-extldflags '-fno-PIC -static'"
|
|
|
|
];
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
vendorSha256 = "sha256-Z1UIE2sqIoF74uSy6sIUubpvdWdDa04gZB5gDOYJzHk=";
|
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
|
|
|
};
|
|
|
|
}
|