Skip to content

#64893 Don't attempt to upload a SARIF to GitHub Code Security on private repos#12695

Open
johnbillion wants to merge 1 commit into
WordPress:trunkfrom
johnbillion:64893-codeql-private-repos
Open

#64893 Don't attempt to upload a SARIF to GitHub Code Security on private repos#12695
johnbillion wants to merge 1 commit into
WordPress:trunkfrom
johnbillion:64893-codeql-private-repos

Conversation

@johnbillion

Copy link
Copy Markdown
Member

GitHub Code Security is not enabled on any of the private mirrors. This change prevents this workflow from attempting and failing to upload a SARIF to GitHub Code Security on private repos.

Trac ticket: https://core.trac.wordpress.org/ticket/64893

Use of AI Tools

AI assistance: None

@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props johnbillion.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

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 updates the reusable GitHub Actions workflow linter to avoid attempting (and failing) SARIF uploads to GitHub Code Security on private repository mirrors, where Code Security is not enabled.

Changes:

  • Adds a conditional guard intended to prevent SARIF upload behavior on private repositories.

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

Comment thread .github/workflows/reusable-workflow-lint.yml

@lancewillett lancewillett left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No blockers.

Avoiding this error looks fine. We don't need separate coverage on a private mirror.

(I disagree with Copilot, though. Gating only the upload wouldn't help: with --format=sarif zizmor writes to a file and exits 0 even when it has findings, so this mirror would see nothing either way.)

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.

4 participants