Skip to content

v0.0.9#100

Merged
ararog merged 10 commits intomainfrom
develop
Dec 9, 2025
Merged

v0.0.9#100
ararog merged 10 commits intomainfrom
develop

Conversation

@ararog
Copy link
Copy Markdown
Owner

@ararog ararog commented Dec 9, 2025

No description provided.

@ararog ararog added this to the v0.0.9 milestone Dec 9, 2025
@ararog ararog self-assigned this Dec 9, 2025
Comment on lines +10 to +36
runs-on: ubuntu-latest
container:
image: xd009642/tarpaulin:develop-nightly
options: --security-opt seccomp=unconfined
services:
redis:
image: redis:5.0.7
ports:
- 6379:6379
options: --entrypoint redis-server
steps:
- uses: actions/checkout@v5
- name: Install Protoc
uses: arduino/setup-protoc@v1
- name: Install Redis
run: |
apt-get update
apt-get install -y redis-server
redis-server --daemonize yes
redis-cli ping
- name: Generate code coverage
run: |
cargo +nightly tarpaulin --verbose --all-features --workspace --timeout 120 --out xml
- name: Upload To codecov.io
uses: codecov/codecov-action@v3
with:
token: ${{secrets.CODECOV_TOKEN}} No newline at end of file

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 5 months ago

To fix the problem, we should add an explicit permissions block to the job that is missing it. This block should specify the least privileges required. In this workflow, the job cover does not appear to need to write back to the repository (it only checks out code, installs dependencies, runs tests, and uploads coverage results). Therefore, setting permissions: contents: read at the job level (just above runs-on:) ensures only read access to repository contents, adhering to the principle of least privilege. No new imports or action changes are needed; only the YAML configuration is updated.

Suggested changeset 1
.github/workflows/code-coverage.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/code-coverage.yml b/.github/workflows/code-coverage.yml
--- a/.github/workflows/code-coverage.yml
+++ b/.github/workflows/code-coverage.yml
@@ -7,6 +7,8 @@
 
 jobs:
   cover:
+    permissions:
+      contents: read
     runs-on: ubuntu-latest
     container:
       image: xd009642/tarpaulin:develop-nightly
EOF
@@ -7,6 +7,8 @@

jobs:
cover:
permissions:
contents: read
runs-on: ubuntu-latest
container:
image: xd009642/tarpaulin:develop-nightly
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
@ararog ararog merged commit 5a5483d into main Dec 9, 2025
7 checks passed
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.

2 participants