-
Notifications
You must be signed in to change notification settings - Fork 34
Enforce read-only permissions by default with dangerous-permissions-write feature flag #9218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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>
|
|
||
| ### 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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot remove version mention
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed version mention in c5fd39e
|
@copilot merge main |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot merge main |
…er-for-permissions
|
@copilot format , lint go |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot merge main, recompile |
…er-for-permissions
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.