Skip to content

fix: set permissions for ci workflow#1418

Open
sigmaaa wants to merge 3 commits intomasterfrom
IEP-1732
Open

fix: set permissions for ci workflow#1418
sigmaaa wants to merge 3 commits intomasterfrom
IEP-1732

Conversation

@sigmaaa
Copy link
Collaborator

@sigmaaa sigmaaa commented Mar 23, 2026

Description

Please include a summary of the change and which issue is fixed.

Fixes # (IEP-1732)

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How has this been tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Test Configuration:

  • ESP-IDF Version:
  • OS (Windows,Linux and macOS):

Dependent components impacted by this PR:

  • Component 1
  • Component 2

Checklist

  • PR Self Reviewed
  • Applied Code formatting
  • Added Documentation
  • Added Unit Test
  • Verified on all platforms - Windows,Linux and macOS

Summary by CodeRabbit

  • Chores
    • Explicitly set workflow token permissions (contents: read, checks: write) for CI workflows, including the Windows CI workflow.

@sigmaaa sigmaaa self-assigned this Mar 23, 2026
@coderabbitai
Copy link

coderabbitai bot commented Mar 23, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 48ad3702-abf0-4863-aeca-bf5b252dc2f8

📥 Commits

Reviewing files that changed from the base of the PR and between 2060ce3 and 6383e34.

📒 Files selected for processing (1)
  • .github/workflows/ci_windows.yml
✅ Files skipped from review due to trivial changes (1)
  • .github/workflows/ci_windows.yml

📝 Walkthrough

Walkthrough

Added a top-level permissions block to two GitHub Actions workflows, granting contents: read and checks: write at workflow level.

Changes

Cohort / File(s) Summary
GitHub Actions (Linux / cross-platform)
.github/workflows/ci.yml
Added workflow-level permissions declaration: contents: read, checks: write.
GitHub Actions (Windows)
.github/workflows/ci_windows.yml
Added workflow-level permissions declaration: contents: read, checks: write.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • kolipakakondal
  • alirana01
  • AndriiFilippov

Poem

🐰 I hopped through YAML, gentle and light,

Set permissions just so, nothing more to fight.
Contents to read, checks to write in the night,
Quietly safer, the workflows take flight.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: adding permissions blocks to CI workflows (both ci.yml and ci_windows.yml).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch IEP-1732

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)

16-19: Good security practice: explicit minimal permissions.

The permissions block correctly applies the principle of least privilege:

  • contents: read is sufficient for actions/checkout
  • checks: write is required by phoenix-actions/test-reporting@v12 to publish test reports

One minor style note: the block uses 4-space indentation while the rest of the file predominantly uses 2 spaces. Consider aligning for consistency:

,

🧹 Optional: align indentation with file style
 permissions:
-    contents: read
-    checks: write
+  contents: read
+  checks: write
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yml around lines 16 - 19, The permissions block uses
4-space indentation inconsistent with the file's 2-space style; update the
permissions block (the "permissions" mapping and its child keys "contents" and
"checks") to use 2-space indentation so it matches the rest of the workflow
YAML—leave the values unchanged (contents: read and checks: write) since those
are correct for actions/checkout and phoenix-actions/test-reporting@v12.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 16-19: The permissions block uses 4-space indentation inconsistent
with the file's 2-space style; update the permissions block (the "permissions"
mapping and its child keys "contents" and "checks") to use 2-space indentation
so it matches the rest of the workflow YAML—leave the values unchanged
(contents: read and checks: write) since those are correct for actions/checkout
and phoenix-actions/test-reporting@v12.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c1eb770f-0760-4f57-b918-f46467372a8c

📥 Commits

Reviewing files that changed from the base of the PR and between 3a5a7c7 and 4ea39e0.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml

@AndriiFilippov
Copy link
Collaborator

@sigmaaa , please update windows.yml file as well

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/ci_windows.yml:
- Around line 16-18: The permissions block is mis-indented and currently nested
under pull_request; move the "permissions" block to top-level by removing the
extra leading space so "permissions:" aligns with top-level keys, and ensure its
child keys "contents:" and "checks:" remain indented under it (preserve their
relative indentation).

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 199fb6e8-d979-4af1-9d7e-3976a4e95ac9

📥 Commits

Reviewing files that changed from the base of the PR and between 4ea39e0 and 2060ce3.

📒 Files selected for processing (1)
  • .github/workflows/ci_windows.yml

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