Skip to content

Find, verify, and analyze leaked credentials

Bump `go` from `1.18` to `1.20` (#1230)

Batuhan Ceylan9b941efa1a29
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 580f8272b..350baed68 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -17,7 +17,7 @@ jobs:
steps:
- uses: actions/setup-go@v4
with:
- go-version: '1.18'
+ go-version: '1.20'
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index dd90d4c9a..597290018 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -35,7 +35,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
- go-version: '1.18'
+ go-version: '1.20'
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
diff --git a/.github/workflows/secrets.yml b/.github/workflows/secrets.yml
index 59c51c4d8..889037af6 100644
--- a/.github/workflows/secrets.yml
+++ b/.github/workflows/secrets.yml
@@ -16,7 +16,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v4
with:
- go-version: '1.18'
+ go-version: '1.20'
- name: Checkout code
uses: actions/checkout@v3
with:
diff --git a/.github/workflows/snifftest.yml b/.github/workflows/snifftest.yml
index ee879d53e..b451d9245 100644
--- a/.github/workflows/snifftest.yml
+++ b/.github/workflows/snifftest.yml
@@ -18,7 +18,7 @@ jobs:
steps:
- uses: actions/setup-go@v4
with:
- go-version: '1.18'
+ go-version: '1.20'
- uses: actions/checkout@v3
- name: Run Snifftest
run: make snifftest
\ No newline at end of file
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 77b6900e0..a3fb5c956 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -19,7 +19,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v4
with:
- go-version: '1.18'
+ go-version: '1.20'
- name: Checkout code
uses: actions/checkout@v3
- id: 'auth'
@@ -38,7 +38,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v4
with:
- go-version: '1.18'
+ go-version: '1.20'
- name: Checkout code
uses: actions/checkout@v3
- id: 'auth'
diff --git a/go.mod b/go.mod
index 20f4810d3..3ecba00c2 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
module github.com/trufflesecurity/trufflehog/v3
-go 1.18
+go 1.20
replace github.com/jpillora/overseer => github.com/trufflesecurity/overseer v1.1.7-custom5
diff --git a/pkg/detectors/alibaba/alibaba.go b/pkg/detectors/alibaba/alibaba.go
index a97135000..90e60e9d0 100644
--- a/pkg/detectors/alibaba/alibaba.go
+++ b/pkg/detectors/alibaba/alibaba.go
@@ -3,9 +3,9 @@ package alibaba
import (
"context"
"crypto/hmac"
+ "crypto/rand"
"crypto/sha1"
"encoding/base64"
- "math/rand"
"net/http"
"net/url"
"regexp"
@@ -38,7 +38,6 @@ func (s Scanner) Keywords() []string {
}
func randString(n int) string {
- rand.Seed(time.Now().UnixNano())
const alphanum = "0123456789abcdefghijklmnopqrstuvwxyz"
var bytes = make([]byte, n)
rand.Read(bytes)
diff --git a/pkg/detectors/alibaba/alibaba_test.go b/pkg/detectors/alibaba/alibaba_test.go
index 260d3db55..edac7b2b2 100644
--- a/pkg/detectors/alibaba/alibaba_test.go
+++ b/pkg/detectors/alibaba/alibaba_test.go
@@ -96,6 +96,7 @@ func TestAlibaba_FromChunk(t *testing.T) {
t.Fatalf("no raw secret present: \n %+v", got[i])
}
got[i].Raw = nil
+ got[i].RawV2 = nil
}
if diff := pretty.Compare(got, tt.want); diff != "" {
t.Errorf("Alibaba.FromData() %s diff: (-got +want)\n%s", tt.name, diff)