Skip to content

Commit

Permalink
Merge pull request #377 from step-security-bot/stepsecurity_remediati…
Browse files Browse the repository at this point in the history
…on_1670524855

[StepSecurity] ci: Harden GitHub Actions
  • Loading branch information
bjhargrave authored Dec 8, 2022
2 parents 7300cba + 4f3e8f6 commit 2ad339d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/cibuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,15 @@ jobs:
name: JDK${{ matrix.java }} ${{ matrix.os }} ${{ matrix.mavenopts }}
runs-on: ${{ matrix.os }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@ebacdc22ef6c2cfb85ee5ded8f2e640f4c776dd5 # v2.0.0
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- name: Git Checkout
uses: actions/checkout@v3
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
- name: Set up Java ${{ matrix.java }}
uses: actions/setup-java@v3
uses: actions/setup-java@c3ac5dd0ed8db40fedb61c32fbe677e6b355e94c # v3.8.0
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
Expand All @@ -78,7 +83,7 @@ jobs:
./.github/scripts/build.sh ${{ matrix.mavenopts }}
- name: Configure settings.xml for Publish
if: ${{ matrix.canonical }}
uses: actions/setup-java@v3
uses: actions/setup-java@c3ac5dd0ed8db40fedb61c32fbe677e6b355e94c # v3.8.0
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,25 @@ jobs:
name: CodeQL JDK${{ matrix.java }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@ebacdc22ef6c2cfb85ee5ded8f2e640f4c776dd5 # v2.0.0
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
- name: Set up Java ${{ matrix.java }}
uses: actions/setup-java@v3
uses: actions/setup-java@c3ac5dd0ed8db40fedb61c32fbe677e6b355e94c # v3.8.0
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Initialize CodeQL Analysis
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@b2a92eb56d8cb930006a1c6ed86b0782dd8a4297 # v2.1.35
with:
languages: 'java'
- name: Build for CodeQL Analysis
id: build
run: |
./.github/scripts/codeql-build.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@b2a92eb56d8cb930006a1c6ed86b0782dd8a4297 # v2.1.35
7 changes: 6 additions & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,13 @@ jobs:
name: Stale
runs-on: 'ubuntu-latest'
steps:
- name: Harden Runner
uses: step-security/harden-runner@ebacdc22ef6c2cfb85ee5ded8f2e640f4c776dd5 # v2.0.0
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- name: Stale Action
uses: actions/stale@v6
uses: actions/stale@5ebf00ea0e4c1561e9b43a292ed34424fb1d4578 # v6.0.1
with:
days-before-stale: 365
days-before-close: 21
Expand Down

0 comments on commit 2ad339d

Please sign in to comment.