Skip to content

Conversation

@JPrier
Copy link
Owner

@JPrier JPrier commented Jul 24, 2025

Summary

  • add CI workflow with job matrix and coverage upload
  • add firmware build workflow
  • include cargo-tarpaulin as a dev dependency
  • format code with cargo fmt

Testing

  • cargo fmt --all -- --check
  • cargo clippy -p keyboard-core -p simulator
  • cargo test -p keyboard-core -p simulator

https://chatgpt.com/codex/tasks/task_e_687ff1fde2f0832d9582e1ff926f602f

Comment on lines +11 to +19
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
targets: thumbv7em-none-eabihf
- name: Build firmware
run: cargo build -p firmware --release --target=thumbv7em-none-eabihf

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

To fix the issue, add a permissions block at the root of the workflow file. This block will explicitly define the minimal permissions required for the workflow. Since the workflow only checks out the repository and builds the firmware, it likely only needs contents: read permission. This ensures that the GITHUB_TOKEN has the least privilege necessary to perform the workflow tasks.

The permissions block should be added immediately after the name field in the workflow file to apply to all jobs in the workflow.


Suggested changeset 1
.github/workflows/firmware.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/firmware.yml b/.github/workflows/firmware.yml
--- a/.github/workflows/firmware.yml
+++ b/.github/workflows/firmware.yml
@@ -1,2 +1,4 @@
 name: Firmware Build
+permissions:
+  contents: read
 
EOF
@@ -1,2 +1,4 @@
name: Firmware Build
permissions:
contents: read

Copilot is powered by AI and may make mistakes. Always verify output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants