From 66481f311e8c9a50d91a4260dc7ab4f6da3c69ac427e82571c1011c20b4bb3e2 Mon Sep 17 00:00:00 2001 From: Jeff Kowalczyk Date: Wed, 23 Mar 2022 07:30:13 +0000 Subject: [PATCH 1/2] Accepting request 963855 from home:ph03nix Update to v2.11.0 OBS-URL: https://build.opensuse.org/request/show/963855 OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/gosec?expand=0&rev=4 --- gosec-2.11.0.tar.gz | 3 +++ gosec.changes | 11 +++++++++++ gosec.spec | 8 +++++--- vendor.tar.gz | 4 ++-- 4 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 gosec-2.11.0.tar.gz diff --git a/gosec-2.11.0.tar.gz b/gosec-2.11.0.tar.gz new file mode 100644 index 0000000..036d560 --- /dev/null +++ b/gosec-2.11.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:21fc6d4f5181a601189c902ed91b1d6103a4a522ec4bac2a53593a98827b7217 +size 138629 diff --git a/gosec.changes b/gosec.changes index a1f33f4..16bb8f0 100644 --- a/gosec.changes +++ b/gosec.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Tue Mar 22 08:10:13 UTC 2022 - Felix Niederwanger + +* Update to version 2.11.0 + +- Enable Go 1.18 in the ci and release workflows +- Fix the lint action after upgrade (#790) +- chore(deps): update all dependencies (#789) +- Add a recursive flag -r to skip specifying ./... path +- Adds directory traversal for Http.Dir("/") + ------------------------------------------------------------------- Wed Mar 2 07:35:25 UTC 2022 - Felix Niederwanger diff --git a/gosec.spec b/gosec.spec index b9a64f0..ae9a4f3 100644 --- a/gosec.spec +++ b/gosec.spec @@ -17,7 +17,7 @@ Name: gosec -Version: 2.10.0 +Version: 2.11.0 Release: 0 Summary: Golang security checker License: Apache-2.0 @@ -37,8 +37,10 @@ Inspects source code for security problems by scanning the Go AST. %build GOFLAGS="-buildmode=pie" make build -# this check is not yet working -#%%check +%check +# check if binary is working +./gosec --version +## this check is not yet working due to missing dependencies #make test %install diff --git a/vendor.tar.gz b/vendor.tar.gz index 9de6565..7722472 100644 --- a/vendor.tar.gz +++ b/vendor.tar.gz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dd454646e5d54cf88b637902743fe4d6be345b60e3f99bc0b6f128eb02e1aff3 -size 3114017 +oid sha256:ad50aae21ab165fd145515bda26a8f68013db84d09f74cd4eddaf51089442057 +size 3631488 From d26a470ef6556ae649bcdccd40e965a7725231f1c1ba5b2e4a42c96eeb8a7cfe Mon Sep 17 00:00:00 2001 From: Jeff Kowalczyk Date: Wed, 4 May 2022 15:16:25 +0000 Subject: [PATCH 2/2] Accepting request 974534 from home:ph03nix * Use build-linux target on x86_64 to include git tag and version (for `gosec -version`) * Add additional build check OBS-URL: https://build.opensuse.org/request/show/974534 OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/gosec?expand=0&rev=5 --- _service | 4 +++- gosec-2.10.0.tar.gz | 3 --- gosec.spec | 12 +++++++++--- 3 files changed, 12 insertions(+), 7 deletions(-) delete mode 100644 gosec-2.10.0.tar.gz diff --git a/_service b/_service index c14c746..579c416 100644 --- a/_service +++ b/_service @@ -12,5 +12,7 @@ *.tar gz - + + gz + diff --git a/gosec-2.10.0.tar.gz b/gosec-2.10.0.tar.gz deleted file mode 100644 index c71c413..0000000 --- a/gosec-2.10.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:24b1dfc49d9c1fc24b6d7d5e49ce55e6512e8bbcb1d2391d6b7bc009f7b3ae3d -size 138227 diff --git a/gosec.spec b/gosec.spec index ae9a4f3..dd64da5 100644 --- a/gosec.spec +++ b/gosec.spec @@ -25,22 +25,28 @@ URL: https://github.com/securego/gosec Source: gosec-%{version}.tar.gz Source1: vendor.tar.gz BuildRequires: golang-packaging -BuildRequires: go >= 1.11 +BuildRequires: go >= 1.16 %{go_nostrip} %description -Inspects source code for security problems by scanning the Go AST. +Inspects source code for security problems by scanning the go abstract syntax tree. %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" make build-linux +%else GOFLAGS="-buildmode=pie" make build +%endif %check # check if binary is working ./gosec --version -## this check is not yet working due to missing dependencies +make sec +# Not yet working because it wants to pull the latest ginkgo version from GitHub #make test %install