1
0
mirror of https://github.com/docker/docs.git synced 2026-10-25 06:09:46 +03:00
Commit Graph

2 Commits

Author SHA1 Message Date
Lorena Rangel
f90b2db317 Fix script injection in release notes PR trigger workflow (#24828)
## Description

The `release-notes-pr-trigger` workflow was interpolating PR context
values
(`html_url`, `title`, `user.login`) directly into a shell heredoc. A
specially crafted PR title or author name could break out of the JSON
string
and execute arbitrary commands.

This change moves the GitHub context values into environment variables
and
uses `jq` to safely construct the JSON artifact, eliminating the
injection
vector.

## Related issues or tickets

None

## Reviews

- [x] Technical review

Signed-off-by: Lorena Rangel <lorena.rangel@docker.com>
2026-04-20 09:58:58 +01:00
Lorena Rangel
4210ae6be8 Fix Slack notification for release notes PRs from forks (#24566)
## Description

The Slack notification workflow for Desktop release notes PRs fails when
the PR is opened from a fork because GitHub doesn't expose repository
secrets to `pull_request` events from forks.

This PR splits the workflow into two:

1. **Release Notes PR Trigger** — runs on `pull_request`, saves PR
   details (URL, title, author) as an artifact. No secrets needed.
2. **Notify Slack on Desktop Release Notes PR** — runs on `workflow_run`
   after the trigger completes, downloads the artifact, and sends the
Slack notification. Has access to secrets since `workflow_run` runs in
   the context of the base repository.

## Related issues or tickets

Fixes the `SlackError: Missing input! A token must be provided` error
in the notify-release-notes-pr workflow.

## Reviews

- [x] Technical review

Signed-off-by: Lorena Rangel <lorena.rangel@docker.com>
2026-03-30 13:41:24 +01:00