Skip to content

ci: scope dispatch permissions and align CI docs - #341

Merged
c-vigo merged 2 commits into
devfrom
feature/340-harden-dispatch-permissions-and-ci-docs
Mar 17, 2026
Merged

c-vigo merged 2 commits into
devfrom
feature/340-harden-dispatch-permissions-and-ci-docs

Conversation

@c-vigo

@c-vigo c-vigo commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

Description

This PR addresses two Copilot findings for the smoke-test repository_dispatch workflow template by hardening token permissions and fixing CI trigger documentation drift. It also adds the corresponding ## Unreleased changelog entry for issue traceability.

Type of Change

  • feat -- New feature
  • fix -- Bug fix
  • docs -- Documentation only
  • chore -- Maintenance task (deps, config, etc.)
  • refactor -- Code restructuring (no behavior change)
  • test -- Adding or updating tests
  • ci -- CI/CD pipeline changes
  • build -- Build system or dependency changes
  • revert -- Reverts a previous commit
  • style -- Code style (formatting, whitespace)

Modifiers

  • Breaking change (!) -- This change breaks backward compatibility

Changes Made

  • assets/smoke-test/.github/workflows/repository-dispatch.yml
    • Change header comment to reflect both CI workflows triggering on deploy PRs (ci.yml and ci-container.yml)
    • Reduce workflow-level GITHUB_TOKEN scope to contents: read
    • Grant contents: write only at publish-release job level
  • CHANGELOG.md
    • Add an Unreleased Security entry for issue #340
  • assets/workspace/.devcontainer/CHANGELOG.md
    • Sync generated workspace changelog via manifest hook

Changelog Entry

Security

  • Smoke-test dispatch workflow permissions now follow least privilege (#340)
    • Reduce assets/smoke-test/.github/workflows/repository-dispatch.yml workflow token permissions from write to read by default
    • Grant contents: write only to publish-release, the single job that creates or edits GitHub Releases

Testing

  • Tests pass locally (just test)
  • Manual testing performed (describe below)

Manual Testing Details

N/A

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly (edit docs/templates/, then run just docs)
  • I have updated CHANGELOG.md in the [Unreleased] section (and pasted the entry above)
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Notes

Copilot review reference in downstream PR:

Refs: #340

@c-vigo c-vigo self-assigned this Mar 17, 2026
@c-vigo
c-vigo requested a review from Copilot March 17, 2026 13:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR tightens the permissions model for the smoke-test repository dispatch workflow to better follow GitHub Actions least-privilege guidance, and documents the change in the changelog(s).

Changes:

  • Reduce default GITHUB_TOKEN permissions in the smoke-test repository-dispatch.yml workflow to contents: read.
  • Grant contents: write only to the publish-release job (the job that creates/edits GitHub Releases).
  • Record the security hardening in both the canonical and workspace/devcontainer changelogs.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
CHANGELOG.md Adds a Security entry describing the least-privilege permissions change.
assets/workspace/.devcontainer/CHANGELOG.md Mirrors the same Security entry for the workspace/devcontainer changelog copy.
assets/smoke-test/.github/workflows/repository-dispatch.yml Drops workflow-wide contents from write→read and scopes write access to publish-release only.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@c-vigo
c-vigo merged commit 3405b10 into dev Mar 17, 2026
16 checks passed
@c-vigo
c-vigo deleted the feature/340-harden-dispatch-permissions-and-ci-docs branch March 17, 2026 13:53
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