Skip to content

ci: fix code scanning alerts (workflow permissions + test assertion)#16

Merged
vineethkrishnan merged 1 commit into
mainfrom
fix-code-scanning-alerts
Jun 1, 2026
Merged

ci: fix code scanning alerts (workflow permissions + test assertion)#16
vineethkrishnan merged 1 commit into
mainfrom
fix-code-scanning-alerts

Conversation

@vineethkrishnan
Copy link
Copy Markdown
Owner

Summary

Resolves the 3 pre-existing CodeQL alerts on main (none were introduced by the GUI PR).

Changes

  • .github/workflows/ci.yml - add a top-level permissions: contents: read block. The workflow only checks out and runs tests, so least privilege is correct. Clears both actions/missing-workflow-permissions alerts.
  • tests/test_dependencies.py - replace assert "ffmpeg.org" in hint with an exact comparison (hint.strip() == "Download: https://ffmpeg.org/download.html"). The substring form tripped py/incomplete-url-substring-sanitization (a real risk for URL validation, a false positive in a test assertion); the exact check is also stronger.

Testing

  • 136 tests pass; ruff clean.

…tion

Add a top-level `permissions: contents: read` block to the CI workflow so the GITHUB_TOKEN runs with least privilege instead of the broad default, resolving the two CodeQL actions/missing-workflow-permissions alerts.

Replace the `"ffmpeg.org" in hint` substring assertion in the unknown-OS hint test with an exact comparison. The substring form tripped CodeQL's py/incomplete-url-substring-sanitization rule (a real concern for URL validation, a false positive in a test); the exact check is also stronger.
@vineethkrishnan vineethkrishnan merged commit 20d84e2 into main Jun 1, 2026
19 checks passed
@vineethkrishnan vineethkrishnan deleted the fix-code-scanning-alerts branch June 1, 2026 16:32
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.

1 participant