intel / intel/compute-runtime

[GSD-12974] Backport workflow-hardening fix (excessive-permissions) to 3 release branches

Open Beginner friendly
#943 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
1.4k
Forks
300
PR merge metrics
No merged PRs in 30d

Description

### Summary
The default branch already hardened `.github/workflows/verify.yml` against the issue(s) below, but **3** release branches still carry it. This proposes the same, minimal, scanner-verified fix for each.

### What's flagged (by [zizmor](https://github.com/woodruffw/zizmor))
- `excessive-permissions` — workflow/job granted broader `permissions` than needed

Already resolved on the default branch in:
- https://github.com/intel/compute-runtime/commit/56dfc3f702c6fdc63b241236b44ae7f342b32c80

### Affected release branches (3)
- **`releases/23.52`** (still present as of HEAD `0765430e`)
- **`releases/23.48`** (still present as of HEAD `e1c063bb`)
- **`releases/23.43`** (still present as of HEAD `2df851e6`)

### Suggested per-branch patches
Each diff below was checked locally with **zizmor** and **actionlint**: the flagged finding(s) are cleared on the affected construct and no new lint or security findings are introduced. (Whitespace is normalized; only security-relevant lines change.)

releases/23.52 — excessive-permissions

File `.github/workflows/verify.yml`; suggested edits:
- + permissions.contents = 'read'

```diff
--- a/.github/workflows/verify.yml
+++ b/.github/workflows/verify.yml
@@ -19,3 +19,5 @@
uses: ./neo/.github/actions/neo-lint
with:
path: neo
+permissions:
+ contents: read
```

releases/23.48 — excessive-permissions

File `.github/workflows/verify.yml`; suggested edits:
- + permissions.contents = 'read'

```diff
--- a/.github/workflows/verify.yml
+++ b/.github/workflows/verify.yml
@@ -19,3 +19,5 @@
uses: ./neo/.github/actions/neo-lint
with:
path: neo
+permissions:
+ contents: read
```

releases/23.43 — excessive-permissions

File `.github/workflows/verify.yml`; suggested edits:
- + permissions.contents = 'read'

```diff
--- a/.github/workflows/verify.yml
+++ b/.github/workflows/verify.yml
@@ -19,3 +19,5 @@
uses: ./neo/.github/actions/neo-lint
with:
path: neo
+permissions:
+ contents: read
```

---
*Happy to open pull requests instead if that's preferred.*

Contributor guide

Open the contributing guide

Research direction

Inspect .github/workflows/verify.yml on releases/23.52, releases/23.48, and releases/23.43, comparing each with the default-branch fix at commit 56dfc3f702c6fdc63b241236b44ae7f342b32c80. Add the specified contents: read permission on each branch, then run zizmor and actionlint to confirm the excessive-permissions finding is cleared without new findings.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
ci-cd, security
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.