Potential fix for code scanning alert no. 1: Workflow does not contain permissions - #14
Merged
Conversation
…n permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
corvid-agent
marked this pull request as ready for review
March 19, 2026 01:04
6 tasks
0xLeif
added a commit
that referenced
this pull request
Aug 1, 2026
CI failed on checks we should have run before push: - cargo fmt (rustfmt whitespace on helpers/tests) - spec-check path coverage (need delivering active change + export docs) - cascade: Required CI gate / implementation ready / trust This commit: - Formats sources - Documents artifacts_complete_for_guidance - Adds approved implementing CHG-0073 covering changed paths/specs - Notes SpecSync 6 vs fledge#506 / #481 stranded-accepted UX Local verify: cargo fmt --check, unit tests for #14/#16, specsync check --strict --require-coverage 100 --force (exit 0).
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.
Potential fix for https://github.com/CorvidLabs/spec-sync/security/code-scanning/1
In general, the fix is to declare a
permissionsblock that grants only the scopes needed by this workflow. Since the jobs only need to read the repository contents (for checkout) and do not interact with issues, PRs, or releases,contents: readat the workflow or job level is sufficient.The best fix without changing functionality is to add a top-level
permissionsblock just under thename: CIline in.github/workflows/ci.yml. This will apply to all jobs (testandfmt) and restrict theGITHUB_TOKENto read-only repository contents. No other permissions (likepull-requests: write) are needed, since this workflow does not modify PRs or push changes. No additional imports, methods, or definitions are required; the change is purely declarative in the YAML.Concretely, in
.github/workflows/ci.yml, insert:between the
name: CIline and theon:block (lines 1–3 in the snippet). All existing steps remain unchanged.Suggested fixes powered by Copilot Autofix. Review carefully before merging.