Skip to content

Harden CI workflows#475

Closed
tamalsaha wants to merge 1 commit into
masterfrom
harden-ci-workflows
Closed

Harden CI workflows#475
tamalsaha wants to merge 1 commit into
masterfrom
harden-ci-workflows

Conversation

@tamalsaha
Copy link
Copy Markdown
Contributor

Summary

Apply the CI hardening pattern from appscode-cloud/installer#1252.

  • publish-oci.yml: add least-privilege job permissions (contents: write, packages: write); switch the env GITHUB_USER / GITHUB_TOKEN in Clone charts repository and Publish OCI charts from 1gtm / LGTM_GITHUB_TOKEN to github.actor / GITHUB_TOKEN.
  • release.yml: same env swap in Clone charts repository and Package. Job-level permissions: contents: write was already present.
  • update-local-repo.yml: env GITHUB_USER: 1gtm${{ github.actor }} in Update Local Helm repo (GITHUB_TOKEN was already the default).
  • The ghcr.io docker login still uses LGTM_GITHUB_TOKEN since publishing to the appscode-charts org requires cross-org write access.
  • release-tracker.yml already uses the LGTM App token (owner appscode-cloud, repositories CHANGELOG); not touched here.

Test plan

  • Next tag push triggers release + publish-oci and both succeed.
  • Next push to master triggers update-local-repo and the helm repo update PR is opened as ${{ github.actor }}.

Apply the appscode-cloud/installer#1252 hardening pattern: stop
using the LGTM_GITHUB_TOKEN PAT for env-based GITHUB_USER /
GITHUB_TOKEN pairs; use the default GITHUB_TOKEN with github.actor
and add least-privilege job-level permissions.

The ghcr.io docker login still uses LGTM_GITHUB_TOKEN since
publishing to the appscode-charts org requires cross-org write
access.

Signed-off-by: Tamal Saha <tamal@appscode.com>
@tamalsaha tamalsaha closed this May 19, 2026
@tamalsaha tamalsaha deleted the harden-ci-workflows branch May 19, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant