Skip to content

Confirm statuses:write is the correct minimum permission for super-linter (not checks:write)#540

Merged
nietras merged 2 commits into
mainfrom
copilot/update-super-linter-permissions
May 3, 2026
Merged

Confirm statuses:write is the correct minimum permission for super-linter (not checks:write)#540
nietras merged 2 commits into
mainfrom
copilot/update-super-linter-permissions

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 3, 2026

The question was whether statuses: write could be replaced with checks: write as the minimum job permission for Super-Linter.

Inspecting the v8.6.0 source directly: lib/linter.sh constructs GITHUB_STATUS_URL as /repos/{owner}/{repo}/statuses/{sha} and lib/functions/output.sh posts to it via CreateGitHubCommitStatus. This is the Commit Statuses API — Super-Linter never touches the Checks API.

  • statuses: write — required; keeps the existing permission unchanged
  • checks: write — would be insufficient; Super-Linter doesn't use the Checks API

Updated the comment on statuses: write to document this so future readers don't repeat the investigation:

permissions:
  contents: read
  packages: read
  # Required: super-linter uses the GitHub Commit Statuses API
  # (/repos/{owner}/{repo}/statuses/{sha}), not the Checks API,
  # so statuses:write is the correct minimum permission (not checks:write)
  statuses: write
Original prompt

Update the workflow .github/workflows/super-linter.yml in repository nietras/Sep to use the minimum required GitHub Actions job permissions for Super-Linter. Investigate what permissions the currently pinned Super-Linter action version requires to report results. If checks: write is sufficient, replace statuses: write with checks: write. If both are required, keep the minimum correct set and explain why in the PR description. Preserve existing workflow structure and formatting as much as possible. Create a pull request with the change.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: Suggest improvements to this code.

Assistant: This snippet is mostly good, but there is one likely permission smell:

Code smell / risk

  • Possibly over-broad job permission: statuses: write is only needed if the action actually writes commit status checks through the Statuses API. Many modern GitHub Actions use the Checks API instead, which would require checks: write rather than statuses: write.
  • In other words, this may be more privilege than necessary or even the wrong privilege, depending on how super-linter reports results.

Improvement options

Option 1: Keep only the minimum permission actually required

If super-linter truly needs commit status updates, keep it as-is, but consider documenting why at the permission itself:

permissions:
  contents: read
  packages: read
  # Required by super-linter to publish commit status results
  statuses: write

This is a small improvement, but it makes the security intent clearer.

Option 2: Prefer checks: write if the action uses check runs

If the linter publishes GitHub check runs rather than classic commit statuses, switch to:

permissions:
  contents: read
  packages: read
  checks: write

This is better aligned with current GitHub Actions patterns and least-privilege practice.

Option 3: Support both, then trim after verification

If you're unsure which API super-linter uses in this repo/version, temporarily allow both, verify behavior, then remove the unused one:

permissions:
  contents: read
  packages: read
  checks: write
  statuses: write

After confirming which permission is actually needed, remove the other one.

Recommended final version

If you want the safest improvement path without breaking reporting, I’d suggest verifying the action behavior and then using the narrowest correct permission. For example, if check runs are what’s needed:

jobs:
  build:
    name: super-linter
    runs-on: ubuntu-latest

    permissions:
      contents: read
      packages: read
      checks: write

    steps:
      - name: Harden Runner
        uses: step-security/harden-runner@a5ad31d6a139d249332a2605b85202e8c0b78450 # v2.19.1
        with:
          egress-policy: audit

      - name: Checkout code
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          fetch-depth: 0

      - name: Super-linter
        uses: super-linter/super-linter@9e863354e3ff62e0727d37183162c4a88873df41 # v8.6.0
        env:
          VALIDATE_GITHUB_ACTIONS: false
          VALIDATE_GITHUB_ACTIONS_ZIZMOR: false
          VALIDATE_BIOME_FORMAT: false
          VALIDATE_BIOME_LINT: false
          VALIDATE_EDITORCONFIG: false
          VALIDATE_CSHARP: false
          VALIDATE_DOTNET_SLN_FORMAT_ANALYZERS: false
          VALIDATE_DOTNET_SLN_FORMAT_STYLE: false
          VALIDATE_DOTNET_SLN_FORMAT_WHITESPACE: false
          VALIDATE_MARKDOWN_PRETTIER: false
          VALIDATE_GIT_COMMITLINT: false
          VALIDATE_JSCPD: false
          FILTER_REGEX_EXCLUDE: "./benchmarks/.*"
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

YAML / GitHub Actions best-practice note

For GitHub Actions workflows specifically, the main best practice here is least privilege. Since you already set permissions: read-all at the workflow level, overriding at the job level is good practice. The only thing to improve is making sure the write scope is exactly the one the action needs.

If you want, I can also suggest improvements for the rest of this workflow, not just the statuses: write line.

User: check what super linter needs and change to checks if that is enough in new pr

Assistant: I’ve started the PR creation flow and we’re currently waiting for your response to the confirmation dialog before I can continue.

This pull request was created from Copilot chat.

Copilot AI changed the title [WIP] Update Super-Linter job permissions to minimum required Confirm statuses:write is the correct minimum permission for super-linter (not checks:write) May 3, 2026
Copilot finished work on behalf of nietras May 3, 2026 14:17
Copilot AI requested a review from nietras May 3, 2026 14:17
@nietras nietras marked this pull request as ready for review May 3, 2026 14:24
@codecov
Copy link
Copy Markdown

codecov Bot commented May 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.64%. Comparing base (301dc9d) to head (6cfc72b).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #540      +/-   ##
==========================================
+ Coverage   99.58%   99.64%   +0.06%     
==========================================
  Files          57       57              
  Lines        4815     4815              
  Branches      540      540              
==========================================
+ Hits         4795     4798       +3     
  Misses         14       14              
+ Partials        6        3       -3     
Flag Coverage Δ
Debug 99.37% <ø> (+0.10%) ⬆️
Release 99.61% <ø> (ø)
macos-latest 93.93% <ø> (ø)
ubuntu-24.04-arm 93.93% <ø> (ø)
ubuntu-latest 92.75% <ø> (+0.10%) ⬆️
windows-11-arm 93.93% <ø> (ø)
windows-latest 92.64% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nietras nietras merged commit f864e31 into main May 3, 2026
39 checks passed
@nietras nietras deleted the copilot/update-super-linter-permissions branch May 3, 2026 14:35
github-actions Bot pushed a commit to Stella-sea/ryujinx-admin that referenced this pull request May 15, 2026
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [Sep](https://github.com/nietras/Sep) | `0.13.0` → `0.14.1` | ![age](https://developer.mend.io/api/mc/badges/age/nuget/Sep/0.14.1?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/nuget/Sep/0.13.0/0.14.1?slim=true) |

---

### Release Notes

<details>
<summary>nietras/Sep (Sep)</summary>

### [`v0.14.1`](https://github.com/nietras/Sep/releases/tag/v0.14.1): 0.14.1

#### What's Changed

- Improve SepReaderOptions.Unescape/.Trim comments by [@&#8203;nietras](https://github.com/nietras) in [#&#8203;542](nietras/Sep#542)
- Improve SepReader/WriterExtensions.Strict() comments by [@&#8203;nietras](https://github.com/nietras) in [#&#8203;543](nietras/Sep#543)

**Full Changelog**: <nietras/Sep@v0.14.0...v0.14.1>

### [`v0.14.0`](https://github.com/nietras/Sep/releases/tag/v0.14.0): 0.14.0

#### What's Changed

- Add `leaveOpen` overloads for SepReaderOptions.From\* via SepTextReaderDisposers by [@&#8203;Copilot](https://github.com/Copilot) in [#&#8203;530](nietras/Sep#530)
- Bump MSTest from 4.2.1 to 4.2.2 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;533](nietras/Sep#533)
- Bump github/codeql-action from 4.35.2 to 4.35.3 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;532](nietras/Sep#532)
- Bump step-security/harden-runner from 2.19.0 to 2.19.1 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;531](nietras/Sep#531)
- Confirm statuses:write is the correct minimum permission for super-linter (not checks:write) by [@&#8203;Copilot](https://github.com/Copilot) in [#&#8203;540](nietras/Sep#540)

**Full Changelog**: <nietras/Sep@v0.13.0...v0.14.0>

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xNzguMCIsInVwZGF0ZWRJblZlciI6IjQzLjE3OC4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->

Reviewed-on: https://git.ryujinx.app/projects/Ryubing/pulls/98
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