Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 7, 2026

The compiler was suggesting users enable the dangerous-permissions-write feature flag when write permissions were detected, undermining the security-first design.

Changes

Error message simplification

  • Removed "Option 2" suggesting the dangerous feature flag
  • Changed from conditional "Write permissions are not allowed unless..." to unconditional "Write permissions are not allowed."
  • Retained only the safe fix: convert write to read permissions

Documentation updates

  • Removed two-option approach from permissions reference
  • Eliminated feature flag enablement guidance
  • Focused migration path on automated codemod and safe outputs

Test updates

  • Modified validation tests to assert dangerous flag is NOT mentioned
  • Added explicit dangerous-permissions-write: true to 15+ test workflows that genuinely require write permissions for their test scenarios

Before

Write permissions are not allowed unless the 'dangerous-permissions-write' feature flag is enabled.

Found write permissions:
  - contents: write

To fix this issue, you have two options:

Option 1: Change write permissions to read:
permissions:
  contents: read

Option 2: Enable the feature flag (use with caution):
features:
  dangerous-permissions-write: true

After

Write permissions are not allowed.

Found write permissions:
  - contents: write

To fix this issue, change write permissions to read:
permissions:
  contents: read
Original prompt

The compiler should never suggest to use the dangerous-permissions-write feature flag when a user tries to use a write permission


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

… messages

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI and others added 2 commits January 7, 2026 20:56
…ws with write permissions

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] Fix compiler suggestion for dangerous permissions Remove dangerous-permissions-write feature flag suggestion from compiler errors Jan 7, 2026
Copilot AI requested a review from pelikhan January 7, 2026 21:15
@pelikhan pelikhan marked this pull request as ready for review January 7, 2026 21:35
@pelikhan pelikhan merged commit 6b1c9a7 into main Jan 7, 2026
48 checks passed
@pelikhan pelikhan deleted the copilot/fix-dangerous-permissions-write-suggestion branch January 7, 2026 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants