File terrascan.spec of Package terrascan
#
# spec file for package tfupdate
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: terrascan
Version: 1.19.9
Release: 0
Summary: Detect compliance and security violations
License: Apache-2.0
URL: https://github.com/tenable/terrascan
Source: %{name}-%{version}.tar.gz
Source1: vendor.tar.gz
BuildRequires: golang(API) >= 1.24
%description
Terrascan is a static code analyzer for Infrastructure as Code. Terrascan
allows you to:
* Seamlessly scan infrastructure as code for misconfigurations.
* Monitor provisioned cloud infrastructure for configuration changes that
introduce posture drift, and enables reverting to a secure posture.
* Detect security vulnerabilities and compliance violations.
* Mitigate risks before provisioning cloud native infrastructure.
* Offers flexibility to run locally or integrate with your CI\CD.
%prep
%autosetup -p1 -a 1
%build
go build \
-mod=vendor \
-buildmode=pie \
-tags="-X google.golang.org/protobuf/reflect/protoregistry.conflictPolicy=ignore" \
-o ./bin/%{name} ./cmd/terrascan/main.go
%install
# Install the binary.
install -D -m 0755 ./bin/%{name} %{buildroot}/%{_bindir}/%{name}
%check
%{buildroot}/%{_bindir}/%{name} version | grep %{version}
%files
%doc README.md
%license LICENSE
%{_bindir}/%{name}
%changelog