Skip to content
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
4e0ff1f
ci: replace marocchino/sticky-pull-request-comment by gh cli
rjaegers Oct 6, 2025
c386164
ci: update comments
rjaegers Oct 6, 2025
4a13d40
ci: remove social-interaction workflow
rjaegers Oct 6, 2025
dba12f6
Update .github/workflows/pr-conventional-title.yml
rjaegers Oct 6, 2025
ef6036e
chore: fix issues identified in workflow
rjaegers Oct 6, 2025
880c891
ci: refactor to re-usable workflow
rjaegers Oct 6, 2025
0bc63b6
chore: process more review feedback
rjaegers Oct 6, 2025
0fdad3a
style: add yaml start token
rjaegers Oct 6, 2025
642f0af
chore: apply review comments
rjaegers Oct 6, 2025
81a4527
chore: add checkout action
rjaegers Oct 6, 2025
0d64ddf
chore: restore after failed experiment
rjaegers Oct 6, 2025
a99e6e6
chore: remove more fall-out
rjaegers Oct 6, 2025
dcf4ad4
ci: least privilege and add documentation
rjaegers Oct 6, 2025
61945f8
ci: fix out of date version comment
rjaegers Oct 6, 2025
bebaa47
ci: fix more zizmor findings
rjaegers Oct 6, 2025
615187b
chore: fix more zizmor findings
rjaegers Oct 10, 2025
a24c3e1
Merge commit 'c95553700f0bc0441f25acb4268840fbd6e2733c' into ci/harde…
rjaegers Oct 22, 2025
8e5a5dd
Apply suggestion from @Copilot
rjaegers Oct 22, 2025
f0fbc35
ci: add cooldown to dependabot
rjaegers Oct 22, 2025
262644d
ci: document permissions
rjaegers Oct 22, 2025
457b2c0
Merge branch 'main' into ci/harden-action-security
rjaegers Oct 24, 2025
89ed11d
chore: fix more findings
rjaegers Oct 24, 2025
e098064
chore: document all permissions
rjaegers Oct 27, 2025
87e46a6
chore: fix template injection possibility
rjaegers Oct 27, 2025
3e271c9
Merge branch 'main' into ci/harden-action-security
rjaegers Oct 27, 2025
b387a42
Merge branch 'main' into ci/harden-action-security
rjaegers Oct 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ version: 2

updates:
- package-ecosystem: github-actions
cooldown:
default-days: 7
directory: /
schedule:
interval: weekly
Expand All @@ -14,16 +16,22 @@ updates:
commit-message:
prefix: "ci(deps)"
- package-ecosystem: docker
cooldown:
default-days: 7
directories:
- .devcontainer/cpp
- .devcontainer/rust
schedule:
interval: weekly
- package-ecosystem: devcontainers
cooldown:
default-days: 7
directory: /
schedule:
interval: weekly
- package-ecosystem: npm
cooldown:
default-days: 7
directory: /
schedule:
interval: weekly
Expand All @@ -35,6 +43,8 @@ updates:
commit-message:
prefix: "test(deps)"
- package-ecosystem: pip
cooldown:
default-days: 7
directory: .devcontainer
schedule:
interval: weekly
4 changes: 1 addition & 3 deletions .github/workflows/image-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ jobs:
name: 🧹 Clean Images
runs-on: ubuntu-latest
permissions:
# dataaxiom/ghcr-cleanup-action needs packages write permission
# to delete untagged and orphaned images
packages: write
packages: write # is needed by dataaxiom/ghcr-cleanup-action to delete untagged and orphaned images
steps:
- uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/issue-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
name: ♻️ Close Stale Issues & PRs
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
issues: write # is needed by actions/stale to close/comment on issues
pull-requests: write # is needed by actions/stale to close/comment on PRs
steps:
- uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/issue-creation-tool-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
name: Create tool version evaluation issue
runs-on: ubuntu-latest
permissions:
issues: write
issues: write # is needed by gh cli to create/close/pin/unpin issues
steps:
- uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/linting-formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,17 @@ concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

permissions:
contents: read
permissions: {}

jobs:
linter:
name: 🧹 Lint & Format
runs-on: ubuntu-latest
permissions:
contents: read
actions: read
pull-requests: write
security-events: write
actions: read # is needed by zizmorcore/zizmor-action
pull-requests: write # is needed by oxsecurity/megalinter and reviewdog/action-suggester to post PR comments
security-events: write # is needed by oxsecurity/megalinter for uploading sarif files
steps:
- uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
Expand Down Expand Up @@ -55,6 +54,6 @@ jobs:
name: Linter Report
path: |
megalinter-reports
- uses: reviewdog/action-suggester@aa38384ceb608d00f84b4690cacc83a5aba307ff # v1.19.0
- uses: reviewdog/action-suggester@aa38384ceb608d00f84b4690cacc83a5aba307ff # v1.24.0
with:
tool_name: MegaLinter
7 changes: 4 additions & 3 deletions .github/workflows/ossf-scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ on:
push:
branches: [main]

permissions: read-all
permissions: {}

jobs:
ossf-scorecard:
name: 🛡️ OpenSSF Scorecard
runs-on: ubuntu-latest
permissions:
security-events: write
id-token: write
contents: read
security-events: write # is needed by github/codeql-action/upload-sarif to upload sarif files
id-token: write # is needed by ossf/scorecard-action to authenticate with OIDC
steps:
- uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/pr-conventional-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
name: ✅ Validate PR Title
runs-on: ubuntu-latest
permissions:
pull-requests: write
pull-requests: write # is needed by marocchino/sticky-pull-request-comment to post comments on PRs
steps:
- uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
Expand Down Expand Up @@ -44,9 +44,8 @@ jobs:
:warning: Details

${{ steps.pr-title.outputs.error_message }}

- if: steps.pr-title.outputs.error_message == null
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4
- uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4
if: steps.pr-title.outputs.error_message == null
with:
header: pr-title-lint-error
delete: true
5 changes: 2 additions & 3 deletions .github/workflows/pr-image-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
name: 🗑️ Delete PR Images
runs-on: ubuntu-latest
permissions:
packages: write
packages: write # is needed by dataaxiom/ghcr-cleanup-action to delete images
steps:
- uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
Expand All @@ -26,8 +26,7 @@ jobs:
name: 🧹 Cleanup Cache
runs-on: ubuntu-latest
permissions:
# actions: write permission is required to delete the cache
actions: write
actions: write # is needed to delete workflow run caches
steps:
- uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pr-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
name: 📊 Add PR Report
permissions:
contents: read
checks: read
pull-requests: write
repository-projects: read
actions: read
checks: read # is needed by philips-software/pull-request-report-action to fetch check run information
pull-requests: write # is needed by philips-software/pull-request-report-action to post the report as a comment on the PR
repository-projects: read # is needed by philips-software/pull-request-report-action to fetch project information
actions: read # is needed by philips-software/pull-request-report-action to fetch workflow run information
runs-on: ubuntu-latest
steps:
- uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,9 @@ jobs:
name: 📄 Upload Documents
runs-on: ubuntu-latest
permissions:
# `contents: write` is needed to modify a release.
# Please note that this is an overly broad scope, but GitHub does not
# currently provide a more fine-grained permission for release modification.
contents: write
contents: write # is needed to modify a release
needs: [build-push-test]
steps:
- uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ on:
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}

permissions:
contents: read
permissions: {}

jobs:
create-release:
name: 🚀 Create Release
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-published.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
name: Comment on released PRs
runs-on: ubuntu-latest
permissions:
pull-requests: write
pull-requests: write # is needed by rdlf0/comment-released-prs-action to post comments on PRs
steps:
- uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
Expand Down
31 changes: 0 additions & 31 deletions .github/workflows/social-interaction.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/update-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
# set-up correctly.
container: ghcr.io/philips-software/amp-devcontainer-${{ matrix.flavor }}:edge
permissions:
contents: write
pull-requests: write
contents: write # is needed by peter-evans/create-pull-request to create branches and push commits
pull-requests: write # is needed by peter-evans/create-pull-request to create a PR
steps:
- uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
Expand Down Expand Up @@ -53,8 +53,8 @@ jobs:
flavor: ["cpp", "rust"]
file: ["devcontainer-metadata.json", "devcontainer.json"]
permissions:
contents: write
pull-requests: write
contents: write # is needed by peter-evans/create-pull-request to create branches and push commits
pull-requests: write # is needed by peter-evans/create-pull-request to create a PR
steps:
- uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vulnerability-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
matrix:
flavor: ["cpp", "rust"]
permissions:
security-events: write
security-events: write # is needed by github/codeql-action/upload-sarif to upload sarif files
steps:
- uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/wc-acceptance-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,18 @@
run: |
set -Eeuo pipefail

if [[ "${{ github.event_name }}" == "pull_request" ]]; then
if [[ "${EVENT_NAME}" == "pull_request" ]]; then
gh secret set -a codespaces IMAGE_VERSION --body "pr-${{ github.event.pull_request.number }}"
elif [[ "${{ github.event_name }}" == "push" && "${{ startsWith(github.ref, 'refs/tags/') }}" == "true" ]]; then
elif [[ "${EVENT_NAME}" == "push" && "${{ startsWith(github.ref, 'refs/tags/') }}" == "true" ]]; then
gh secret set -a codespaces IMAGE_VERSION --body "${GITHUB_REF#refs/tags/}"
else
gh secret set -a codespaces IMAGE_VERSION --body "edge"
fi

echo CODESPACE_NAME="$(gh codespace create -R "${{ github.repository }}" -b "$HEAD_REF" -m basicLinux32gb --devcontainer-path "${DEVCONTAINER_FILE}" --idle-timeout 10m --retention-period 1h)" >> "$GITHUB_ENV"
echo CODESPACE_NAME="$(gh codespace create -R "${GITHUB_REPOSITORY}" -b "${HEAD_REF}" -m basicLinux32gb --devcontainer-path "${DEVCONTAINER_FILE}" --idle-timeout 10m --retention-period 1h)" >> "$GITHUB_ENV"
env:
DEVCONTAINER_FILE: ${{ inputs.devcontainer-file }}
EVENT_NAME: ${{ github.event_name }}
GH_TOKEN: ${{ secrets.TEST_GITHUB_TOKEN }}
HEAD_REF: ${{ github.head_ref }}
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wc-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
needs: sanitize-image-name
permissions:
contents: read
packages: write
packages: write # is needed by docker/build-push-action to push images to GitHub Container Registry
steps:
- uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wc-dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
runs-on: ${{ fromJson(inputs.runner-labels) }}
permissions:
contents: read
pull-requests: write
pull-requests: write # is needed by actions/dependency-review-action to write PR summaries
steps:
- uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
Expand Down
Loading