Skip to content

Conversation

@kevinbackhouse
Copy link
Collaborator

Copilot AI review requested due to automatic review settings October 21, 2025 18:18
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the permissions configuration in the smoketest workflow to align with the recommended permissions for the branch-deploy action. It adds several necessary permissions for proper IssueOps functionality.

Key Changes:

  • Expanded permissions from 2 to 5 entries to support full branch-deploy capabilities
  • Added documentation comment explaining the purpose and source of the permission requirements

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

pull-requests: write # For adding a reaction to the comment
pull-requests: write # Required for commenting on PRs
deployments: write # Required for updating deployment statuses
contents: write # Required for reading/writing the lock file
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The comment states 'reading/writing' but the permission is 'write'. Consider clarifying that 'write' permission includes read access, or simplify to 'Required for writing the lock file' to match the permission level.

Suggested change
contents: write # Required for reading/writing the lock file
contents: write # Required for writing the lock file

Copilot uses AI. Check for mistakes.
@m-y-mo
Copy link
Contributor

m-y-mo commented Oct 22, 2025

Should we add a check so that only code owners can trigger this?

pull-requests: write # For adding a reaction to the comment
pull-requests: write # Required for commenting on PRs
deployments: write # Required for updating deployment statuses
contents: write # Required for reading/writing the lock file
Copy link
Contributor

@JarLob JarLob Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes me wonder if we really need the workflow. On one hand it is carefully reviewed IssueOps, on the other hand it is a potentially untrusted code running with high privileges...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or trigger it only on release or push instead of issue comment? The tests are running on the base code and not head anyway, so I don't see why it should be on issue comment. And if it runs on head then we definitely need to restrict it. It's not very clear to me when we want to run this workflow.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea is that the branch-deploy action makes this safe to trigger with an issue comment. It's the solution that we've been recommending to other open source maintainers.

I intended this to run on the code from the PR, not the base code. That was a mistake.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I didn't notice it checkouts the main instead of steps.branch-deploy.outputs.sha. @kevinbackhouse could you remind us what is the purpose of the workflow?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's for testing that the examples still work. It needs the COPILOT_TOKEN secret so a standard pull-request trigger doesn't work. I figure we could run it on-demand by adding a comment to a PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated it to use github.head_ref.

@kevinbackhouse
Copy link
Collaborator Author

@m-y-mo @JarLob : ok to merge?

@kevinbackhouse kevinbackhouse merged commit 82bcaf7 into GitHubSecurityLab:main Oct 23, 2025
2 checks passed
@kevinbackhouse kevinbackhouse deleted the smoketest branch October 23, 2025 14:45
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.

3 participants