trufflehog/trufflehog.spec

60 lines
1.3 KiB
RPMSpec
Raw Normal View History

2022-05-06 23:26:48 +03:00
%define debug %nil
%define debug_package %nil
2024-10-08 08:43:31 +00:00
%define secscan 0
2022-05-06 23:26:48 +03:00
Name: trufflehog
2024-10-31 14:22:45 +00:00
Version: 3.83.2
2022-05-06 23:26:48 +03:00
Release: 1
Summary: Find credentials
URL: https://trufflesecurity.com
2024-02-07 13:03:31 +00:00
Source0: https://github.com/trufflesecurity/trufflehog/archive/v%{version}/%{name}-%{version}.tar.gz
2023-09-23 21:58:07 +00:00
License: AGPLv3
2022-05-06 23:26:48 +03:00
Group: Development/Other
2023-09-11 20:51:07 +00:00
BuildRequires: go >= 1.21
2022-05-06 23:26:48 +03:00
BuildRequires: git-core
BuildRequires: upx
2024-10-23 10:21:38 +00:00
BuildRequires: cmake
2022-05-06 23:26:48 +03:00
2024-06-26 19:29:35 +00:00
%if %{secscan}
BuildRequires: clamav
BuildRequires: trivy
%endif
2022-05-06 23:26:48 +03:00
%description
TruffleHog v3 is a complete rewrite in Go with many new
powerful features.
We've added over 700 credential detectors that support
active verification against their respective APIs.
We've also added native support for scanning GitHub, GitLab,
filesystems, and S3.
Instantly verify private keys against millions of github users
and billions of TLS certificates using our Driftwood technology.
%prep
%setup -q
2024-06-26 19:29:35 +00:00
%if %{secscan}
clamscan -ir .
trivy fs --scanners vuln --format cosign-vuln .
%endif
2022-05-06 23:26:48 +03:00
%build
2024-05-16 18:17:36 +00:00
export GOPROXY=https://proxy.golang.org/cached-only
2023-09-23 21:58:07 +00:00
CGO_ENABLED=0 go build --ldflags="-s -w" -a -o bin/trufflehog main.go
2022-05-06 23:26:48 +03:00
upx bin/%{name}
%install
install -Dm0755 bin/%{name} %{buildroot}%{_bindir}/%{name}
%files
%doc README.md LICENSE
%{_bindir}/%{name}
2024-06-26 19:29:35 +00:00
%check
%if %{secscan}
clamscan -ir %{buildroot}
%endif