Skip to content

Potential fix for code scanning alert no. 1: Workflow does not contain permissions - #29

Merged
sreenathnair merged 1 commit into
mainfrom
alert-autofix-1
Jun 11, 2026
Merged

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

Conversation

@sreenathnair

Copy link
Copy Markdown
Member

Potential fix for https://github.com/PDBeurope/AFDB-Integration-Kit/security/code-scanning/1

Add an explicit top-level permissions block in .github/workflows/docker.yml so all jobs inherit least-privilege defaults.
For this workflow, contents: read is sufficient for actions/checkout and general repo read operations; no explicit write permission is needed for Docker Hub publishing because that uses DOCKER_USERNAME/DOCKER_PASSWORD secrets, not GitHub package/token writes.

Best single fix without changing behavior:

  • Edit .github/workflows/docker.yml
  • Insert directly after the on: triggers (before jobs:):
    • permissions:
    • contents: read

No imports, methods, or external dependencies are required.

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

…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@sreenathnair
sreenathnair marked this pull request as ready for review June 11, 2026 10:04
@sreenathnair
sreenathnair merged commit 0fe15a9 into main Jun 11, 2026
9 checks passed
@sreenathnair
sreenathnair deleted the alert-autofix-1 branch June 11, 2026 10:05
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