-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CP-Sec] Remediate OpenSSF flagged issues
* Add top-level permissions to CodeQL workflow * Add top-level permissions to CI workflow * Pin docker image by hash * Pin github actions by hash
- Loading branch information
Showing
4 changed files
with
20 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,9 @@ name: Continuous Integration | |
|
||
on: [push, pull_request] | ||
|
||
permissions: | ||
contents: read | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
@@ -12,10 +15,10 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | ||
|
||
- name: clang-format | ||
uses: jidicula/[email protected] | ||
uses: jidicula/clang-format-action@c74383674bf5f7c69f60ce562019c1c94bc1421a # v4.13.0 | ||
with: | ||
clang-format-version: '17' | ||
check-path: 'src' | ||
|
@@ -30,10 +33,10 @@ jobs: | |
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | ||
|
||
- name: Path filter | ||
uses: dorny/paths-filter@v3 | ||
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | ||
id: changes | ||
with: | ||
filters: | | ||
|
@@ -42,19 +45,19 @@ jobs: | |
- name: Set up Docker Buildx | ||
if: steps.changes.outputs.container == 'true' | ||
uses: docker/setup-buildx-action@v3 | ||
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0 | ||
|
||
- name: Log in to the Container registry | ||
if: steps.changes.outputs.container == 'true' | ||
uses: docker/login-action@v3 | ||
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
tags: | | ||
|
@@ -65,7 +68,7 @@ jobs: | |
- name: Build and push | ||
if: steps.changes.outputs.container == 'true' | ||
uses: docker/build-push-action@v5 | ||
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0 | ||
with: | ||
context: '{{defaultContext}}:ci' | ||
push: true | ||
|
@@ -92,7 +95,7 @@ jobs: | |
password: ${{ secrets.github_token }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | ||
with: | ||
submodules: "recursive" | ||
|
||
|
@@ -118,7 +121,7 @@ jobs: | |
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | ||
|
||
- name: Configure CMake (no graphics) | ||
run: > | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters