Skip to content

ci: pass auto-approve secrets explicitly (drop inherit)#13

Merged
Aswinmcw merged 1 commit into
mainfrom
ci/explicit-secrets
Jul 5, 2026
Merged

ci: pass auto-approve secrets explicitly (drop inherit)#13
Aswinmcw merged 1 commit into
mainfrom
ci/explicit-secrets

Conversation

@Aswinmcw

@Aswinmcw Aswinmcw commented Jul 5, 2026

Copy link
Copy Markdown
Member

Hardening from Copilot's review: secrets: inherit forwards all org secrets (Cloudflare, Resend, PROJECTS_TOKEN, ORG_READ_TOKEN, ...) into the auto-approve run. This passes only the 3 the reusable workflow declares — APP_ID, APP_PRIVATE_KEY, WRITE_ACCESS_PAT.

I dismissed this in the prior PR with an incorrect claim that inherit 'only forwards needed secrets' — it doesn't. This is the fix.

secrets: inherit forwards EVERY org secret (Cloudflare, Resend, PATs, ...) into
the reusable workflow's run context — far broader than the 3 it needs. Pass only
APP_ID, APP_PRIVATE_KEY, WRITE_ACCESS_PAT. Addresses Copilot review feedback.
Copilot AI review requested due to automatic review settings July 5, 2026 08:27
@Aswinmcw
Aswinmcw requested review from a team as code owners July 5, 2026 08:27

@Aswincloud-Bot Aswincloud-Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Auto-approved: @Aswinmcw is a member of @Aswincloud/admins.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 5, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

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

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
blog 8b81f81 Commit Preview URL

Branch Preview URL
Jul 05 2026, 08:28 AM

Copilot AI left a comment

Copy link
Copy Markdown

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 hardens the auto-approve GitHub Actions workflow by avoiding secrets: inherit when calling an org-level reusable workflow, ensuring only explicitly required secrets are forwarded into the job.

Changes:

  • Replaces secrets: inherit with an explicit allowlist of three secrets (APP_ID, APP_PRIVATE_KEY, WRITE_ACCESS_PAT).
  • Adds inline documentation explaining why secret inheritance is avoided (principle of least privilege).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Aswinmcw
Aswinmcw added this pull request to the merge queue Jul 5, 2026
Merged via the queue into main with commit 6ae35fb Jul 5, 2026
5 checks passed
@Aswinmcw
Aswinmcw deleted the ci/explicit-secrets branch July 5, 2026 08:32
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