Skip to content

docs(typo3-conformance): harden the TER publish workflow template - #109

Open
magicsunday wants to merge 2 commits into
mainfrom
harden-ter-publish-workflow
Open

docs(typo3-conformance): harden the TER publish workflow template#109
magicsunday wants to merge 2 commits into
mainfrom
harden-ter-publish-workflow

Conversation

@magicsunday

Copy link
Copy Markdown
Member

Summary

  • Add security hardening (SHA-pinned actions, harden-runner, persist-credentials, least-privilege permissions, no ${{ }} interpolation into run: bodies, randomized $GITHUB_OUTPUT heredoc delimiter) to the publish-to-ter.yml asset template
  • Resolve the extension key from composer.json instead of a secret, matching tailor's own documented resolution order
  • Add an idempotency precheck + bounded post-publish verification poll instead of trusting the API call's exit code alone
  • Prefer CHANGELOG.md's own section as the TER upload comment source (CRLF-safe heading match, heading-aware character strip), falling back to the release body/title
  • Add an optional workflow_dispatch republish path, with the tag input verified as a real git tag (not just format-validated)
  • Update references/ter-publishing.md with new sections documenting all of the above, plus matching conformance checklist items

Context

Learned end to end while building and load-testing a real TER publish pipeline for an external (non-Netresearch-org) TYPO3 extension: reviewed against this skill's existing template, then hardened and load-tested against the real TER API (including a genuine first-publish failure root-caused to a stale git tag, not the workflow itself).

Test plan

  • YAML syntax validated (python3 -c "import yaml; ...")
  • Every run: script block validated with bash -n
  • CHANGELOG-extraction awk pattern functionally tested against Keep a Changelog-style fixtures (first version, last/EOF-terminated version, nonexistent version, CRLF line endings, no-date/no-brackets heading variants)
  • Markdown: code fences balanced, no trailing whitespace, final newline present, no stray underscore-emphasis introduced
  • CI (Skill Validation / lint) — will confirm once the workflow runs on this PR

@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@github-actions github-actions Bot added documentation Improvements or additions to documentation skill labels Aug 26, 2026
@magicsunday
magicsunday requested a review from CybotTM August 26, 2026 13:22
Add security hardening, idempotency, and CHANGELOG-sourced comments to
the publish-to-ter.yml template and reference doc, learned from
building and load-testing a real TER publish pipeline end to end:

- SHA-pin third-party actions, add step-security/harden-runner,
  persist-credentials: false, explicit least-privilege permissions
- Move every context value/step output out of run: script bodies and
  into env:, closing the classic script-injection vector
- Randomize the $GITHUB_OUTPUT heredoc delimiter (a static EOF can be
  smuggled via a release body/CHANGELOG section containing that line)
- Resolve the extension key from composer.json instead of a secret
  (matches tailor's own documented resolution order)
- Pin typo3/tailor to a major-version constraint instead of floating
- Add an idempotency precheck before publish and a bounded poll to
  verify TER actually serves the version afterward, instead of
  trusting the API call's exit code alone
- Prefer CHANGELOG.md's own section for the comment source over the
  release body, with a CRLF-safe heading match and a heading-aware
  character strip (avoids leaving an orphaned space where a Markdown
  heading marker was removed)
- Add an optional workflow_dispatch republish path, with the tag
  input verified as a real git tag (not just format-validated) before
  it is trusted

Signed-off-by: Rico Sonntag <rico.sonntag@netresearch.de>
@magicsunday
magicsunday force-pushed the harden-ter-publish-workflow branch from e51044f to 76934ac Compare August 26, 2026 13:23
github-actions[bot]
github-actions Bot previously approved these changes Aug 26, 2026
… gap

Found while load-testing the exact pattern this skill recommends: a
separate workflow auto-creating the GitHub Release via the default
GITHUB_TOKEN never fires publish-to-ter.yml's release: published
trigger, since GitHub does not fire downstream workflow triggers for
GITHUB_TOKEN-caused events (only workflow_dispatch/repository_dispatch
are exempt). Every workflow_dispatch test of the publish workflow kept
succeeding throughout, since that trigger was never affected - only a
real tag push surfaced that the advertised automatic path was broken.

Add push: tags as the primary trigger on the template (a real git
event, not token-gated), document the mechanism and the fix, and add
a conformance checklist item calling out that this needs verifying
against a real tag push, not just workflow_dispatch.

Signed-off-by: Rico Sonntag <rico.sonntag@netresearch.de>
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation skill

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant