Skip to content

Find, verify, and analyze leaked credentials

use go 1.18 (#566)

Dustin Decker4d3c2d70e5a4
diff --git a/.github/workflows/codeql-analysis.yml.todo b/.github/workflows/codeql-analysis.yml
similarity index 100%
rename from .github/workflows/codeql-analysis.yml.todo
rename to .github/workflows/codeql-analysis.yml
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 62e2dc845..ef0bb85e5 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -19,13 +19,13 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
- go-version: '1.17'
+ go-version: '1.18'
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
- version: v1.43
+ version: latest
# Optional: working directory, useful for monorepos
# working-directory: somedir
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index e9da5a6d2..d5bc0fbd6 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -43,7 +43,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
- go-version: 1.17
+ go-version: '1.18'
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
diff --git a/.github/workflows/dogfood.yml b/.github/workflows/secrets.yml
similarity index 69%
rename from .github/workflows/dogfood.yml
rename to .github/workflows/secrets.yml
index a1ed56ee3..f6ba3a970 100644
--- a/.github/workflows/dogfood.yml
+++ b/.github/workflows/secrets.yml
@@ -1,5 +1,5 @@
-name: Dogfood
+name: Scan for secrets
on:
push:
@@ -11,16 +11,12 @@ on:
jobs:
test:
- strategy:
- matrix:
- go-version: [1.17.x]
- os: [ubuntu-latest]
- runs-on: ${{ matrix.os }}
+ runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
- go-version: ${{ matrix.go-version }}
+ go-version: '1.18'
- name: Checkout code
uses: actions/checkout@v3
with:
diff --git a/.github/workflows/snifftest.yml b/.github/workflows/snifftest.yml
index d8dc2cf84..1fad9fe05 100644
--- a/.github/workflows/snifftest.yml
+++ b/.github/workflows/snifftest.yml
@@ -19,7 +19,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
- go-version: '1.17'
+ go-version: '1.18'
- 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 35af9a38a..2ecbb6b01 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -11,11 +11,7 @@ on:
jobs:
test:
- strategy:
- matrix:
- go-version: [1.17.x]
- os: [ubuntu-latest]
- runs-on: ${{ matrix.os }}
+ runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: 'write'
@@ -23,7 +19,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v3
with:
- go-version: ${{ matrix.go-version }}
+ go-version: '1.18'
- name: Checkout code
uses: actions/checkout@v3
- id: 'auth'
@@ -34,11 +30,7 @@ jobs:
- name: Test
run: make test
test-detectors:
- strategy:
- matrix:
- go-version: [1.17.x]
- os: [ubuntu-latest]
- runs-on: ${{ matrix.os }}
+ runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: 'write'
@@ -46,7 +38,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v3
with:
- go-version: ${{ matrix.go-version }}
+ go-version: '1.18'
- name: Checkout code
uses: actions/checkout@v3
- id: 'auth'
diff --git a/go.mod b/go.mod
index b6599ac51..bb9fa0b30 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
module github.com/trufflesecurity/trufflehog/v3
-go 1.17
+go 1.18
replace github.com/jpillora/overseer => github.com/trufflesecurity/overseer v1.1.7-custom5
diff --git a/pkg/detectors/auth0managementapitoken/auth0managementapitoken.go b/pkg/detectors/auth0managementapitoken/auth0managementapitoken.go
index e2c5eeec9..20556f15e 100644
--- a/pkg/detectors/auth0managementapitoken/auth0managementapitoken.go
+++ b/pkg/detectors/auth0managementapitoken/auth0managementapitoken.go
@@ -23,7 +23,7 @@ var (
// long jwt token but note this is default 8640000 seconds = 24 hours but could be set to maximum 2592000 seconds = 720 hours = 30 days
// at https://manage.auth0.com/dashboard/us/dev-63memjo3/apis/management/explorer
managementApiTokenPat = regexp.MustCompile(detectors.PrefixRegex([]string{"auth0"}) + `\b(ey[a-zA-Z0-9._-]+)\b`)
- domainPat = regexp.MustCompile(`([a-zA-Z0-9\-]{2,16}\.[a-zA-Z0-9_-]{2,3}\.auth0.com)`) // could be part of url
+ domainPat = regexp.MustCompile(`([a-zA-Z0-9\-]{2,16}\.[a-zA-Z0-9_-]{2,3}\.auth0\.com)`) // could be part of url
)
// Keywords are used for efficiently pre-filtering chunks.
diff --git a/pkg/detectors/auth0oauth/auth0oauth.go b/pkg/detectors/auth0oauth/auth0oauth.go
index e3b24e6da..32c6616ee 100644
--- a/pkg/detectors/auth0oauth/auth0oauth.go
+++ b/pkg/detectors/auth0oauth/auth0oauth.go
@@ -26,7 +26,7 @@ var (
clientIdPat = regexp.MustCompile(detectors.PrefixRegex([]string{"auth0"}) + `\b([a-zA-Z0-9_-]{32,60})\b`)
clientSecretPat = regexp.MustCompile(`\b([a-zA-Z0-9_-]{64,})\b`)
- domainPat = regexp.MustCompile(`\b([a-zA-Z0-9][a-zA-Z0-9._-]*auth0.com)\b`) // could be part of url
+ domainPat = regexp.MustCompile(`\b([a-zA-Z0-9][a-zA-Z0-9._-]*auth0\.com)\b`) // could be part of url
)
// Keywords are used for efficiently pre-filtering chunks.
diff --git a/pkg/detectors/kanban/kanban.go b/pkg/detectors/kanban/kanban.go
index d99b20e60..f5861e73b 100644
--- a/pkg/detectors/kanban/kanban.go
+++ b/pkg/detectors/kanban/kanban.go
@@ -22,7 +22,7 @@ var (
// Make sure that your group is surrounded in boundary characters such as below to reduce false positives.
keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"kanban"}) + `\b([0-9A-Z]{12})\b`)
- urlPat = regexp.MustCompile(`\b([0-9a-z]{1,}.kanbantool.com)\b`)
+ urlPat = regexp.MustCompile(`\b([0-9a-z]{1,}\.kanbantool\.com)\b`)
)
// Keywords are used for efficiently pre-filtering chunks.