Skip to content

Commit 22406d0

Browse files
authored
Merge pull request #218 from securesign/update-to-upstream
Update to upstream v1.2.8
2 parents 80f7ead + 5543a8d commit 22406d0

52 files changed

Lines changed: 1051 additions & 754 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-snapshot.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,19 @@ jobs:
1111
contents: read
1212

1313
runs-on: ubuntu-latest
14-
outputs:
15-
hashes: ${{ steps.hash.outputs.hashes }}
16-
tag_name: ${{ steps.tag.outputs.tag_name }}
1714
steps:
1815
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16+
with:
17+
persist-credentials: false
1918

20-
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
19+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
2120
with:
2221
go-version-file: './go.mod'
2322
check-latest: true
2423

25-
- uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3.7.0
26-
- uses: anchore/sbom-action/download-syft@df80a981bc6edbc4e220a492d3cbe9f5547a6e75 # v0.17.9
27-
- uses: imjasonh/setup-ko@d982fec422852203cfb2053a8ec6ad302280d04d # v0.8
24+
- uses: sigstore/cosign-installer@3454372f43399081ed03b604cb2d021dabca52bb # v3.8.2
25+
- uses: anchore/sbom-action/download-syft@e11c554f704a0b820cbf8c51673f6945e0731532 # v0.20.0
26+
- uses: imjasonh/setup-ko@d006021bd0c28d1ce33a07e7943d48b079944c8d # v0.9
2827

2928
- name: Set LDFLAGS
3029
id: ldflags
@@ -35,7 +34,7 @@ jobs:
3534
3635
- name: Run GoReleaser
3736
id: run-goreleaser
38-
uses: goreleaser/goreleaser-action@9ed2f89a662bf1735a48bc8557fd212fa902bebf # v6.1.0
37+
uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # v6.2.1 # zizmor: ignore[cache-poisoning]
3938
with:
4039
version: latest
4140
args: release --clean --skip=sign --snapshot

.github/workflows/codeql_analysis.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,25 @@ jobs:
4141
steps:
4242
- name: Checkout repository
4343
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
44+
with:
45+
persist-credentials: false
4446

45-
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
47+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
4648
with:
4749
go-version-file: './go.mod'
4850
check-latest: true
4951

5052
# Initializes the CodeQL tools for scanning.
5153
- name: Initialize CodeQL
52-
uses: github/codeql-action/init@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
54+
uses: github/codeql-action/init@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
5355
with:
5456
languages: ${{ matrix.language }}
57+
build-mode: manual
58+
dependency-caching: true
5559

56-
- name: Autobuild
57-
uses: github/codeql-action/autobuild@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
60+
- name: Build Code
61+
run: |
62+
make all test
5863
5964
- name: Perform CodeQL Analysis
60-
uses: github/codeql-action/analyze@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
65+
uses: github/codeql-action/analyze@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,5 @@ permissions:
2020

2121
jobs:
2222
dependency-review:
23-
runs-on: ubuntu-latest
24-
steps:
25-
- name: 'Checkout Repository'
26-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
27-
- name: 'Dependency Review'
28-
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0
23+
name: License and Vulnerability Scan
24+
uses: sigstore/community/.github/workflows/reusable-dependency-review.yml@9b1b5aca605f92ec5b1bf3681b1e61b3dbc420cc

.github/workflows/release.yaml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
concurrency: cut-release
99

10-
permissions: read-all
10+
permissions: {}
1111

1212
jobs:
1313
release:
@@ -21,15 +21,18 @@ jobs:
2121
tag_name: ${{ steps.tag.outputs.tag_name }}
2222
steps:
2323
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
24+
with:
25+
persist-credentials: false
2426

25-
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
27+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
2628
with:
2729
go-version-file: './go.mod'
2830
check-latest: true
31+
cache: false # avoid cache-poisoning attacks
2932

30-
- uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3.7.0
31-
- uses: anchore/sbom-action/download-syft@df80a981bc6edbc4e220a492d3cbe9f5547a6e75 # v0.17.9
32-
- uses: imjasonh/setup-ko@d982fec422852203cfb2053a8ec6ad302280d04d # v0.8
33+
- uses: sigstore/cosign-installer@3454372f43399081ed03b604cb2d021dabca52bb # v3.8.2
34+
- uses: anchore/sbom-action/download-syft@e11c554f704a0b820cbf8c51673f6945e0731532 # v0.20.0
35+
- uses: imjasonh/setup-ko@d006021bd0c28d1ce33a07e7943d48b079944c8d # v0.9
3336

3437
- name: Set LDFLAGS
3538
id: ldflags
@@ -40,7 +43,7 @@ jobs:
4043
4144
- name: Run GoReleaser
4245
id: run-goreleaser
43-
uses: goreleaser/goreleaser-action@9ed2f89a662bf1735a48bc8557fd212fa902bebf # v6.1.0
46+
uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # v6.3.0
4447
with:
4548
version: latest
4649
args: release --clean
@@ -70,7 +73,7 @@ jobs:
7073
actions: read # To read the workflow path.
7174
id-token: write # To sign the provenance.
7275
contents: write # To add assets to a release.
73-
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.0.0
76+
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.1.0
7477
with:
7578
base64-subjects: "${{ needs.release.outputs.hashes }}"
7679
upload-assets: true

.github/workflows/scorecard.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
persist-credentials: false
4343

4444
- name: "Run analysis"
45-
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
45+
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
4646
with:
4747
results_file: results.sarif
4848
results_format: sarif
@@ -58,14 +58,14 @@ jobs:
5858
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
5959
# format to the repository Actions tab.
6060
- name: "Upload artifact"
61-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
61+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
6262
with:
6363
name: SARIF file
6464
path: results.sarif
6565
retention-days: 5
6666

6767
# Upload the results to GitHub's code scanning dashboard.
6868
- name: "Upload to code-scanning"
69-
uses: github/codeql-action/upload-sarif@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
69+
uses: github/codeql-action/upload-sarif@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
7070
with:
7171
sarif_file: results.sarif

.github/workflows/tests.yaml

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@ on:
1919
push:
2020
branches:
2121
- 'main'
22-
- 'updates'
2322
pull_request:
2423

25-
permissions: read-all
24+
permissions: {}
2625

2726
jobs:
2827
unit-tests:
@@ -36,8 +35,10 @@ jobs:
3635

3736
steps:
3837
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
38+
with:
39+
persist-credentials: false
3940
# https://github.com/mvdan/github-actions-golang#how-do-i-set-up-caching-between-builds
40-
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
41+
- uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
4142
with:
4243
# In order:
4344
# * Module download cache
@@ -50,7 +51,7 @@ jobs:
5051
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
5152
restore-keys: |
5253
${{ runner.os }}-go-
53-
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
54+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
5455
with:
5556
go-version-file: './go.mod'
5657
check-latest: true
@@ -59,7 +60,7 @@ jobs:
5960
- name: Run Go tests
6061
run: go test -covermode atomic -coverprofile coverage.txt $(go list ./... | grep -v third_party/)
6162
- name: Upload Coverage Report
62-
uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.2
63+
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
6364
with:
6465
env_vars: OS
6566
- name: Run Go tests w/ `-race`
@@ -69,9 +70,13 @@ jobs:
6970
license-check:
7071
name: license boilerplate check
7172
runs-on: ubuntu-latest
73+
permissions:
74+
contents: read
7275
steps:
7376
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
74-
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
77+
with:
78+
persist-credentials: false
79+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
7580
with:
7681
go-version-file: './go.mod'
7782
check-latest: true
@@ -85,15 +90,37 @@ jobs:
8590
golangci:
8691
name: lint
8792
runs-on: ubuntu-latest
93+
permissions:
94+
contents: read
8895
steps:
8996
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
90-
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
97+
with:
98+
persist-credentials: false
99+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
91100
with:
92101
go-version-file: './go.mod'
93102
check-latest: true
94103

95104
- name: golangci-lint
96-
uses: golangci/golangci-lint-action@ec5d18412c0aeab7936cb16880d708ba2a64e1ae # v6.2.0
105+
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
97106
with:
98-
version: v1.61
107+
version: v2.1
99108
args: --timeout=10m --verbose
109+
110+
gen-check:
111+
name: Check generated code
112+
runs-on: ubuntu-latest
113+
permissions:
114+
contents: read
115+
steps:
116+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
117+
with:
118+
persist-credentials: false
119+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
120+
with:
121+
go-version-file: './go.mod'
122+
check-latest: true
123+
- name: Verify generated code is unchanged
124+
run: |
125+
make gen
126+
git diff --exit-code

.golangci.yml

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,46 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16+
version: "2"
17+
run:
18+
issues-exit-code: 1
1619
linters:
1720
enable:
18-
- errcheck
19-
- gofmt
20-
- goimports
21-
- gosec
2221
- gocritic
22+
- gosec
2323
- misspell
2424
- revive
25-
- unused
26-
output:
27-
uniq-by-line: false
25+
exclusions:
26+
generated: lax
27+
presets:
28+
- comments
29+
- common-false-positives
30+
- legacy
31+
- std-error-handling
32+
rules:
33+
- linters:
34+
- errcheck
35+
- gosec
36+
path: _test\.go
37+
- linters:
38+
- staticcheck
39+
path: pkg/signer/tink.go
40+
text: SA1019
41+
paths:
42+
- third_party$
43+
- builtin$
44+
- examples$
2845
issues:
29-
exclude-rules:
30-
- path: _test\.go
31-
linters:
32-
- errcheck
33-
- gosec
34-
- path: pkg/signer/tink.go
35-
linters:
36-
- staticcheck
37-
text: SA1019
3846
max-issues-per-linter: 0
3947
max-same-issues: 0
40-
run:
41-
issues-exit-code: 1
42-
timeout: 10m
48+
uniq-by-line: false
49+
formatters:
50+
enable:
51+
- gofmt
52+
- goimports
53+
exclusions:
54+
generated: lax
55+
paths:
56+
- third_party$
57+
- builtin$
58+
- examples$

.goreleaser.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
project_name: timestamp-authority
22

3+
version: 2
4+
35
env:
46
- GO111MODULE=on
57
- CGO_ENABLED=0
@@ -76,15 +78,15 @@ signs:
7678
artifacts: checksum
7779

7880
archives:
79-
- format: binary
81+
- formats: [ "binary" ]
8082
name_template: "{{ .Binary }}"
8183
allow_different_binary_count: true
8284

8385
checksum:
8486
name_template: "{{ .ProjectName }}_checksums.txt"
8587

8688
snapshot:
87-
name_template: SNAPSHOT-{{ .ShortCommit }}
89+
version_template: SNAPSHOT-{{ .ShortCommit }}
8890

8991
release:
9092
prerelease: auto

.tekton/fetch-tsa-certs-pull-request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ spec:
4545
CGO_ENABLED=0 go build -trimpath -o bin/timestamp-server ./cmd/timestamp-server
4646
go test ./...
4747
- name: go_base_image
48-
value: brew.registry.redhat.io/rh-osbs/openshift-golang-builder@sha256:356986205e66dcc03ef9a9fef5a7a13d6d59c29efacf1d971f9224c678932cf0
48+
value: brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.23@sha256:44fd8f88f3b6463cda15571260f9ca3a0b78d3c8c8827a338e04ab3a23581a88
4949
pipelineRef:
5050
params:
5151
- name: url

.tekton/fetch-tsa-certs-push.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ spec:
4242
CGO_ENABLED=0 go build -trimpath -o bin/timestamp-server ./cmd/timestamp-server
4343
go test ./...
4444
- name: go_base_image
45-
value: brew.registry.redhat.io/rh-osbs/openshift-golang-builder@sha256:356986205e66dcc03ef9a9fef5a7a13d6d59c29efacf1d971f9224c678932cf0
45+
value: brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.23@sha256:44fd8f88f3b6463cda15571260f9ca3a0b78d3c8c8827a338e04ab3a23581a88
4646
pipelineRef:
4747
params:
4848
- name: url

0 commit comments

Comments
 (0)