Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update compiler to treat write permissions as errors
Enforce read-only permissions by default with dangerous-permissions-write feature flag
Jan 7, 2026
pelikhan
reviewed
Jan 7, 2026
|
|
||
| ### Write Permission Policy | ||
|
|
||
| Starting with version 0.4.0, write permissions are blocked by default to enforce the security-first design. Workflows with write permissions will fail compilation with an error: |
Contributor
|
@copilot merge main |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
pelikhan
approved these changes
Jan 7, 2026
Contributor
|
@copilot merge main |
…er-for-permissions
Contributor
Author
pelikhan
approved these changes
Jan 7, 2026
Contributor
|
@copilot format , lint go |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Contributor
|
@copilot merge main, recompile |
…er-for-permissions
Contributor
Author
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.
Implementation: Dangerous Permissions Write Feature
This PR implements a new security feature that treats write permissions as a compilation error unless explicitly allowed via the
dangerous-permissions-writefeature flag.Changes
Feature Flag (
pkg/constants/constants.go)DangerousPermissionsWriteFeatureFlagconstantValidation (
pkg/workflow/dangerous_permissions_validation.go)validateDangerousPermissions()functionCompiler Integration (
pkg/workflow/compiler.go)Codemod Tool (
pkg/cli/fix_codemods.go)write-permissions-to-read-migrationcodemodgh aw fix --writeDocumentation (
docs/src/content/docs/reference/permissions.md)Test Updates
Merge from main
make recompilesuccessfullyFormatting
make fmtto fix Go formatting issuesmake lint- all checks passTesting
✅ All validation tests pass
✅ Compilation correctly rejects write permissions without feature flag
✅ Compilation correctly allows write permissions with feature flag enabled
✅ Error messages are clear and actionable
✅ Codemod successfully converts all permission formats
✅ Documentation is complete and accurate
✅ Go formatting and linting pass
✅ All workflows recompiled successfully
Migration Path
For existing workflows with write permissions:
Option 1: Use the codemod (recommended)
Option 2: Add feature flag (use with caution)
Security Implications
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.