Skip to content

fix(workflows): Drop injectable args, let sentry-cli auto-detect VCS#608

Merged
runningcode merged 3 commits intomainfrom
no/dogfood-workflow-auto-detect-vcs
Apr 29, 2026
Merged

fix(workflows): Drop injectable args, let sentry-cli auto-detect VCS#608
runningcode merged 3 commits intomainfrom
no/dogfood-workflow-auto-detect-vcs

Conversation

@runningcode
Copy link
Copy Markdown
Contributor

@runningcode runningcode commented Apr 29, 2026

Summary

Alternate fix to #607 for the script injection vulnerability in the Sentry Dogfood workflow.

Rather than moving every ${{ github.* }} interpolation into an env: block, this PR removes the arguments entirely. sentry-cli's collect_git_metadata auto-detects all of them when running in CI.

This eliminates the injection vector by construction — there is no untrusted input in any run: block — and collapses the workflow from ~95 lines of conditional branching to ~14 lines of straight-line invocation.

Related

🤖 Generated with Claude Code

Alternate fix to #607. The sentry_dogfood workflow was passing
head-sha, base-sha, vcs-provider, head/base-repo-name, head/base-ref,
and pr-number explicitly via ${{ github.* }} interpolations, which
created a script injection vector. Rather than moving those values
into env: blocks, drop them entirely: sentry-cli's collect_git_metadata
auto-detects every one of these from GitHub Actions env vars and
GITHUB_EVENT_PATH when is_ci() is true. The auth token is also
picked up from SENTRY_AUTH_TOKEN, so no flag is needed for it either.

Removes the entire pull_request/push branching and every untrusted
interpolation from run: blocks, eliminating the injection vector by
construction.

Linear: https://linear.app/getsentry/issue/VULN-1590
@sentry
Copy link
Copy Markdown
Contributor

sentry Bot commented Apr 29, 2026

📲 Install Builds

iOS

🔗 App Name App ID Version Configuration
HackerNews com.emergetools.hackernews 3.8 (1) Release

Android

🔗 App Name App ID Version Configuration
Hacker News com.emergetools.hackernews 1.0.2 (13) Release

⚙️ launchpad-test-android Build Distribution Settings

Copy link
Copy Markdown
Contributor

@cameroncooke cameroncooke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better, thanks @runningcode

@runningcode runningcode merged commit f0c2a1f into main Apr 29, 2026
22 checks passed
@runningcode runningcode deleted the no/dogfood-workflow-auto-detect-vcs branch April 29, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants