Skip to content

Commit b66bb3c

Browse files
[StepSecurity] Apply security best practices
Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>
1 parent 2899d9e commit b66bb3c

7 files changed

Lines changed: 23 additions & 14 deletions

File tree

.github/workflows/checkmarx-one-scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
jobs:
1212
cx-scan:
1313
name: Checkmarx One Scan
14-
runs-on: ubuntu-latest
14+
runs-on: cx-public-ubuntu-x64
1515
steps:
1616
- name: Checkout
1717
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

.github/workflows/ci-tests.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@ name: Continuous Integration Tests
33
on:
44
pull_request:
55

6+
permissions:
7+
contents: read
8+
69
jobs:
710
unit-tests:
8-
runs-on: ubuntu-latest
11+
runs-on: cx-public-ubuntu-x64
912
steps:
1013
- name: Checkout the repository
1114
uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 #v4.0.0
@@ -32,7 +35,7 @@ jobs:
3235
exit 0
3336
fi
3437
integration-tests:
35-
runs-on: ubuntu-latest
38+
runs-on: cx-public-ubuntu-x64
3639
steps:
3740
- name: Checkout the repository
3841
uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 #v4.0.0
@@ -116,8 +119,11 @@ jobs:
116119
exit 0
117120
fi
118121
lint:
122+
permissions:
123+
contents: read # for actions/checkout to fetch code
124+
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
119125
name: lint
120-
runs-on: ubuntu-latest
126+
runs-on: cx-public-ubuntu-x64
121127
steps:
122128
- uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 #v4.0.0
123129
- name: Set up Go version
@@ -136,7 +142,7 @@ jobs:
136142
only-new-issues: true
137143

138144
govulncheck:
139-
runs-on: ubuntu-latest
145+
runs-on: cx-public-ubuntu-x64
140146
name: govulncheck
141147
steps:
142148
- uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 #v4.0.0
@@ -151,7 +157,7 @@ jobs:
151157
continue-on-error: true
152158

153159
checkDockerImage:
154-
runs-on: ubuntu-latest
160+
runs-on: cx-public-ubuntu-x64
155161
name: scan Docker Image with Trivy
156162
steps:
157163
- name: Checkout code

.github/workflows/dependabot-auto-merge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ permissions:
66

77
jobs:
88
dependabot-merge:
9-
runs-on: ubuntu-latest
9+
runs-on: cx-public-ubuntu-x64
1010
if: ${{ github.actor == 'dependabot[bot]' }}
1111
steps:
1212
- name: Dependabot metadata

.github/workflows/nightly-parallel.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
# to a named matrix group, so they fall through to the catch-all run.
2727
# ─────────────────────────────────────────────────────────────────────────────
2828
validate-test-coverage:
29-
runs-on: ubuntu-latest
29+
runs-on: cx-public-ubuntu-x64
3030
outputs:
3131
uncovered_tests: ${{ steps.find-uncovered.outputs.uncovered_tests }}
3232
has_uncovered: ${{ steps.find-uncovered.outputs.has_uncovered }}
@@ -91,7 +91,7 @@ jobs:
9191
# ─────────────────────────────────────────────────────────────────────────────
9292
integration-tests:
9393
needs: validate-test-coverage
94-
runs-on: ubuntu-latest
94+
runs-on: cx-public-ubuntu-x64
9595
strategy:
9696
fail-fast: false
9797
matrix:
@@ -467,7 +467,7 @@ jobs:
467467
# ─────────────────────────────────────────────────────────────────────────────
468468
merge-coverage:
469469
needs: integration-tests
470-
runs-on: ubuntu-latest
470+
runs-on: cx-public-ubuntu-x64
471471
if: always()
472472
env:
473473
CX_BASE_URI: ${{ secrets.CX_BASE_URI }}
@@ -537,7 +537,7 @@ jobs:
537537
# ─────────────────────────────────────────────────────────────────────────────
538538
notify-on-failure:
539539
needs: [integration-tests, merge-coverage]
540-
runs-on: ubuntu-latest
540+
runs-on: cx-public-ubuntu-x64
541541
if: failure()
542542
steps:
543543
- name: Write failure summary

.github/workflows/pr-label.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
pr-labeler:
1111
permissions:
1212
pull-requests: write # for TimonVS/pr-labeler-action to add labels in PR
13-
runs-on: ubuntu-latest
13+
runs-on: cx-public-ubuntu-x64
1414
steps:
1515
- uses: TimonVS/pr-labeler-action@8447391d87bc7648ce6bf97159c17b642576afb0 #v3
1616
with:

.github/workflows/pr-linter.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ on:
44
pull_request:
55
types: [opened, edited]
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
lint:
9-
runs-on: ubuntu-latest
12+
runs-on: cx-public-ubuntu-x64
1013
steps:
1114
- name: Check PR Title and Branch
1215
run: |

.github/workflows/trivy-cache.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
jobs:
1111
update-trivy-db:
12-
runs-on: ubuntu-latest
12+
runs-on: cx-public-ubuntu-x64
1313
steps:
1414
- name: Setup oras
1515
uses: oras-project/setup-oras@5c0b487ce3fe0ce3ab0d034e63669e426e294e4d #v1.2.2

0 commit comments

Comments
 (0)