From e521558be544ee0370b5003dcb028795d7ef90f2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 21:59:04 +0000 Subject: [PATCH 1/3] Bump actions/checkout from 4.1.6 to 4.1.7 Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.6 to 4.1.7. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/a5ac7e51b41094c92402da3b24376905380afc29...692973e3d937129bcbf40652eb9f2f61becf3332) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/go-test.yml | 2 +- .github/workflows/golangci-lint.yml | 2 +- .github/workflows/make-release.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 964b446..1516d7f 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -28,7 +28,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - name: Set up Go uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index 1fe6561..2b166ef 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -13,7 +13,7 @@ jobs: build-and-test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - name: Set up Go uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index fd22158..00f3e23 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -11,7 +11,7 @@ jobs: name: golangci-lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 with: go-version-file: ./go.mod diff --git a/.github/workflows/make-release.yaml b/.github/workflows/make-release.yaml index d1e2b4a..6c12d1e 100644 --- a/.github/workflows/make-release.yaml +++ b/.github/workflows/make-release.yaml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repo - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - name: Set up Go uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 From 7bb33f0518ef5dcea31bf4acea6736191ee4cefe Mon Sep 17 00:00:00 2001 From: Ziv Nevo <79099626+zivnevo@users.noreply.github.com> Date: Tue, 10 Sep 2024 08:53:15 +0300 Subject: [PATCH 2/3] lint error (false positive?) --- pkg/ipblock/ipblock.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/ipblock/ipblock.go b/pkg/ipblock/ipblock.go index 6380d6d..8bf466e 100644 --- a/pkg/ipblock/ipblock.go +++ b/pkg/ipblock/ipblock.go @@ -151,8 +151,11 @@ func (b *IPBlock) Split() []*IPBlock { // intToIP4 returns a string of an ip address from an input integer ip value func intToIP4(ipInt int64) string { + if ipInt < 0 || ipInt > math.MaxUint32 { + return "0.0.0.0" + } var d [4]byte - binary.BigEndian.PutUint32(d[:], uint32(ipInt)) + binary.BigEndian.PutUint32(d[:], uint32(ipInt)) //nolint:gosec // seems like a gosec bug - see above check for overflow return net.IPv4(d[0], d[1], d[2], d[3]).String() } From d926c8b8861e9060f977a138cc59b16c5d33c187 Mon Sep 17 00:00:00 2001 From: Ziv Nevo <79099626+zivnevo@users.noreply.github.com> Date: Tue, 10 Sep 2024 08:55:40 +0300 Subject: [PATCH 3/3] Remove nolint --- pkg/ipblock/ipblock.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/ipblock/ipblock.go b/pkg/ipblock/ipblock.go index 8bf466e..5515260 100644 --- a/pkg/ipblock/ipblock.go +++ b/pkg/ipblock/ipblock.go @@ -155,7 +155,7 @@ func intToIP4(ipInt int64) string { return "0.0.0.0" } var d [4]byte - binary.BigEndian.PutUint32(d[:], uint32(ipInt)) //nolint:gosec // seems like a gosec bug - see above check for overflow + binary.BigEndian.PutUint32(d[:], uint32(ipInt)) return net.IPv4(d[0], d[1], d[2], d[3]).String() }