Repository navigation
ci: harden cherry-pick action against template injection - #22828
Conversation
There was a problem hiding this comment.
Pull request overview
Hardens the composite cherry-pick GitHub Action against GitHub Actions template injection by ensuring event-derived/context values are not interpolated directly into run: script bodies (particularly important for workflows using pull_request_target).
Changes:
- Moved
github.*event/context interpolations used by shell logic intoenv:variables and referenced them as normal shell variables in the script. - Updated
gh apiinvocation to use the environment-provided repository/issue values rather than inline expressions. - Passed the “reason” output into the final step’s environment for safer/cleaner logging.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #22828 +/- ##
==========================================
+ Coverage 93.29% 93.31% +0.01%
==========================================
Files 1033 1033
Lines 60150 60150
Branches 400 400
==========================================
+ Hits 56117 56128 +11
+ Misses 4033 4022 -11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
|
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-3e15bde072987a64a5edadec30c66d2076c304ae
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)sAfterwards, run the upgrade commands from the latest release notes. Instructions for KubernetesAdd the following block to your authentik:
outposts:
container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
image:
repository: ghcr.io/goauthentik/dev-server
tag: gh-3e15bde072987a64a5edadec30c66d2076c304aeAfterwards, run the upgrade commands from the latest release notes. |
656acbb to
3e15bde
Compare
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
As the cherry-pick action uses the potentially dangerous
pull_request_target, move all interpolated fields to theenvsection, which prevents expanding directly inside therunscript where command injection can happen.There is currently no field that can be abused by a fork. The only potentially dangerous one is the label field, e.g. if someone is able to create custom labels, which requires repository permissions. But we should do it for all fields anyway as good practice.
Reference: https://docs.zizmor.sh/audits/#template-injection
Checklist
ak test authentik/)make lint-fix)If an API change has been made
make gen)If changes to the frontend have been made
make web)If applicable
make docs)