ci: [StepSecurity] Apply security best practices (#5271)

Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>
Signed-off-by: Rui Chen <rui@chenrui.dev>
Co-authored-by: RB <7775707+nitrocode@users.noreply.github.com>
Co-authored-by: Rui Chen <rui@chenrui.dev>
This commit is contained in:
StepSecurity Bot
2025-01-24 20:45:00 -08:00
committed by GitHub
parent 23bd14f884
commit 5e4a35b596
15 changed files with 192 additions and 0 deletions

View File

@@ -43,6 +43,11 @@ jobs:
if: github.event.pull_request.draft == false
runs-on: ubuntu-24.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
id: changes
@@ -72,6 +77,11 @@ jobs:
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
@@ -117,4 +127,9 @@ jobs:
language: [ 'go', 'javascript' ]
runs-on: ubuntu-24.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- run: 'echo "No build required"'