2022-02-01 22:12:11 +01:00
|
|
|
#
|
|
|
|
# spec file for package gosec
|
|
|
|
#
|
|
|
|
# Copyright (c) 2022 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: gosec
|
2022-03-23 08:30:13 +01:00
|
|
|
Version: 2.11.0
|
2022-02-01 22:12:11 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Golang security checker
|
|
|
|
License: Apache-2.0
|
|
|
|
URL: https://github.com/securego/gosec
|
|
|
|
Source: gosec-%{version}.tar.gz
|
|
|
|
Source1: vendor.tar.gz
|
|
|
|
BuildRequires: golang-packaging
|
|
|
|
BuildRequires: go >= 1.11
|
|
|
|
%{go_nostrip}
|
|
|
|
|
|
|
|
%description
|
|
|
|
Inspects source code for security problems by scanning the Go AST.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%autosetup -D -a 1
|
|
|
|
|
|
|
|
%build
|
|
|
|
GOFLAGS="-buildmode=pie" make build
|
|
|
|
|
2022-03-23 08:30:13 +01:00
|
|
|
%check
|
|
|
|
# check if binary is working
|
|
|
|
./gosec --version
|
|
|
|
## this check is not yet working due to missing dependencies
|
2022-02-01 22:12:11 +01:00
|
|
|
#make test
|
|
|
|
|
|
|
|
%install
|
|
|
|
install -Dm 755 gosec %{buildroot}/%{_bindir}/gosec
|
|
|
|
|
|
|
|
%files
|
|
|
|
%license LICENSE.txt
|
|
|
|
%doc README.md
|
|
|
|
%{_bindir}/gosec
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|