- Update to version 2.20.0: * Update docker image in action to v2.20.0 * Catch os.ModePerm permissions in os.WriteFile * Add a unit test to detect the false negative in rule G306 for os.ModePerm permissions * Add filepath.EvalSymlinks to clean functions in rule G304 * chore(deps): update all dependencies * Update Go to version 2.22.3 in CI and release * chore(deps): update module golang.org/x/text to v0.15.0 * chore(deps): update all dependencies * chore(deps): update module github.com/onsi/gomega to v1.33.0 * Update to go 1.22.2 * chore(deps): update all dependencies * chore(deps): update module github.com/onsi/ginkgo/v2 to v2.17.1 * chore(deps): update all dependencies * fix(helpers/goversion): get from go.mod * chore: fix function name * chore(deps): update all dependencies * Format the imports using the gci tool * Fixup: delete unused variable * Fix test: update test to comply with the spec of generated sources * Refactor: use standard function to check if a file is generated * Fix lint warnings * Add support for math/rand/v2 added in Go 1.22 * Skip the G601 tests for Go version 1.22 * Update go version to 1.22.1 and 1.21.8 * Ignore 'implicit memory aliasing' rule for Go 1.22+ * chore(deps): update all dependencies * chore(deps): update module golang.org/x/tools to v0.18.0 * fix(hardcoded): remove duplicated `Stripe API Key` OBS-URL: https://build.opensuse.org/request/show/1174421 OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/gosec?expand=0&rev=31
62 lines
1.8 KiB
RPMSpec
62 lines
1.8 KiB
RPMSpec
#
|
|
# spec file for package gosec
|
|
#
|
|
# Copyright (c) 2024 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
|
|
Version: 2.20.0
|
|
Release: 0
|
|
Summary: CLI tool to scan the Go AST and SSA code representations for security problems
|
|
License: Apache-2.0
|
|
Group: Development/Languages/Go
|
|
URL: https://github.com/securego/gosec
|
|
Source: gosec-%{version}.tar.xz
|
|
Source1: vendor.tar.gz
|
|
BuildRequires: golang(API) >= 1.20
|
|
|
|
%description
|
|
CLI tool to inspect Go source code for security problems by scanning the
|
|
abstract syntax tree (AST) and static single-assignment (SSA) code
|
|
representations.
|
|
|
|
%prep
|
|
%autosetup -D -a 1
|
|
|
|
%build
|
|
# Native linux build includes version tags but currently works only on x86_64
|
|
%ifarch x86_64
|
|
GOFLAGS="-buildmode=pie" GIT_TAG="v%{version}" make build-linux
|
|
%else
|
|
GOFLAGS="-buildmode=pie" GIT_TAG="v%{version}" make build
|
|
%endif
|
|
|
|
%check
|
|
# check if binary is working
|
|
./gosec --version
|
|
make sec
|
|
# Not yet working because it wants to pull the latest ginkgo version from GitHub
|
|
#make test
|
|
|
|
%install
|
|
install -Dm 755 gosec %{buildroot}/%{_bindir}/gosec
|
|
|
|
%files
|
|
%license LICENSE.txt
|
|
%doc README.md
|
|
%{_bindir}/gosec
|
|
|
|
%changelog
|