Skip to content

Potential fix for code scanning alert no. 15: Workflow does not contain permissions#281

Merged
CodyCBakerPhD merged 1 commit into
mainfrom
alert-autofix-15
Jun 16, 2026
Merged

Potential fix for code scanning alert no. 15: Workflow does not contain permissions#281
CodyCBakerPhD merged 1 commit into
mainfrom
alert-autofix-15

Conversation

@CodyCBakerPhD

Copy link
Copy Markdown
Collaborator

Potential fix for https://github.com/dandi/s3-log-extraction/security/code-scanning/15

Add an explicit permissions block to the workflow so GITHUB_TOKEN is restricted.
Best fix here: set workflow-level permissions right after on:/workflow_call and before env so all jobs inherit it unless overridden.

For this workflow, minimal required permission is:

  • contents: read

Edit file:

  • .github/workflows/testing.yml
  • Insert under the existing on.workflow_call.secrets section (after line 8 in the snippet), before env:.

No imports, methods, or dependencies are needed.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…in permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.75%. Comparing base (a7a9f46) to head (35fa13e).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #281      +/-   ##
==========================================
+ Coverage   73.96%   74.75%   +0.78%     
==========================================
  Files          40       40              
  Lines        1571     1620      +49     
==========================================
+ Hits         1162     1211      +49     
  Misses        409      409              
Flag Coverage Δ
unittests 74.75% <ø> (+0.78%) ⬆️

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

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

@CodyCBakerPhD
CodyCBakerPhD marked this pull request as ready for review June 16, 2026 19:47
@CodyCBakerPhD
CodyCBakerPhD merged commit 477d35d into main Jun 16, 2026
7 checks passed
@CodyCBakerPhD
CodyCBakerPhD deleted the alert-autofix-15 branch June 16, 2026 19:47
CodyCBakerPhD added a commit that referenced this pull request Jun 16, 2026
Mirrors the fix from PR #281 (testing.yml) across all remaining
workflow files. Docker image workflows also get packages: write
since they push to GHCR.

https://claude.ai/code/session_017m4JYyCuytuMjwKakTqyT3

Co-authored-by: Claude <noreply@anthropic.com>
@github-project-automation github-project-automation Bot moved this from Uncategorized to Done in My Work History Jun 17, 2026
@CodyCBakerPhD CodyCBakerPhD moved this to Uncategorized in My Work History Jun 17, 2026
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