mitodl / mitodl/ol-analytics-api

zizmor: remaining lower-severity GitHub Actions findings

Open Beginner friendly
#25 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
0
Forks
0
Avg merge
5d 12h
Merged PRs (30d)
18

Description

Background

PR #24 added a zizmor security-scanning workflow (.github/workflows/actions-static-analysis.yml) that lints .github/workflows/** on every push/PR touching workflow files. The check is gated to min-severity: high / min-confidence: medium so it only fails CI on the most severe findings.

Running zizmor without any severity filter against the current workflows surfaces one additional, lower-severity finding that predates PR #24 and is not enforced by the new CI check:

GH_TOKEN=$(gh auth token) uvx zizmor --no-progress .github/workflows/

Findings

excessive-permissions (medium confidence) — .github/workflows/ci.yml:20

The test job has no permissions: block, so it runs with the default (broad) GITHUB_TOKEN permissions rather than an explicit least-privilege set.

warning[excessive-permissions]: overly broad permissions
  --> .github/workflows/ci.yml:20:3
   |
20 | /   test:
21 | |     runs-on: ubuntu-latest
22 | |     steps:
...  |
34 | |       - run: uv run pytest --cov=ol_analytics_api --cov-report=term-missing
   | |____________________________________________________________________________this job
   |                                                                              default permissions used due to no permissions: block
   |
   = help: audit documentation → https://docs.zizmor.sh/audits/#excessive-permissions

Fix: add an explicit permissions: block to the test job (or workflow-level) scoped to what the job actually needs (likely just contents: read).

Notes

  • This is a pre-existing condition in ci.yml, newly surfaced by the zizmor scanner added in PR #24 — not a regression introduced by that PR.
  • It's intentionally out of scope for PR #24's CI check, which only gates on high-severity/medium-confidence-or-above findings.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open .github/workflows/ci.yml and inspect the test job around line 20, then run GH_TOKEN=$(gh auth token) uvx zizmor --no-progress .github/workflows/ to confirm the finding. Add an explicit least-privilege permissions block, likely contents: read as described, and verify zizmor no longer reports excessive-permissions for this job.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
ci-cd, security
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
85/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.