Repository navigation
Conversation
- Public repositories can now call the container image metadata action from this repository; before, only private and internal repositories could reach it. - The action keeps its inputs, outputs, tag rule, annotation keys and steps; only wording that named private systems changed. - The cloud platform team owns the action's directory in CODEOWNERS.
- The README now says the job needs a registry login and an OCI image index, and that Kargo reads only the index level when the warehouse sets no platform constraint. - It lists the events, checkout and runner the ordered tag needs, what still happens elsewhere, and which output reports publication.
|
@PostHog review |
|
@Z3r0Sum PostHog Review is reviewing this pull request. |
There was a problem hiding this comment.
PostHog Review · Standard · reviewed b8d8a9b: 1 Must fix, 3 Should fix.
See this review and its findings in PostHog Review. Comment @posthog review --deep for a Deep review. A Deep review takes longer and looks deeper than a Standard review.
- ASCII control characters in the commit subject, author and committer
become spaces, so a carriage return can no longer add or replace an
image annotation such as the revision.
- Every "{{" in those values is broken into "{ {", so template syntax
in a commit is no longer rewritten or able to fail the metadata step.
- A commit message larger than the pipe buffer no longer fails the step
with SIGPIPE; ordinary commits keep identical outputs.
- A comma directly followed by a double quote in the commit subject, author or committer gets a space between them, so the annotations parser no longer fails the build or merges annotation lines.
PR overviewThe PR adds a shared GitHub Action for container image metadata and updates code ownership for its directory. One issue has been addressed, but the ownership change still replaces security-team ownership of the new action. This could allow future changes to executable shared CI code without security-owner approval; the remaining concern is review coverage rather than a demonstrated exploit in the action itself. Open issues (1)
Fixed/addressed: 1 · PR risk: 3/10 Reviews |
|
✅ Security review complete — 5 findings posted as a review (changes requested), in 12 min. Add the |
| .github/workflows/ci-security.yaml @PostHog/team-security | ||
|
|
||
| # the cloud platform team maintains the container image metadata action | ||
| .github/actions/container-image-metadata/ @PostHog/team-cloud-platform |
There was a problem hiding this comment.
Medium: Security ownership is overridden
CODEOWNERS applies only the last matching pattern, so this replaces the broader team-security owner rather than adding maintenance ownership, allowing future changes to executable shared CI code without security-owner approval. Retain security ownership and request cloud-platform review separately; listing both teams here would still permit either team's approval.
| .github/actions/container-image-metadata/ @PostHog/team-cloud-platform | |
| .github/actions/container-image-metadata/ @PostHog/team-security |
There was a problem hiding this comment.
This is intended: the cloud platform team maintains this action, and giving it the directory is the decision this PR asks the security reviewers to make. CODEOWNERS itself stays security-owned. If the security reviewers want a security approval kept for this directory, I'll drop the line.
|
|
||
| - name: Compute ordered release tag | ||
| id: ordered-release | ||
| if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && inputs.publish-ordered-release-tag != 'true' && inputs.generate-ordered-release-tag == 'true' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) |
There was a problem hiding this comment.
Case-insensitive ref comparisons allow a non-default branch to publish ordered releases
Details
Latent: this becomes relevant when callers adopt the new action and enable ordered releases in branch-push jobs. GitHub Actions compares strings with == case-insensitively, but Git refs are case-sensitive. With default_branch=main, a push to refs/heads/Main passes this condition and the identical validation/publication gates at lines 298 and 367. Compute ordered release tag only checks that HEAD matches the triggering SHA (line 243), not that it belongs to the actual default branch. An offline comparison probe plus the exact generation and validation scripts successfully produced and accepted an ordered tag from a distinct Main branch; publication then reaches docker buildx imagetools create at line 460.
Impact — a collaborator allowed to push other branches but barred from protected main can publish default-branch-only release aliases from unmerged code if the caller relies on these gates and supplies its registry login to branch builds. Default-branch protection does not stop the attack because the attacker never writes that branch. This reaches callers at their first adoption/SHA bump; actual deployment consequences depend on their alias consumers.
Fix — pass the default branch through env: and enforce a case-sensitive shell comparison before both generation and publication, for example [ "$GITHUB_REF" = "refs/heads/$DEFAULT_BRANCH" ] || exit 0. Do not rely solely on expression-language equality for this authorization boundary.
Agent-driven security review. Caller registry/deployment policies are not supplied, and the GitHub expression semantics were modeled offline rather than executed by a live runner.
There was a problem hiding this comment.
Fixed in 296d247. The three step conditions are unchanged, and the generation and validation scripts now also compare GITHUB_REF with the default branch in the shell, exactly, and skip with a warning when it doesn't match. The default branch reaches them through env:. The validation step's existing skip=true output keeps the publication step from running, so I added no third check.
I ran the old and new scripts side by side: with refs/heads/Main or refs/heads/MAIN against a default of main, the old ones generated a tag and passed validation, and the new ones write an empty tag or skip=true and exit 0. With the exact ref the outputs are byte-identical.
One piece of context: someone who can push a branch also controls the workflow file on that branch, so what really keeps a branch build from publishing is the caller's publishing role and its own conditions. This check makes the action's own rule exact; it doesn't replace those.
| .github/workflows/ci-security.yaml @PostHog/team-security | ||
|
|
||
| # the cloud platform team maintains the container image metadata action | ||
| .github/actions/container-image-metadata/ @PostHog/team-cloud-platform |
There was a problem hiding this comment.
The new CODEOWNERS line removes @PostHog/team-security as a required reviewer for an org-wide action that runs inside service image-push jobs.
Details
In GitHub CODEOWNERS the last matching pattern wins. That makes .github/actions/container-image-metadata/ @PostHog/team-cloud-platform (line 10) the only owner of that directory and replaces .github/ @PostHog/team-security (line 3) for every file under it. Lines 1-2 of the same file say why .github/ is security-owned: these actions run across the org. This action runs in each caller's build-and-push job, and the README requires that job to be logged in to the target registry first. Every step of the action can therefore read the caller's registry push credential (the docker login config), any cloud credentials an earlier step exported to the job environment, and the caller's GITHUB_TOKEN.
The PR offers to "add the team to the line" if security wants to co-own the directory. That would not restore the requirement. When one line lists several owners, an approval from any one of them satisfies code-owner review, so @PostHog/team-cloud-platform @PostHog/team-security on one line can still be merged with only a cloud-platform approval.
Impact — A malicious insider, or anyone holding a cloud-platform member's account, can merge a change to action.yml without security review. For example, a new run: step could send the docker config or AWS_* variables off the runner. The change reaches each caller at its next SHA bump. The caller's PR shows only a 40-character SHA change, so nobody re-reviews the action content there. Callers that pin @main would get it at merge. These controls still hold: code-owner approval from a cloud-platform member is still required, CODEOWNERS itself stays security-owned, and the org Semgrep rules (github-actions-curl-shell, github-actions-shell-injection) catch some exfiltration patterns. This diff opens no direct path to loss, so this is graded as a defence-in-depth gap.
Fix — To keep a security approval mandatory, drop line 10 and let the existing .github/ rule cover this directory. Make cloud-platform a requested reviewer by convention or through a ruleset's path-scoped required reviewers. Do not add both teams to the same CODEOWNERS line, because one approval from either team would satisfy it.
Agent-driven security review. I cannot see from the repository whether branch protection or rulesets on main enforce "Require review from Code Owners", or how large @PostHog/team-cloud-platform is and whether it has write access. If that team lacks write access, GitHub treats the owner as unknown and the directory may end up with no effective code owner, which would be worse.
There was a problem hiding this comment.
This is intended. The cloud platform team maintains this action and should be able to change it without a security approval. Giving the directory to that team is the one decision this PR asks the security reviewers to make, and the description calls it out. CODEOWNERS itself stays security-owned, so changing this line later still needs security.
You're right that listing both teams on one line would not keep a security approval required, since either team's approval would satisfy it. I've corrected the description, which had offered that. If the security reviewers want the requirement kept, I'll drop the line.
| id: commit | ||
| shell: bash | ||
| env: | ||
| COMMIT_MESSAGE: ${{ github.event.head_commit.message }} |
There was a problem hiding this comment.
Exporting the entire commit message can prevent the metadata shell from starting
non-security-availability (confidence 5/5)
Details
Latent: when an Ubuntu caller adopts this action, Extract commit metadata exports the complete push-event message as COMMIT_MESSAGE before its first-line extraction and 160-character cap can run. Linux imposes a per-environment-string limit of roughly 128 KiB on ordinary 4 KiB-page runners. Removing printf | head fixes SIGPIPE only after the process has started; it does not address this earlier limit.
Impact — a pushed commit with message ordinary subject\n\n followed by 200,000 x characters is valid Git input but prevents the Bash process from launching with E2BIG: Argument list too long. I created that commit in a scratch repository and reproduced the failure while launching the exact extracted script with the action's environment layout; a 100 KB body succeeds. A repository pusher, or a normal merge retaining such a message, can therefore break image metadata/build jobs despite the tiny subject. No code execution or secret disclosure is demonstrated.
Fix — do not transport the entire message through an environment variable. Read it from GITHUB_EVENT_PATH inside the running process and extract/bound the subject there, retaining the Git fallback and existing sanitization.
There was a problem hiding this comment.
You're right, and I've corrected the description and my earlier reply. The message reaches the step through COMMIT_MESSAGE, so on a Linux runner a message above about 128 KiB stops the step before the script starts, as it did before this change. My 200,000-byte test passed because it ran on macOS. The pipeline fix covers messages between the pipe buffer (64 KiB) and that limit.
I'm not changing how the message is read in this PR. I have no case of a message that large, and reading it from the event file is a bigger change than this PR should carry.
| else | ||
| printf '%s\n' integrity-mismatch | ||
| fi | ||
| elif inspect_digest "$source" >/dev/null; then |
There was a problem hiding this comment.
Target read failures are reported as confirmed alias absence
non-security-reliability (confidence 5/5)
Details
Latent: once callers adopt ordered publication, classify_alias treats any two failures from inspect_digest(target) as evidence of absence whenever inspect_digest(source) succeeds. But inspect_digest returns nonzero for timeouts, authorization/transport failures, and malformed output as well as a missing manifest (lines 402–415). Being able to read the source digest does not establish that the tag lookup returned a not-found response. The resulting absent value is exposed as ordered-release-result, and line 473 explicitly claims that absence was confirmed.
Impact — make target inspections return timeout status 124, let the source-digest inspection succeed, and let publication fail: the exact script emits result=absent and “Registry read-back confirmed absence.” This was reproduced offline, including a malformed-target-response variant. Callers/operators cannot distinguish a genuinely missing alias from an unreadable one and can make the wrong retry or recovery decision. The operation remains time-bounded; this finding is diagnostic reliability, not demonstrated credential exposure.
Fix — preserve typed inspection failures and return absent only after a definite registry manifest-not-found response. Use unknown for timeouts, authentication failures, malformed responses and other indeterminate reads.
There was a problem hiding this comment.
Agreed, and not changed here. The next change to this action reworks the publication step: publication gets a second attempt that probes again before it writes, the registry client's error text and exit status are logged, and the classification changes with it. Nothing calls this copy before that lands.
| absent) | ||
| printf '::warning title=Ordered image alias absent::Registry read-back confirmed absence after publication client status %s\n' "$publication_status" >&2 | ||
| ;; | ||
| integrity-mismatch) |
There was a problem hiding this comment.
Ordered-release generation and integrity failures do not fail the action
Details
Latent: callers adopting the README's two-invocation release flow get a successful action even when its release checks fail. skip_ordered_release_tag writes an empty tag and exits zero at lines 200–203, causing publication to be skipped. More seriously, Publish and reconcile ordered release tag handles integrity-mismatch with only an error annotation, then writes its result and exits zero at line 486. Its continue-on-error: true at line 368 would also swallow a subsequently added nonzero exit. The README example does not enforce the result.
Impact — with a valid ordered tag whose existing alias resolves to digest B while the build returned digest A, the exact script returns result=integrity-mismatch and status 0, reproduced with a Docker test double. A conflicting or poisoned release alias remains while the documented release flow is green. A history-fetch failure similarly leaves a successful build without its release alias. The comparison, warnings and result output still provide detection; actual security loss additionally requires a downstream consumer to trust the bad alias.
Fix — make enabled ordered-release generation/publication fail closed, or add a strict mode enabled by default. Write the result first, exit nonzero on generation failure or unsuccessful reconciliation, and remove continue-on-error from the strict path.
There was a problem hiding this comment.
Agreed, and that is the next change to this action: a missing alias or a failed reconciliation will fail the publish step, and the README changes in the same PR. This PR keeps the publication behaviour the action's current callers have, so the move can be reviewed as a move. Nothing calls this copy before that lands.
- A ref that matches the default branch only when letter case is ignored, such as refs/heads/Main for main, no longer generates or publishes an ordered release alias; both phases skip with a warning.
|
✅ Security review complete — 5 findings posted as a review, in 12 min. Add the |
| .github/workflows/ci-security.yaml @PostHog/team-security | ||
|
|
||
| # the cloud platform team maintains the container image metadata action | ||
| .github/actions/container-image-metadata/ @PostHog/team-cloud-platform |
There was a problem hiding this comment.
The new CODEOWNERS rule removes @PostHog/team-security as code owner of an org-wide composite action that callers run after their registry login
supply chain (review control) (confidence 4/5)
Details
CODEOWNERS applies the last matching line. So .github/actions/container-image-metadata/ @PostHog/team-cloud-platform (.github/CODEOWNERS:10) replaces .github/ @PostHog/team-security (line 3) for every file in that directory. Security stops being a code owner of action.yml. This is the only path under .github/ that leaves security's ownership. The file's own header (lines 1-2) and AGENTS.md say this repo's actions are security-owned because the whole org runs them.
This action is built to run in each service's image build and publish job. Its README requires the job to be logged in to the registry. The second invocation runs docker buildx imagetools create with that session, and the caller's checkout-persisted GITHUB_TOKEN is also in reach. Its annotations (org.opencontainers.image.revision) are the key for Kargo's promotion gate.
Impact — Once this merges, cloud-platform approval alone can land a change to action.yml. So can anyone holding a cloud-platform member's session or token. Examples: a step that tags an arbitrary digest as the ordered release alias, or one that reads ~/.docker/config.json or AWS credentials from the env. The change reaches callers at their next SHA bump, and the bump PR in the caller repo shows only a new SHA. The PR text frames this as a decision for security. That framing is not a control.
Controls that still hold: callers pin by SHA (the README uses @<sha>), and CODEOWNERS itself stays security-owned. I can't see from the repo whether branch protection enforces code-owner review. If @PostHog/team-cloud-platform lacks write access, GitHub ignores that owner, and line 10 then leaves the directory with no code owner at all.
Fix — Drop line 10. Security stays the required owner, and cloud-platform can still be requested as reviewers. As the PR notes, listing both teams on one line lets either team approve alone, so that does not restore the control. If shared ownership is wanted, require a security approval for this path some other way, for example a ruleset with a path-scoped required reviewer.
Agent-driven security review. Whether the branch protection or ruleset on main requires code-owner review, and whether the cloud-platform team has write access, cannot be seen from the repository.
There was a problem hiding this comment.
Same finding as the earlier thread on this line, see my reply there: this is intended, and it is the decision this PR asks the security reviewers to make.
| id: commit | ||
| shell: bash | ||
| env: | ||
| COMMIT_MESSAGE: ${{ github.event.head_commit.message }} |
There was a problem hiding this comment.
The complete commit message can exceed Linux's environment-entry limit before truncation runs
non-security-availability (confidence 5/5)
Details
Latent: once a Linux caller adopts this action, Extract commit metadata places the complete head_commit.message in COMMIT_MESSAGE before starting Bash. Taking its first line at line 173 and truncating at lines 182–183 cannot protect process creation. Running the exact extracted step with COMMIT_MESSAGE="short subject\n" + "A" * 200000 reproduced E2BIG before the script started; a 100 KB body with the same short subject succeeded.
Impact — a committer can stop the metadata/build invocation through message text alone, even though the annotation subject would fit comfortably within 160 characters. This is a bounded CI reliability issue, not credential access or runner code execution.
Fix — read the message from GITHUB_EVENT_PATH inside the running step, extracting and bounding the subject there, or read it from Git. Do not pass the unbounded message through a step environment variable.
There was a problem hiding this comment.
Same finding as the earlier thread on this line, see my reply there: the description states the limit, and I'm leaving the step as it is.
| # attestations already produce one. | ||
| - name: Docker meta | ||
| id: meta | ||
| uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0 |
There was a problem hiding this comment.
docker/metadata-action is a new third-party action owner in this repo; it receives the caller's GITHUB_TOKEN and also runs in the post-login publication invocation, which never reads its outputs
Details
Latent: nothing calls this action yet. Callers that move to it in later PRs turn it on, and it then runs with their tokens.
action.yml:287 (Docker meta) is the first uses: docker/... anywhere in this repository. Every other remote uses: is actions/*, PostHog/* or an owner that is already listed. The repo guidance asks to flag a new owner and name what it can read. The step is pinned to a full SHA with a version comment, and that pin protects against a moved tag. What the step can read:
- metadata-action's
github-tokeninput defaults to${{ github.token }}, so it gets the caller job'sGITHUB_TOKENwith whatever permissions that job has. - It runs in the caller's job, after the caller's earlier steps. That gives it the token that
actions/checkoutstores in.git/config. Once the job is logged in, it also has the registry credential in~/.docker/config.json, and AWS credentials if the caller usedconfigure-aws-credentials. Docker metahas noif:, so it also runs in the second (publish-ordered-release-tag: "true") invocation. The README requires that invocation to come after the registry login and the build, yet nothing in it readssteps.meta.outputs.*. Only the publication result is used.- It parses commit text that an attacker controls, with its bundled CSV parser and Handlebars. That is why
sanitize()exists (lines 161-170).
Impact — If the pinned commit or the dependencies bundled with it mishandle that commit text, or if 030e881… is not a commit in docker/metadata-action's own history (one from the fork network resolves under the same name), third-party code runs with the caller's GITHUB_TOKEN and registry push session. That session decides what Kargo deploys. Two controls still hold: the full-SHA pin, and sanitize() on commit text, which I probed with CR, {{/{{{ and ," inputs and found clean.
Fix — Confirm that 030e881283bb7a6894de51c315a6bfe6a94e05cf is the v6.0.0 tag commit on docker/metadata-action. Then keep the step out of the post-login invocation:
- name: Docker meta
id: meta
if: inputs.publish-ordered-release-tag != 'true'Agent-driven security review. The harm depends on the pinned commit or its bundled dependencies misbehaving, which is not visible from the repo. The pin's provenance could not be checked offline.
There was a problem hiding this comment.
I checked the pin: 030e881283bb7a6894de51c315a6bfe6a94e05cf is the commit the v6.0.0 tag of docker/metadata-action points at, it is in that repository's master history, and its signature verifies (committed 2026-03-05).
I'm not adding the if: in this PR. The step also sets the tags, labels and annotations outputs of the publication call, so skipping it changes what that call returns. The next change to this action reworks the publication phase, and that is where I'll decide whether that call still needs the step.
| printf '%s\n' integrity-mismatch | ||
| fi | ||
| elif inspect_digest "$source" >/dev/null; then | ||
| printf '%s\n' absent |
There was a problem hiding this comment.
Failed tag lookups are reported as confirmed alias absence
non-security-reliability (confidence 5/5)
Details
Latent: when ordered publication runs, classify_alias returns absent whenever two target inspections fail but the source digest can be inspected. inspect_digest at lines 428–441 does not distinguish manifest-not-found from HTTP errors, timeouts, or malformed responses, so source readability cannot prove target absence. In an exact-script probe, an existing target returned HTTP 500 for tag lookups, its source digest remained readable, and creation returned HTTP 503; the script emitted result=absent and the warning claiming that read-back had confirmed absence.
Impact — an ordinary registry/tag-resolution failure produces the wrong documented reconciliation result and downgrades an indeterminate state to an absence warning, even while a conflicting alias exists. Callers and operators cannot distinguish that failure from a genuinely missing release alias.
Fix — return absent only for an explicit manifest-not-found response. Preserve enough error information to distinguish that response from transport/auth/server failures; otherwise report unknown.
There was a problem hiding this comment.
Same finding as the earlier thread on this step, see my reply there: agreed, and it changes with the next change to this action, which reworks the publication step.
| printf '::warning title=Ordered image alias absent::Registry read-back confirmed absence after publication client status %s\n' "$publication_status" >&2 | ||
| ;; | ||
| integrity-mismatch) | ||
| printf '%s\n' '::error title=Ordered image alias integrity mismatch::Registry read-back returned a different digest' >&2 |
There was a problem hiding this comment.
A confirmed ordered-alias digest mismatch still returns success
Details
Latent: when a caller enables ordered publication, Publish and reconcile ordered release tag detects an existing wrong digest at lines 471–475, but the integrity-mismatch branch only prints an error annotation. The final output write succeeds, and the step also has continue-on-error: true. An offline probe using the exact script, an expected sha256: digest of 64 a characters and an existing target digest of 64 b characters returned exit 0 with result=integrity-mismatch, leaving the conflicting alias untouched.
Impact — after someone with a leaked registry push credential plants a conflicting ordered tag, the legitimate default-branch build detects the substitution but still presents a successful publication step to subsequent release steps. The README's caller example does not gate on the result. Registry authorization and caller SHA pins still hold; this is a missing fail-closed CI layer, not an independent way to write the registry.
Fix — make integrity-mismatch fail the caller's job, either by removing continue-on-error and returning nonzero after writing the result, or by adding a separate mandatory result-checking step.
There was a problem hiding this comment.
Same family as the earlier thread on failures that do not fail the action, see my reply there: agreed, and the next change to this action makes a mismatch or a failed reconciliation fail the publish step.
Problem
sha-<gitsha>tag, an ordered release tag, and a fixed set of index-level OCI annotations. One composite action produces all of it and, in a second invocation, publishes the ordered alias and reads it back from the registry.Changes
Add
.github/actions/container-image-metadata/, the same composite action, so every repository can call one copy. Inputs, defaults, outputs, step ids, step order,if:,with:andshell:are identical to the action its callers pin today. Threerun:scripts change, as the next two bullets describe, and two steps gain oneenv:entry; the publication script is unchanged. The oneuses:keeps its existing pin,docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0.Harden
Extract commit metadata, after the review on this PR found problems the action already had. For a commit with none of these, the step's four outputs are byte for byte what the original produces.annotationswith a CSV parser that can take a bare carriage return as a record separator, so a crafted author name could add a line that replacedorg.opencontainers.image.revision.{{in those values is separated into{ {. The pinned action compiles every custom annotation as a Handlebars template, so a subject likefix {{sha}}was rewritten anduse {{ .Values.x }}failed the step.fix: a,"b, or a longer one cut inside,"key":"value"by the 160-character limit, failed the step.printf ... | head -n 1underpipefailfailed the step with exit 141 whenheadexited while a large message body was still being written.Require an exact default-branch ref for the ordered tag. The step conditions compare
github.refwith the default branch in an expression, and expressions ignore letter case, sorefs/heads/Mainpassed when the default branch ismain. The conditions are unchanged; the generation and validation scripts now also compareGITHUB_REFwith the default branch in the shell and skip with a warning when it isn't an exact match. The validation step's existingskip=truekeeps the publication step from running. For a ref that is exactly the default branch nothing changes.Apart from those scripts, four lines of wording differ from the source, all in descriptions or a comment:
registry.example.com/my-serviceAdd a README for callers in the action's directory, with one example for each of the two invocations. It states what the action itself enforces, so a caller doesn't have to read the YAML: the ordered tag is generated and published only on a
pushorworkflow_dispatchon the default branch, the job must be logged in to the registry and build an OCI image index, and theordered-release-resultoutput reports what publication found.Give the directory to
@PostHog/team-cloud-platforminCODEOWNERS, because that team maintains the action. The line sits after.github/because the last matching line wins. Everything else stays with@PostHog/team-security: the rest of.github/, includingCODEOWNERSitself (so a later change to this ownership still needs a security approval),workflows/, and every other action.Nothing calls this copy yet. Callers move to it one at a time in later PRs. Other behaviour changes (a failing last step when the alias is missing, an alert, and telling a failed read apart from an absent alias) come later as their own PRs.
What this looks like in a PR
A caller references the directory, before and after its own build step:
How to review this PR
action.ymlis long, but the review question is whether it is the same action apart from the hardened step. The table above, theExtract commit metadatascript, and the ref check at the top of the generation and validation scripts (with itsenv:entry) are the complete list of differences from the source.${{ }}expression in the action sits inenv:,with:or an outputvalue, never in arun:body, so this repository'sgithub-actions-shell-injectionrule has nothing to flag. The action references no container image and doesn't use curl.@PostHog/team-securityis no longer a required code owner for this one directory. If you'd rather keep a security approval required for this directory, say so and I'll drop the line: listing both teams on one line would let either team's approval satisfy it.CODEOWNERSline 7 namesci-security.yaml, but the file isci-security.yml. I left it alone here because it isn't part of this change.How did you test this?
required,default), outputs (name,value), and each step'sid,if,uses,with,env,shellandcontinue-on-error: no difference. The publication script is byte-identical to the source's; the other three differ only as described above.Extract commit metadatascripts side by side the way the runner does (bash --noprofile --norc -e -o pipefail,LC_ALL=C.UTF-8) in a scratch Git repository. Ordinary commits (one line, several lines, an empty message with the Git fallbacks, subjects of 160, 161 and 400 characters, a multibyte character at the cut, an emoji with a zero-width joiner, quotes and commas) give byte-identical output files. A carriage return or other control character in any of the three values leaves four output lines and no carriage return. A 200,000-byte message with a short first line makes the original exit 141 and the new script exit 0. That run was on macOS. On a Linux runner a single environment variable is limited to about 128 KiB, and the message reaches the step throughCOMMIT_MESSAGE, so a message above that size still stops the step before the script starts, as it did before this change. The fix covers messages between the pipe buffer (64 KiB) and that limit. Subjects and names with two to five opening braces leave no{{in any output, and none with a comma directly followed by a double quote keeps that pair, including one cut by the length limit inside a quoted part.refs/heads/Mainorrefs/heads/MAINagainst a default ofmain, the old scripts generated a tag and passed validation; the new ones write an empty tag orskip=truewith a warning and exit 0. The generation script ran with a stand-in fortimeout, because the test machine has none that supports--kill-after. That expressions ignore case comes from GitHub's documentation; I could not evaluate one offline.fix {{sha}}is rewritten anduse {{ .Values.x }}throws a parse error. I did not run the CSV parser; the carriage-return and comma-quote parts rest on reading its source at the version the pinned action resolves.shellcheck -s bashon each extractedrun:script: no findings. The fixtures ran on macOS with bash 5.3, not on an Ubuntu runner.actionlinton a scratch workflow that calls the action: it parses the action's metadata and checks the input names. It doesn't lint a composite action's own steps.node --test .github/scripts/check-changeset-coverage.test.mjsandnode --test .github/actions/release-approval-guard/guard.test.mjsstill pass..semgrep/rulesby hand.action.ymlit rests on.