2020-10-20 16:13:13 +02:00
|
|
|
#
|
|
|
|
# spec file for package trivy
|
|
|
|
#
|
2023-01-02 09:37:03 +01:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2020-10-20 16:13:13 +02:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
2020-10-29 14:52:19 +01:00
|
|
|
|
2020-10-20 16:13:13 +02:00
|
|
|
Name: trivy
|
2023-07-13 11:18:42 +02:00
|
|
|
Version: 0.43.1
|
2020-10-20 16:13:13 +02:00
|
|
|
Release: 0
|
2020-10-21 14:40:13 +02:00
|
|
|
Summary: A Simple and Comprehensive Vulnerability Scanner for Containers
|
2020-10-20 16:13:13 +02:00
|
|
|
License: Apache-2.0
|
|
|
|
Group: System/Management
|
|
|
|
URL: https://github.com/aquasecurity/trivy
|
2023-01-02 09:37:03 +01:00
|
|
|
Source: %{name}-%{version}.tar.zst
|
2022-09-28 16:07:00 +02:00
|
|
|
Source1: vendor.tar.zst
|
2023-07-04 15:21:56 +02:00
|
|
|
Patch1: eol-dates.patch
|
2020-10-20 16:13:13 +02:00
|
|
|
BuildRequires: golang-packaging
|
2022-09-28 16:07:00 +02:00
|
|
|
BuildRequires: zstd
|
2022-09-19 09:30:12 +02:00
|
|
|
BuildRequires: golang(API) = 1.19
|
2020-10-21 14:40:13 +02:00
|
|
|
Requires: ca-certificates
|
2020-10-29 14:52:19 +01:00
|
|
|
Requires: git-core
|
2020-10-21 14:40:13 +02:00
|
|
|
Requires: rpm
|
2020-10-20 16:13:13 +02:00
|
|
|
|
|
|
|
%description
|
2020-10-21 14:40:13 +02:00
|
|
|
Trivy (`tri` pronounced like trigger, `vy` pronounced like envy) is a simple and
|
|
|
|
comprehensive vulnerability scanner for containers and other artifacts. A
|
|
|
|
software vulnerability is a glitch, flaw, or weakness present in the software or
|
|
|
|
in an Operating System. Trivy detects vulnerabilities of OS packages (Alpine,
|
|
|
|
RHEL, CentOS, etc.) and application dependencies (Bundler, Composer, npm, yarn,
|
|
|
|
etc.). Trivy is easy to use. Just install the binary and you're ready to
|
|
|
|
scan. All you need to do for scanning is to specify a target such as an image
|
|
|
|
name of the container.
|
2020-10-20 16:13:13 +02:00
|
|
|
|
|
|
|
%prep
|
2023-07-04 15:21:56 +02:00
|
|
|
%autosetup -p1 -a1
|
2020-10-20 16:13:13 +02:00
|
|
|
|
2020-10-21 14:40:13 +02:00
|
|
|
%build
|
2023-05-11 19:05:19 +02:00
|
|
|
export CGO_ENABLED=1
|
2023-04-16 21:13:49 +02:00
|
|
|
go build -o trivy -mod=vendor -buildmode=pie -trimpath -ldflags "-s -w -X=main.version=%{version}" cmd/trivy/main.go
|
2020-10-20 16:13:13 +02:00
|
|
|
|
|
|
|
%install
|
2023-04-16 21:13:49 +02:00
|
|
|
install -D -m 755 trivy %{buildroot}/%{_bindir}/%{name}
|
2020-10-20 16:13:13 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%license LICENSE
|
2023-06-29 17:29:13 +02:00
|
|
|
%doc NOTICE README.md
|
2020-10-21 14:40:13 +02:00
|
|
|
%{_bindir}/%{name}
|
2020-10-20 16:13:13 +02:00
|
|
|
|
|
|
|
%changelog
|