Skip to content

Commit 5e815c7

Browse files
[StepSecurity] Apply security best practices
Signed-off-by: StepSecurity Bot <[email protected]>
1 parent ac36162 commit 5e815c7

File tree

4 files changed

+28
-14
lines changed

4 files changed

+28
-14
lines changed

.github/dependabot.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,8 @@ updates:
2222
directory: "/"
2323
schedule:
2424
interval: "weekly"
25+
26+
- package-ecosystem: docker
27+
directory: /
28+
schedule:
29+
interval: daily

.github/workflows/build.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
branches: [ main ]
88
workflow_dispatch:
99

10+
permissions:
11+
contents: read
12+
1013
jobs:
1114
ci:
1215
strategy:
@@ -18,16 +21,16 @@ jobs:
1821
run:
1922
shell: bash
2023
steps:
21-
- uses: actions/checkout@v4
24+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2225

23-
- uses: actions/setup-go@v5
26+
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
2427
with:
2528
go-version: '1.23'
2629

2730
- name: Build
2831
run: make ci
2932
- name: Upload coverage
30-
uses: actions/upload-artifact@v4
33+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
3134
with:
3235
name: coverage-${{ matrix.os }}
3336
path: coverage.*
@@ -36,13 +39,13 @@ jobs:
3639
if: ${{ runner.os == 'Linux' }}
3740

3841
- name: Upload dist
39-
uses: actions/upload-artifact@v4
42+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
4043
with:
4144
name: dist-${{ matrix.os }}
4245
path: dist
4346

4447
- name: Upload coverage to Codecov
45-
uses: codecov/codecov-action@v5
48+
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0
4649
with:
4750
fail_ci_if_error: true
4851
files: ./coverage.out

.github/workflows/codeql.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
- cron: '11 0 * * 5'
1111
workflow_dispatch:
1212

13+
permissions:
14+
contents: read
15+
1316
jobs:
1417
analyze:
1518
permissions:
@@ -29,15 +32,15 @@ jobs:
2932

3033
steps:
3134
- name: Checkout repository
32-
uses: actions/checkout@v4
35+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3336

34-
- uses: actions/setup-go@v5
37+
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
3538
with:
3639
go-version: '1.23'
3740

3841
# Initializes the CodeQL tools for scanning.
3942
- name: Initialize CodeQL
40-
uses: github/codeql-action/init@v3
43+
uses: github/codeql-action/init@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
4144
with:
4245
languages: ${{ matrix.language }}
4346
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -48,7 +51,7 @@ jobs:
4851
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
4952
# If this step fails, then you should remove it and run the build manually (see below)
5053
- name: Autobuild
51-
uses: github/codeql-action/autobuild@v3
54+
uses: github/codeql-action/autobuild@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
5255

5356
# ℹ️ Command-line programs to run using the OS shell.
5457
# 📚 https://git.io/JvXDl
@@ -62,4 +65,4 @@ jobs:
6265
# make release
6366

6467
- name: Perform CodeQL Analysis
65-
uses: github/codeql-action/analyze@v3
68+
uses: github/codeql-action/analyze@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10

.github/workflows/release.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,28 @@ on:
66
- 'v*'
77
workflow_dispatch:
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
goreleaser:
1114
permissions:
1215
contents: write
1316
packages: write
1417
runs-on: ubuntu-latest
1518
steps:
16-
- uses: actions/checkout@v4
19+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1720
with:
1821
fetch-depth: 0
1922

20-
- uses: actions/setup-go@v5
23+
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
2124
with:
2225
go-version: '1.23'
2326

2427
- run: make inst
2528

2629
- name: Login to GitHub Container Registry
27-
uses: docker/login-action@v3
30+
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
2831
with:
2932
registry: ghcr.io
3033
username: ${{ github.actor }}
@@ -35,7 +38,7 @@ jobs:
3538
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3639

3740
- name: Upload dist
38-
uses: actions/upload-artifact@v4
41+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
3942
with:
4043
name: dist
4144
path: dist

0 commit comments

Comments
 (0)