Skip to content

refactor(ci): split CI jobs more granularly#192

Merged
joe0BAB merged 2 commits into
mainfrom
refactor/ci-restructure
Aug 5, 2025
Merged

refactor(ci): split CI jobs more granularly#192
joe0BAB merged 2 commits into
mainfrom
refactor/ci-restructure

Conversation

@joe0BAB
Copy link
Copy Markdown
Collaborator

@joe0BAB joe0BAB commented Aug 5, 2025

Adresses #190 (comment)

@joe0BAB joe0BAB self-assigned this Aug 5, 2025
@joe0BAB joe0BAB requested review from Benehiko and wmluke August 5, 2025 10:15
@joe0BAB joe0BAB marked this pull request as ready for review August 5, 2025 10:15
uses: actions/checkout@v4

- name: Hub login
uses: docker/login-action@v3

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Build' step
Uses Step
uses 'docker/login-action' with ref 'v3', not a pinned commit hash

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Build' step
Uses Step: buildx
uses 'docker/setup-buildx-action' with ref 'v3', not a pinned commit hash
uses: actions/checkout@v4

- name: Hub login
uses: docker/login-action@v3

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Lint' step
Uses Step
uses 'docker/login-action' with ref 'v3', not a pinned commit hash

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Lint' step
Uses Step: buildx
uses 'docker/setup-buildx-action' with ref 'v3', not a pinned commit hash
Comment on lines +11 to +18
name: Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Unit Tests
run: make unit-tests

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 9 months ago

To fix the problem, add a permissions block to the workflow file to explicitly restrict the GITHUB_TOKEN permissions. Since the workflow only checks out code and runs unit tests, it only needs read access to repository contents. The best way to do this is to add permissions: contents: read at the top level of the workflow file, just after the name field and before the on field. This will apply the restriction to all jobs in the workflow. No other changes are needed.

Suggested changeset 1
.github/workflows/unittests.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml
--- a/.github/workflows/unittests.yml
+++ b/.github/workflows/unittests.yml
@@ -1,2 +1,4 @@
 name: Unit Tests
+permissions:
+  contents: read
 
EOF
@@ -1,2 +1,4 @@
name: Unit Tests
permissions:
contents: read

Copilot is powered by AI and may make mistakes. Always verify output.
@joe0BAB joe0BAB merged commit 7da7c2a into main Aug 5, 2025
11 checks passed
@joe0BAB joe0BAB deleted the refactor/ci-restructure branch August 5, 2025 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants