Skip to content

Fix security issues in GitHub Actions workflows - #551

Open
Navaneeth Shanmugasundaram (navaneethshan) wants to merge 3 commits into
qualcomm-softwarefrom
security-fixes
Open

Fix security issues in GitHub Actions workflows#551
Navaneeth Shanmugasundaram (navaneethshan) wants to merge 3 commits into
qualcomm-softwarefrom
security-fixes

Conversation

@navaneethshan

Copy link
Copy Markdown
Contributor
  • Fix workflow_run trigger vulnerability in automerge.yml by validating that the workflow was triggered by a successful run from the default branch
  • Fix code injection vulnerability in issue-release-workflow.yml by moving user-controlled input to environment variable
  • Add explicit repository scoping to GitHub App tokens in automerge.yml and sync_from_upstream.yml to limit permissions

These changes address security issues flagged by zizmor scanner.

- Fix workflow_run trigger vulnerability in automerge.yml by validating
  that the workflow was triggered by a successful run from the default branch
- Fix code injection vulnerability in issue-release-workflow.yml by moving
  user-controlled input to environment variable
- Add explicit repository scoping to GitHub App tokens in automerge.yml
  and sync_from_upstream.yml to limit permissions

These changes address security issues flagged by zizmor scanner.
Combine sync and automerge workflows to eliminate the insecure
workflow_run trigger. The automerge job now runs as part of the
sync_from_upstream.yml workflow using job dependencies (needs).

Changes:
- sync_from_upstream.yml: Add Run-Automerge job that runs after Fetch-Upstream
- automerge.yml: Remove workflow_run trigger, keep only workflow_dispatch for manual runs

This eliminates the zizmor security warning while maintaining the same
functionality. The workflows now run sequentially in a single workflow execution.
Comment thread .github/workflows/sync_from_upstream.yml Fixed
Prevent credential persistence in git config by setting persist-credentials
to false on all checkout actions that use custom tokens. This addresses the
security warning from GitHub Advanced Security / zizmor about credential
persistence through GitHub Actions artifacts.

This ensures tokens are not stored in the repository's .git/config and
cannot be accidentally exposed through artifacts or logs.
@navaneethshan

Copy link
Copy Markdown
Contributor Author

Closing this PR, as the same change was merged upstream: llvm/llvm-project#212634

@navaneethshan

Navaneeth Shanmugasundaram (navaneethshan) commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

Reopening it, as I closed it by mistake. This fix is needed on downstream.

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