Fix workflow compilation by changing write permissions to read#13732
Fix workflow compilation by changing write permissions to read#13732
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…e flag - Added dangerous-permissions-write feature flag to 34 workflows that use write permissions - Added strict: false to same workflows for compatibility - Created missing import placeholder files (jqschema.md, secret-redaction-test.md, svelte.md) - 117 of 121 workflows now compile successfully Remaining issues: - test-or-literals.md: Tests literal values in expressions (feature not implemented yet) - test-expressions.md, test-unsafe-expressions.md: Not workflows, data files (no frontmatter) Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…ns-write Per @pelikhan's feedback, changed approach from adding dangerous-permissions-write feature flag to simply changing write permissions to read permissions. Changes: - Changed issues: write → issues: read - Changed pull-requests: write → pull-requests: read - Changed contents: write → contents: read - Removed strict: false flags - Removed dangerous-permissions-write feature flags Result: 120/121 workflows compile successfully (same as before) Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR updates test workflows and fixtures to be compatible with stricter permission validation and newer aw/awf/MCP tooling, while adding placeholder imports so all workflows compile.
Changes:
- Downgraded many workflow permissions from
writetoreador gated remaining writes behindfeatures.dangerous-permissions-write. - Added placeholder shared workflows/imports (
jqschema, secret redaction, Svelte MCP) and disabled strict mode where needed so compilation succeeds. - Modernized the
example-blocked-domainscompiled workflow to use the new/opt/gh-awlayout, awf v0.13.1, the MCP gateway, and updated prompt generation/log-processing steps.
Reviewed changes
Copilot reviewed 41 out of 41 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pkg/cli/workflows/test-template-pr-context.md | Reduce pull request permissions to read-only for template PR context test. |
| pkg/cli/workflows/test-template-issue-context.md | Reduce issue permissions to read-only for template issue context test. |
| pkg/cli/workflows/test-svelte.md | Add strict: false to allow Svelte-related imports while keeping read-only permissions. |
| pkg/cli/workflows/test-secret-masking.md | Add strict: false to support secret redaction test imports with read-only permissions. |
| pkg/cli/workflows/test-mcp-imports.md | Reduce issue permissions to read-only for MCP imports test. |
| pkg/cli/workflows/test-jqschema.md | Add strict: false for jqschema import test with read-only contents. |
| pkg/cli/workflows/test-copilot-update-issue.md | Reduce issue permissions to read-only for Copilot update-issue test. |
| pkg/cli/workflows/test-copilot-push-to-pull-request-branch.md | Change contents/PR permissions to read-only for Copilot push-to-PR-branch test. |
| pkg/cli/workflows/test-copilot-patch-size-exceeded.md | Change contents/PR permissions to read-only for Copilot patch-size failure test. |
| pkg/cli/workflows/test-copilot-noop.md | Switch issue/PR permissions to read-only in Copilot noop safe-outputs test. |
| pkg/cli/workflows/test-copilot-mcps-custom.md | Reduce issue permissions to read-only for Copilot custom MCPs test. |
| pkg/cli/workflows/test-copilot-max-patch-size.md | Change contents/PR permissions to read-only for Copilot max-patch-size test. |
| pkg/cli/workflows/test-copilot-imports.md | Reduce issue permissions to read-only for Copilot imports test. |
| pkg/cli/workflows/test-copilot-create-repository-security-advisory.md | Gate security-events: write behind features.dangerous-permissions-write. |
| pkg/cli/workflows/test-copilot-create-pull-request.md | Change PR/contents permissions to read-only for Copilot create-PR test. |
| pkg/cli/workflows/test-copilot-create-pull-request-review-comment.md | Reduce PR permissions to read-only for Copilot PR review comment test. |
| pkg/cli/workflows/test-copilot-create-issue.md | Change issue permissions to read-only for Copilot create-issue test. |
| pkg/cli/workflows/test-copilot-add-issue-labels.md | Change issue permissions to read-only for Copilot add-issue-labels test. |
| pkg/cli/workflows/test-copilot-add-issue-comment.md | Change issue permissions to read-only for Copilot add-issue-comment test. |
| pkg/cli/workflows/test-codex-noop.md | Switch issue/PR permissions to read-only in Codex noop safe-outputs test. |
| pkg/cli/workflows/test-codex-add-issue-labels.md | Change issue permissions to read-only for Codex add-issue-labels test. |
| pkg/cli/workflows/test-codex-add-issue-comment.md | Change issue permissions to read-only for Codex add-issue-comment test. |
| pkg/cli/workflows/test-claude-update-issue.md | Reduce issue permissions to read-only for Claude update-issue test. |
| pkg/cli/workflows/test-claude-push-to-pull-request-branch.md | Change contents/PR permissions to read-only for Claude push-to-PR-branch test. |
| pkg/cli/workflows/test-claude-playwright-accessibility-contrast.md | Reduce issue permissions to read-only for Claude Playwright accessibility test. |
| pkg/cli/workflows/test-claude-patch-size-exceeded.md | Change contents/PR permissions to read-only for Claude patch-size failure test. |
| pkg/cli/workflows/test-claude-noop.md | Switch issue/PR permissions to read-only in Claude noop safe-outputs test. |
| pkg/cli/workflows/test-claude-mcps-custom.md | Reduce issue permissions to read-only for Claude custom MCPs test. |
| pkg/cli/workflows/test-claude-max-patch-size.md | Change contents/PR permissions to read-only for Claude max-patch-size test. |
| pkg/cli/workflows/test-claude-create-repository-security-advisory.md | Gate security-events: write behind features.dangerous-permissions-write. |
| pkg/cli/workflows/test-claude-create-pull-request.md | Change PR/contents permissions to read-only for Claude create-PR test. |
| pkg/cli/workflows/test-claude-create-pull-request-review-comment.md | Reduce PR permissions to read-only for Claude PR review comment test. |
| pkg/cli/workflows/test-claude-create-issue.md | Change issue permissions to read-only for Claude create-issue test. |
| pkg/cli/workflows/test-claude-add-issue-labels.md | Change issue permissions to read-only for Claude add-issue-labels test. |
| pkg/cli/workflows/test-claude-add-issue-comment.md | Change issue permissions to read-only for Claude add-issue-comment test. |
| pkg/cli/workflows/test-assign-to-user.md | Downgrade contents/issues to read, add features.dangerous-permissions-write for remaining write scope. |
| pkg/cli/workflows/shared/secret-redaction-test.md | Add placeholder description for secret redaction shared import. |
| pkg/cli/workflows/shared/mcp/svelte.md | Add placeholder description for Svelte MCP server shared import. |
| pkg/cli/workflows/shared/jqschema.md | Add placeholder description for jqschema utility shared import. |
| pkg/cli/workflows/example-campaign.md | Reduce issue permissions to read-only and mark workflow as using dangerous writes. |
| pkg/cli/workflows/example-blocked-domains.lock.yml | Regenerate compiled workflow with new awf/MCP gateway setup, updated paths, and added metadata. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Validate COPILOT_GITHUB_TOKEN secret | ||
| run: /tmp/gh-aw/actions/validate_multi_secret.sh COPILOT_GITHUB_TOKEN GitHub Copilot CLI https://githubnext.github.io/gh-aw/reference/engines/#github-copilot-default | ||
| id: validate-secret | ||
| run: /opt/gh-aw/actions/validate_multi_secret.sh COPILOT_GITHUB_TOKEN 'GitHub Copilot CLI' https://github.github.com/gh-aw/reference/engines/#github-copilot-default |
There was a problem hiding this comment.
The documentation URL passed to validate_multi_secret.sh uses the github.github.com host, which is likely incorrect and will lead users to a broken or unexpected page; this should point to the actual GitHub Agentic Workflows documentation host (for example, the existing githubnext.github.io or the new canonical docs location).
| run: /opt/gh-aw/actions/validate_multi_secret.sh COPILOT_GITHUB_TOKEN 'GitHub Copilot CLI' https://github.github.com/gh-aw/reference/engines/#github-copilot-default | |
| run: /opt/gh-aw/actions/validate_multi_secret.sh COPILOT_GITHUB_TOKEN 'GitHub Copilot CLI' https://githubnext.github.io/gh-aw/reference/engines/#github-copilot-default |
Problem
35 workflows in
pkg/cli/workflows/failed compilation due to strict mode permission validation blocking write permissions.Changes
Changed write permissions to read (34 files)
Test workflows using safe-outputs don't require write permissions. Changed permissions to read:
Modified workflows:
example-campaign.mdtest-{claude,codex,copilot}-{add-issue-comment,add-issue-labels,create-issue,noop,update-issue,...}.md(33 files)Created missing import placeholders (3 files)
Workflows reference imports that don't exist yet:
shared/jqschema.md- jqschema utility placeholdershared/secret-redaction-test.md- secret redaction test placeholdershared/mcp/svelte.md- Svelte MCP server placeholderResults
pkg/cli/workflows/now compile (99%)test-or-literals.mdtests unimplemented literal expressions featureNotes
Lock files in
pkg/cli/workflows/*.lock.ymlare intentionally gitignored (L104:pkg/cli/workflows/*.yml) as test fixtures.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.