Skip to content

Commit 3cfe900

Browse files
SEC-090: Automated trusted workflow pinning (2025-04-07) (#1465)
* Result of tsccr-helper -log-level=info gha update -latest .github/ * golangci-lint migrate --------- Co-authored-by: hashicorp-tsccr[bot] <hashicorp-tsccr[bot]@users.noreply.github.com> Co-authored-by: Baraa Basata <[email protected]>
1 parent 0f3d655 commit 3cfe900

File tree

5 files changed

+56
-29
lines changed

5 files changed

+56
-29
lines changed

.github/workflows/ci-github-actions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
17-
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
17+
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
1818
with:
1919
go-version-file: 'go.mod'
2020
- run: go install github.com/rhysd/actionlint/cmd/actionlint@latest

.github/workflows/ci-go.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20-
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
20+
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
2121
with:
2222
go-version-file: 'go.mod'
2323
- run: go mod download
24-
- uses: golangci/golangci-lint-action@4696ba8babb6127d732c3c6dde519db15edab9ea # v6.5.1
24+
- uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0
2525
with:
2626
version: latest
2727
terraform-provider-corner-tfprotov5:
@@ -36,7 +36,7 @@ jobs:
3636
with:
3737
path: terraform-provider-corner
3838
repository: hashicorp/terraform-provider-corner
39-
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
39+
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
4040
with:
4141
go-version-file: 'go.mod'
4242
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
@@ -60,13 +60,13 @@ jobs:
6060
go-version: [ '1.24', '1.23' ]
6161
steps:
6262
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
63-
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
63+
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
6464
with:
6565
go-version: ${{ matrix.go-version }}
6666
- run: go mod download
6767
- run: go test -coverprofile=coverage.out ./...
6868
- run: go tool cover -html=coverage.out -o coverage.html
69-
- uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
69+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
7070
with:
7171
name: go-${{ matrix.go-version }}-coverage
7272
path: coverage.html

.github/workflows/ci-goreleaser.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
18-
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
18+
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
1919
with:
2020
go-version-file: 'go.mod'
21-
- uses: goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3 # v6.2.1
21+
- uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # v6.3.0
2222
with:
2323
args: check

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ jobs:
134134
ref: ${{ inputs.versionNumber }}
135135
fetch-depth: 0
136136

137-
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
137+
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
138138
with:
139139
go-version-file: 'go.mod'
140140

@@ -143,7 +143,7 @@ jobs:
143143
cd .changes
144144
sed -e "1{/# /d;}" -e "2{/^$/d;}" ${{ needs.changelog-version.outputs.version }}.md > /tmp/release-notes.txt
145145
146-
- uses: goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3 # v6.2.1
146+
- uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # v6.3.0
147147
env:
148148
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
149149
with:

.golangci.yml

Lines changed: 46 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,58 @@
1-
issues:
2-
exclude-rules:
3-
- linters:
4-
- staticcheck
5-
text: 'SA1019: schema.SchemaValidateFunc is deprecated'
6-
max-issues-per-linter: 0
7-
max-same-issues: 0
8-
1+
version: "2"
92
linters:
10-
disable-all: true
3+
default: none
114
enable:
5+
- copyloopvar
126
- durationcheck
137
- errcheck
14-
- copyloopvar
15-
- gofmt
16-
- gosimple
8+
- govet
179
- ineffassign
1810
- makezero
1911
- nilerr
20-
# - paralleltest # Reference: https://github.com/kunwardeep/paralleltest/issues/14
2112
- predeclared
2213
- staticcheck
23-
- usetesting
2414
- unconvert
2515
- unparam
2616
- unused
27-
- govet
28-
29-
run:
30-
# Prevent false positive timeouts in CI
31-
timeout: 5m
17+
- usetesting
18+
exclusions:
19+
generated: lax
20+
presets:
21+
- comments
22+
- common-false-positives
23+
- legacy
24+
- std-error-handling
25+
rules:
26+
- linters:
27+
- staticcheck
28+
text: 'SA1019: schema.SchemaValidateFunc is deprecated'
29+
paths:
30+
- third_party$
31+
- builtin$
32+
- examples$
33+
settings:
34+
staticcheck:
35+
checks:
36+
- all
37+
- '-QF1001' # "could apply De Morgan's law" -- https://staticcheck.dev/docs/checks/#QF1001
38+
- '-QF1002' # "could use tagged switch" -- https://staticcheck.dev/docs/checks/#QF1002
39+
- '-QF1004' # "could use strings.ReplaceAll instead" -- https://staticcheck.dev/docs/checks/#QF1004
40+
- '-QF1007' # "could merge conditional assignment into variable declaration" -- https://staticcheck.dev/docs/checks/#QF1007
41+
- '-QF1008' # "could remove embedded field "Block" from selector" -- https://staticcheck.dev/docs/checks/#QF1008
42+
- '-QF1011' # "could omit type *terraform.InstanceState from declaration" -- https://staticcheck.dev/docs/checks/#QF1011
43+
- '-ST1003' # example: "const autoTFVarsJson should be autoTFVarsJSON" -- https://staticcheck.dev/docs/checks/#ST1003
44+
- '-ST1005' # "error strings should not end with punctuation or newlines" -- https://staticcheck.dev/docs/checks/#ST1005
45+
- '-ST1016' # example: "methods on the same type should have the same receiver name (seen 2x "r", 2x "s")" -- https://staticcheck.dev/docs/checks/#ST1016
46+
- '-ST1023' # example: "should omit type *terraform.InstanceState from declaration;" -- https://staticcheck.dev/docs/checks/#ST1023
47+
issues:
48+
max-issues-per-linter: 0
49+
max-same-issues: 0
50+
formatters:
51+
enable:
52+
- gofmt
53+
exclusions:
54+
generated: lax
55+
paths:
56+
- third_party$
57+
- builtin$
58+
- examples$

0 commit comments

Comments
 (0)