Skip to content

Commit

Permalink
Security hardening (#1383)
Browse files Browse the repository at this point in the history
- Move security-events to job-level in PSSriptAnalyzer workflow
- Add Harden Runner to RemoveRepositories job
  • Loading branch information
mazhelez authored Jan 9, 2025
1 parent 1c9e714 commit 8bee5a9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/CleanupTempRepos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ jobs:
runs-on: [ ubuntu-latest ]
needs: [ Check ]
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
egress-policy: audit

- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Remove Temp Repositories
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/powershell.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ on:

permissions:
contents: read
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results

jobs:
build:
name: PSScriptAnalyzer
runs-on: ubuntu-latest
permissions:
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
Expand Down

0 comments on commit 8bee5a9

Please sign in to comment.