Skip to content

Add explicit workflow permissions and pin Alpine package versions in Dockerfiles#110

Merged
ehsanking merged 1 commit into
mainfrom
ehsan/pin-package-versions-in-apk-add-7gzo92
Apr 6, 2026
Merged

Add explicit workflow permissions and pin Alpine package versions in Dockerfiles#110
ehsanking merged 1 commit into
mainfrom
ehsan/pin-package-versions-in-apk-add-7gzo92

Conversation

@ehsanking
Copy link
Copy Markdown
Owner

Motivation

  • Introduce explicit minimal permissions for GitHub Actions workflows to follow least-privilege practice and allow workflows to read repository contents.
  • Improve reproducibility and runtime stability of container builds by pinning Alpine package versions in Dockerfile and Dockerfile.prod.
  • Ensure the Defender workflow has the required job-level permissions for uploading results and reporting security events.

Description

  • Added top-level permissions: contents: read to codeql.yml, defender-for-devops.yml, docker-image.yml, and npm-publish-github-packages.yml, and added job-level permissions (contents: read, security-events: write, actions: read) to the MSDO job in defender-for-devops.yml.
  • Updated Dockerfile and Dockerfile.prod to pin Alpine packages using globs (e.g. openssl=3.*, libc6-compat=1.*) and added pinned wget and su-exec where required, converting apk add invocations to a multi-line form.
  • Retained existing CodeQL job-level permissions and ensured security-events: write and packages: read remain present where needed.

Testing

  • No automated tests were executed as part of this change.

Codex Task

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@ehsanking ehsanking merged commit 30a98e4 into main Apr 6, 2026
5 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant