commit d27b7db6ef871165f10b4765e341e3fab915e4fc Author: Sergey Zhemoitel Date: Mon Aug 23 12:15:52 2021 +0300 Imported from SRPM diff --git a/.abf.yml b/.abf.yml new file mode 100644 index 0000000..7e3a5fb --- /dev/null +++ b/.abf.yml @@ -0,0 +1,2 @@ +sources: + tfsec-0.58.4.tar.gz: d235da85e01ab999b33904817a79b61f55a3cd8b diff --git a/tfsec.spec b/tfsec.spec new file mode 100644 index 0000000..336cf68 --- /dev/null +++ b/tfsec.spec @@ -0,0 +1,36 @@ +%define debug %nil +%define debug_package %nil + +Name: tfsec +Version: 0.58.4 +Release: 1 +Summary: Security scanner for your Terraform code +URL: https://tfsec.dev +Source0: https://github.com/aquasecurity/tfsec/archive/v%{version}/%{name}-%{version}.tar.gz +License: MIT +Group: Development/Other +BuildRequires: go >= 1.11 +BuildRequires: git-core +BuildRequires: upx + +%description +tfsec uses static analysis of your terraform templates +to spot potential security issues. Now with terraform CDK support. + +%prep +%setup -q + +%build +#GO111MODULE=on CGO_ENABLED=0 go build -ldflags "-X github.com/aquasecurity/tfsec/version.Version=%{version}" ./cmd/tfsec + +GO111MODULE=on CGO_ENABLED=0 go build -ldflags "-X github.com/aquasecurity/tfsec/version.Version=%{version} -s -w -extldflags \"-fno-PIC -static\"" -o bin/%{name} ./cmd/%{name}/ + +upx bin/* + +%install +install -Dm0755 bin/%{name} %{buildroot}%{_bindir}/%{name} + +%files +%doc README.md LICENSE +%{_bindir}/%{name} +