Skip to content

fix(workflows): Resolve security vulnerabilities in GitHub Actions#3

Merged
EthanThePhoenix38 merged 2 commits intomasterfrom
copilot/sub-pr-2
Jan 9, 2026
Merged

fix(workflows): Resolve security vulnerabilities in GitHub Actions#3
EthanThePhoenix38 merged 2 commits intomasterfrom
copilot/sub-pr-2

Conversation

Copy link

Copilot AI commented Jan 9, 2026

Summary

Fixes critical security issues in three GitHub Actions workflows identified by automated review:

Security Fixes:

  • dependabot-auto-merge.yml: Changed pull_request_targetpull_request to prevent malicious forks from executing code with write permissions
  • sync-fork.yml: Abort on merge conflicts instead of auto-resolving with -X theirs (prevents silent overwrites of local changes); use --force-with-lease for tags (prevents accidental data loss)
  • security-dependency-scan-2x-daily.yml: Pin pnpm to 9.1.0 for reproducible builds

Before (vulnerable):

on:
  pull_request_target:  # ⚠️ Runs with write permissions even for fork PRs

After (secure):

on:
  pull_request:  # ✓ Runs in PR context without elevated permissions

Related Linear tickets, Github issues, and Community forum posts

Addresses automated security review feedback from Copilot PR reviewer.

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI self-assigned this Jan 9, 2026
Copilot AI mentioned this pull request Jan 9, 2026
4 tasks
Base automatically changed from claude/audit-docker-deployment-sxhWx to master January 9, 2026 01:35
- Change dependabot-auto-merge.yml from pull_request_target to pull_request for security
- Update sync-fork.yml to abort on merge conflicts instead of auto-resolving
- Change sync-fork.yml to use --force-with-lease for tags instead of --force
- Pin pnpm version to 9.1.0 in security-dependency-scan-2x-daily.yml

Co-authored-by: EthanThePhoenix38 <103653068+EthanThePhoenix38@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Docker deployment for audit process fix(workflows): Resolve security vulnerabilities in GitHub Actions Jan 9, 2026
@EthanThePhoenix38 EthanThePhoenix38 marked this pull request as ready for review January 9, 2026 04:11
Copilot AI review requested due to automatic review settings January 9, 2026 04:11
@coderabbitai
Copy link

coderabbitai bot commented Jan 9, 2026

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

@EthanThePhoenix38 EthanThePhoenix38 merged commit 587274e into master Jan 9, 2026
11 of 19 checks passed
@EthanThePhoenix38 EthanThePhoenix38 deleted the copilot/sub-pr-2 branch January 9, 2026 04:12
Copy link

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 addresses critical security vulnerabilities in three GitHub Actions workflows by fixing permission issues, improving merge conflict handling, and ensuring reproducible builds.

Key Changes:

  • Changed dependabot-auto-merge.yml trigger from pull_request_target to pull_request to prevent malicious forks from executing code with elevated permissions
  • Rewrote sync-fork.yml to abort on merge conflicts rather than auto-resolving them, preventing silent overwrites of local changes
  • Pinned pnpm to version 9.1.0 in security-dependency-scan-2x-daily.yml for reproducible builds

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/dependabot-auto-merge.yml Changed from pull_request_target to pull_request trigger to remove elevated permissions for fork PRs
.github/workflows/sync-fork.yml Complete rewrite to handle merge conflicts safely by aborting instead of auto-resolving, and uses --force-with-lease for safer pushes
.github/workflows/security-dependency-scan-2x-daily.yml Pinned pnpm version to 9.1.0 for build reproducibility

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

Comment on lines +6 to +7
- cron: '0 0 * * *' # Minuit UTC
- cron: '0 12 * * *' # Midi UTC
Copy link

Copilot AI Jan 9, 2026

Choose a reason for hiding this comment

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

The inline comments contain French words ("Minuit" and "Midi"). For consistency and accessibility in an English codebase, these should be in English ("Midnight UTC" and "Noon UTC").

Suggested change
- cron: '0 0 * * *' # Minuit UTC
- cron: '0 12 * * *' # Midi UTC
- cron: '0 0 * * *' # Midnight UTC
- cron: '0 12 * * *' # Noon UTC

Copilot uses AI. Check for mistakes.
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fbe770d83e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 15 to 17
on:
pull_request_target:
pull_request:
types: [opened, synchronize, reopened]

Choose a reason for hiding this comment

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

P2 Badge Restore write-capable trigger for Dependabot merges

Switching this workflow to on: pull_request means Dependabot-triggered runs execute with a read‑only GITHUB_TOKEN (GitHub restricts write perms for Dependabot PRs), so the later gh pr merge and gh pr review steps cannot write and the auto‑merge/approve behavior will fail for every Dependabot PR. If the security concern requires avoiding pull_request_target, you’ll need another write-capable mechanism (e.g., a separate workflow_run job) to preserve auto-merging.

Useful? React with 👍 / 👎.

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