ci: add minimal permissions block to workflows#1
Merged
Conversation
Follow principle of least privilege: ci.yml now declares contents:read explicitly; release.yml permissions verified/aligned. Refs POM-176, CodeQL alert #1 (actions/missing-workflow-permissions).
There was a problem hiding this comment.
Pull request overview
Adds explicit GitHub Actions workflow permissions to satisfy the actions/missing-workflow-permissions CodeQL rule and apply least-privilege defaults.
Changes:
- Add workflow-level
permissions: contents: readto.github/workflows/ci.yml.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| contents: read | ||
|
|
||
| jobs: | ||
| build-test: |
There was a problem hiding this comment.
Workflow-level permissions replaces GitHub’s default token permissions for all scopes; with only contents: read the GITHUB_TOKEN will have actions: none. This is likely to break actions/cache@v4 (cache save/restore) and actions/upload-artifact@v4 (artifact upload), which require actions: write. Consider adding actions: write (preferably at job-level if you want to keep least-privilege scope tight).
Suggested change
| build-test: | |
| build-test: | |
| permissions: | |
| contents: read | |
| actions: write |
4 tasks
Pomdapis
added a commit
that referenced
this pull request
Apr 26, 2026
## Summary PR #23 incorrectly bumped CHANGELOG to `[1.0.0-preview.2] - 2026-04-26` with the quality-sweep entries — but tag `v1.0.0-preview.2` was already cut on **2026-04-25** from a different commit set (PRs #1-7) and **already published to nuget.org** (`Compendium.Core 1.0.0-preview.2` is live). Reusing that version was a mistake. This PR reconciles the CHANGELOG with the published reality and rolls today's work into a new **preview.3**: ### `[1.0.0-preview.2] - 2026-04-25` — rewritten retroactively Now matches the auto-generated GitHub release notes for `v1.0.0-preview.2`: - **Added** — `Compendium.Adapters.Shared` (PII masking utilities, introduced in #3). - **Changed** — Dependabot bumps #4-7, OSS governance scaffolding. - **Security** — workflow `permissions:` block (#1), tenant log sanitization (#2), email removal from adapter logs / GDPR (#3). ### `[1.0.0-preview.3] - 2026-04-26` — new Everything since `v1.0.0-preview.2`: - **Added** — DocFX site (#17), 5 ADRs (#14), public ROADMAP (#15), getting-started guide (#20), 4 concept pages (#21), 8 adapter how-to guides (#22). - **Changed** — CodeQL Default Setup → `extended` query suite. - **Security** — `softprops/action-gh-release` pinned to commit SHA (#16, alert #28 closed). ## Test plan - [ ] CI green on this PR. - [ ] After merge, tag `v1.0.0-preview.3` triggers Release workflow successfully. - [ ] `Compendium.* @ 1.0.0-preview.3` published on nuget.org. - [ ] GitHub Release `v1.0.0-preview.3` created with auto-generated notes. VK: POM-186 (Code Quality sweep parent). Co-authored-by: sacha <sacha@scojhconsult.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
permissions: contents: readblock to.github/workflows/ci.yml(principle of least privilege)..github/workflows/release.ymlalready declarescontents: write+packages: write; verified and left unchanged.Context
Fixes CodeQL alert #1 (rule
actions/missing-workflow-permissions, CWE-275). Refs POM-176.Test plan
python3 -c "import yaml; yaml.safe_load(open('.github/workflows/ci.yml')); yaml.safe_load(open('.github/workflows/release.yml'))"