Skip to content

Conversation

@cheeaun
Copy link
Owner

@cheeaun cheeaun commented Sep 30, 2025

Potential fix for https://github.com/cheeaun/phanpy/security/code-scanning/38

To address this issue, we need to add a permissions key to the workflow to restrict the default permissions granted to the GITHUB_TOKEN and thereby limit its access to repository resources. The best practice is to specify minimal required permissions at the top level of the workflow file (above the jobs: key), so it applies to all jobs unless locally overridden. Given the workflow only reads contents, a starting point of contents: read suffices. No existing functionality will be impacted—all steps will continue to work as before. Edit the .github/workflows/custom-build.yml file by inserting the following block:

permissions:
  contents: read

directly after the workflow name: definition (line 1), and before any other blocks (such as on:).


Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…in permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Sep 30, 2025

Deploying phanpy with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6dd45d7
Status: ✅  Deploy successful!
Preview URL: https://231a8e64.phanpy.pages.dev
Branch Preview URL: https://alert-autofix-38.phanpy.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
phanpy 6dd45d7 Sep 30 2025, 07:03 AM

@cheeaun cheeaun marked this pull request as ready for review September 30, 2025 07:10
@cheeaun cheeaun merged commit c0fb70c into main Sep 30, 2025
10 checks passed
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