Skip to content

Commit

Permalink
Merge branch 'main' into linting
Browse files Browse the repository at this point in the history
  • Loading branch information
bdhave committed May 31, 2023
2 parents 4c1bdd7 + 31b097d commit 05d7ef8
Show file tree
Hide file tree
Showing 13 changed files with 80 additions and 53 deletions.
17 changes: 0 additions & 17 deletions .github/dependabot.yml

This file was deleted.

10 changes: 5 additions & 5 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

steps:
- name: 'Harden Runner'
uses: step-security/harden-runner@910b3276b25495e4cfd8669cf5d7ea16508b0241
uses: step-security/harden-runner@beefd8c500e5f70ce4fc69e314d454dcf8822f4b
with:
disable-sudo: true
egress-policy: block
Expand All @@ -56,11 +56,11 @@ jobs:
objects.githubusercontent.com:443
- name: 'Checkout repository'
uses: actions/checkout@47fbe2df0ad0e27efb67a70beac3555f192b062f
uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222

# Initializes the CodeQL tools for scanning.
- name: 'Initialize CodeQL'
uses: github/codeql-action/init@bb28e7e59e2ad6c1e5400e671795b2fa1b2fca6f
uses: github/codeql-action/init@96f284028262d223858647b5680642a84608cc87
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -71,7 +71,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: 'Autobuild'
uses: github/codeql-action/autobuild@bb28e7e59e2ad6c1e5400e671795b2fa1b2fca6f
uses: github/codeql-action/autobuild@96f284028262d223858647b5680642a84608cc87

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -85,4 +85,4 @@ jobs:
# make release

- name: 'Perform CodeQL Analysis'
uses: github/codeql-action/analyze@bb28e7e59e2ad6c1e5400e671795b2fa1b2fca6f
uses: github/codeql-action/analyze@96f284028262d223858647b5680642a84608cc87
6 changes: 3 additions & 3 deletions .github/workflows/dependencies-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Harden Runner'
uses: step-security/harden-runner@910b3276b25495e4cfd8669cf5d7ea16508b0241
uses: step-security/harden-runner@beefd8c500e5f70ce4fc69e314d454dcf8822f4b
with:
disable-sudo: true
egress-policy: block
Expand All @@ -20,7 +20,7 @@ jobs:
storage.googleapis.com:443
- name: 'Checkout Repository'
uses: actions/checkout@47fbe2df0ad0e27efb67a70beac3555f192b062f
uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222

- name: 'Dependency Review'
uses: actions/dependency-review-action@b206cbf92e3ad78a42e8b0e6e1e29d2e8f75ff4c
uses: actions/dependency-review-action@1360a344ccb0ab6e9475edef90ad2f46bf8003b1
6 changes: 3 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Harden Runner'
uses: step-security/harden-runner@910b3276b25495e4cfd8669cf5d7ea16508b0241
uses: step-security/harden-runner@beefd8c500e5f70ce4fc69e314d454dcf8822f4b
with:
disable-sudo: true
egress-policy: block
Expand All @@ -25,12 +25,12 @@ jobs:
storage.googleapis.com:443
- name: 'Checkout Repository'
uses: actions/checkout@47fbe2df0ad0e27efb67a70beac3555f192b062f
uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222
with:
fetch-depth: 0

- name: 'Set up Go'
uses: actions/setup-go@41c2024c46acfe1d0b8c9b7f20e28406983e553b
uses: actions/setup-go@49bc3307c5d359429e8aee983859eb8dfad28c6b
with:
go-version-file: './go.mod'

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Harden Runner'
uses: step-security/harden-runner@910b3276b25495e4cfd8669cf5d7ea16508b0241
uses: step-security/harden-runner@beefd8c500e5f70ce4fc69e314d454dcf8822f4b
with:
disable-sudo: true
egress-policy: audit
Expand All @@ -27,11 +27,11 @@ jobs:
objects.githubusercontent.com:443
raw.githubusercontent.com:443
- uses: actions/checkout@47fbe2df0ad0e27efb67a70beac3555f192b062f
- uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222
with:
fetch-depth: 0

- uses: actions/setup-go@41c2024c46acfe1d0b8c9b7f20e28406983e553b
- uses: actions/setup-go@49bc3307c5d359429e8aee983859eb8dfad28c6b
with:
go-version-file: './go.mod'

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/gosec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
GO111MODULE: on
steps:
- name: 'Harden Runner'
uses: step-security/harden-runner@910b3276b25495e4cfd8669cf5d7ea16508b0241
uses: step-security/harden-runner@beefd8c500e5f70ce4fc69e314d454dcf8822f4b
with:
disable-sudo: true
egress-policy: block
Expand All @@ -34,16 +34,16 @@ jobs:
artifactcache.actions.githubusercontent.com:443
- name: 'Checkout Source'
uses: actions/checkout@47fbe2df0ad0e27efb67a70beac3555f192b062f
uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222

- name: 'Run Gosec Security Scanner'
uses: securego/gosec@7df7baa3f0ee4eddf12e3221492f90cf01fed04a
uses: securego/gosec@1f689968ec659df957b18936007a4fe3963c7903
with:
# we let the report trigger content trigger a failure using the GitHub Security features.
args: '-no-fail -fmt sarif -out gosec.sarif ./...'

- name: 'Upload SARIF file'
uses: github/codeql-action/upload-sarif@bb28e7e59e2ad6c1e5400e671795b2fa1b2fca6f
uses: github/codeql-action/upload-sarif@96f284028262d223858647b5680642a84608cc87
with:
# Path to SARIF file relative to the root of the repository
sarif_file: gosec.sarif
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/govulncheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@03bee3930647ebbf994244c21ddbc0d4933aab4f # v2.3.0
uses: step-security/harden-runner@128a63446a954579617e875aaab7d2978154e969 # v2.4.0
with:
disable-sudo: true
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
Expand All @@ -27,14 +27,14 @@ jobs:
vuln.go.dev:443
- name: 'Checkout Repository'
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222 # v3.2.0
with:
fetch-depth: 0

- name: "create version.txt needed for compilation"
run: echo "vuln-version">version.txt

- name: Scan for Vulnerabilities in Code
uses: Templum/govulncheck-action@af8ff86b2f081d9467be504d924488c9480267c2 # v0.10.0
uses: Templum/govulncheck-action@435a35e28c7e56076f6daf838b81c1aa76ee0c95 # v0.10.1
with:
skip-upload: false
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Harden Runner'
uses: step-security/harden-runner@910b3276b25495e4cfd8669cf5d7ea16508b0241
uses: step-security/harden-runner@beefd8c500e5f70ce4fc69e314d454dcf8822f4b
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
allowed-endpoints: >
github.com:443
- name: 'Checkout'
uses: actions/checkout@47fbe2df0ad0e27efb67a70beac3555f192b062f
uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222
with:
fetch-depth: 0

- name: 'Set up Go'
uses: actions/setup-go@41c2024c46acfe1d0b8c9b7f20e28406983e553b
uses: actions/setup-go@49bc3307c5d359429e8aee983859eb8dfad28c6b
with:
go-version-file: './go.mod'

Expand All @@ -38,7 +38,7 @@ jobs:
run: go generate vault4summon

- name: 'Run GoReleaser'
uses: goreleaser/goreleaser-action@347176ca378cb7d09fd40e239baf5134d051d1ac
uses: goreleaser/goreleaser-action@37247345b4543dd6a3264d0a7a576b00c9d6ffb2
with:
distribution: goreleaser
version: latest
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/scorecards-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

steps:
- name: 'Harden Runner'
uses: step-security/harden-runner@910b3276b25495e4cfd8669cf5d7ea16508b0241
uses: step-security/harden-runner@beefd8c500e5f70ce4fc69e314d454dcf8822f4b
with:
disable-sudo: true
egress-policy: audit
Expand All @@ -44,7 +44,7 @@ jobs:
storage.googleapis.com:443
- name: "Checkout code"
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222 # v3.2.0
with:
persist-credentials: false

Expand Down Expand Up @@ -76,6 +76,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@bb28e7e59e2ad6c1e5400e671795b2fa1b2fca6f
uses: github/codeql-action/upload-sarif@96f284028262d223858647b5680642a84608cc87
with:
sarif_file: scorecards.sarif
9 changes: 5 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ module vault4summon

go 1.20

require github.com/hashicorp/vault/api v1.9.0
require github.com/hashicorp/vault/api v1.9.2

require (
github.com/cenkalti/backoff/v3 v3.0.0 // indirect
github.com/go-jose/go-jose/v3 v3.0.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
Expand All @@ -18,9 +19,9 @@ require (
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/ryanuber/go-glob v1.0.0 // indirect
golang.org/x/crypto v0.5.0 // indirect
golang.org/x/net v0.5.0 // indirect
golang.org/x/text v0.6.0 // indirect
golang.org/x/crypto v0.6.0 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/text v0.7.0 // indirect
golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1 // indirect
gopkg.in/square/go-jose.v2 v2.5.1 // indirect
)
21 changes: 21 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/go-jose/go-jose/v3 v3.0.0 h1:s6rrhirfEP/CGIoc6p+PZAeogN2SxKav6Wp7+dyMWVo=
github.com/go-jose/go-jose/v3 v3.0.0/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8=
github.com/go-test/deep v1.0.2 h1:onZX1rnHT3Wv6cqNgYyFOOlgVKJrksuCMCRvJStbMYw=
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
Expand Down Expand Up @@ -35,6 +38,10 @@ github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/hashicorp/vault/api v1.9.0 h1:ab7dI6W8DuCY7yCU8blo0UCYl2oHre/dloCmzMWg9w8=
github.com/hashicorp/vault/api v1.9.0/go.mod h1:lloELQP4EyhjnCQhF8agKvWIVTmxbpEJj70b98959sM=
github.com/hashicorp/vault/api v1.9.1 h1:LtY/I16+5jVGU8rufyyAkwopgq/HpUnxFBg+QLOAV38=
github.com/hashicorp/vault/api v1.9.1/go.mod h1:78kktNcQYbBGSrOjQfHjXN32OhhxXnbYl3zxpd2uPUs=
github.com/hashicorp/vault/api v1.9.2 h1:YjkZLJ7K3inKgMZ0wzCU9OHqc+UqMQyXsPXnf3Cl2as=
github.com/hashicorp/vault/api v1.9.2/go.mod h1:jo5Y/ET+hNyz+JnKDt8XLAdKs+AM0G5W0Vp1IrFI8N8=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE=
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
Expand All @@ -54,18 +61,32 @@ github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkB
github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE=
golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU=
golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc=
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw=
golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws=
golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k=
golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1 h1:NusfzzA6yGQ+ua51ck7E3omNUX/JuqbFSaRGqU8CcLI=
golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/square/go-jose.v2 v2.5.1 h1:7odma5RETjNHWJnR32wx8t+Io4djHE1PqxCFx3iiZ2w=
gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
Expand Down
9 changes: 5 additions & 4 deletions vaultserver/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ module vaultserver

go 1.20

require github.com/hashicorp/vault/api v1.9.0
require github.com/hashicorp/vault/api v1.9.2

require (
github.com/cenkalti/backoff/v3 v3.0.0 // indirect
github.com/go-jose/go-jose/v3 v3.0.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
Expand All @@ -18,9 +19,9 @@ require (
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/ryanuber/go-glob v1.0.0 // indirect
golang.org/x/crypto v0.5.0 // indirect
golang.org/x/net v0.5.0 // indirect
golang.org/x/text v0.6.0 // indirect
golang.org/x/crypto v0.6.0 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/text v0.7.0 // indirect
golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1 // indirect
gopkg.in/square/go-jose.v2 v2.5.1 // indirect
)

0 comments on commit 05d7ef8

Please sign in to comment.