Skip to content

github/workflows: Improve workflow security#180

Merged
illume merged 2 commits into
Azure:mainfrom
skoeva:workflows
Jan 27, 2026
Merged

github/workflows: Improve workflow security#180
illume merged 2 commits into
Azure:mainfrom
skoeva:workflows

Conversation

@skoeva
Copy link
Copy Markdown
Collaborator

@skoeva skoeva commented Jan 26, 2026

These changes update the GitHub Actions workflows by removing duplicate permissions and setting top-level permissions where they aren't defined, improving security.

@skoeva skoeva self-assigned this Jan 26, 2026
Copilot AI review requested due to automatic review settings January 26, 2026 15:12
@skoeva skoeva added github_actions Pull requests that update GitHub Actions code workflow labels Jan 26, 2026
Copy link
Copy Markdown
Contributor

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 aims to improve GitHub Actions workflow security by consolidating permissions and removing duplicates. It adds top-level permissions to two workflows that previously lacked them and attempts to deduplicate permissions in the CodeQL workflow.

Changes:

  • Added top-level permissions: contents: read to update-headlamp-submodule.yml and scorecard-analysis.yml
  • Removed duplicate permissions from top-level and job-level in codeql-analysis.yml

Reviewed changes

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

File Description
.github/workflows/update-headlamp-submodule.yml Adds top-level read-only content permission while job retains write permission override
.github/workflows/scorecard-analysis.yml Adds top-level read-only content permission while job retains security-events and id-token write permissions
.github/workflows/codeql-analysis.yml Attempts to remove duplicate permissions but incorrectly removes contents: read from job-level, breaking checkout functionality

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

Comment thread .github/workflows/codeql-analysis.yml
Copy link
Copy Markdown
Collaborator

@illume illume left a comment

Choose a reason for hiding this comment

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

Please add the contents read in the jobs permissions as copilot requests.

@illume illume marked this pull request as draft January 26, 2026 18:09
Signed-off-by: Evangelos Skopelitis <eskopelitis@microsoft.com>
Signed-off-by: Evangelos Skopelitis <eskopelitis@microsoft.com>
@skoeva skoeva marked this pull request as ready for review January 26, 2026 18:55
Copilot AI review requested due to automatic review settings January 26, 2026 18:55
Copy link
Copy Markdown
Contributor

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.


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

@skoeva skoeva requested a review from illume January 26, 2026 18:59
Copy link
Copy Markdown
Collaborator

@illume illume left a comment

Choose a reason for hiding this comment

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

🎉 thanks!

Copy link
Copy Markdown
Collaborator

@vyncent-t vyncent-t left a comment

Choose a reason for hiding this comment

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

LGTM

@illume illume merged commit 401868b into Azure:main Jan 27, 2026
13 checks passed
@skoeva skoeva deleted the workflows branch February 9, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code security workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants