Skip to content

chore(gha): pass commenter login through env in claude.yml#40042

Merged
rusackas merged 1 commit into
masterfrom
chore/harden-claude-workflow-inputs
May 12, 2026
Merged

chore(gha): pass commenter login through env in claude.yml#40042
rusackas merged 1 commit into
masterfrom
chore/harden-claude-workflow-inputs

Conversation

@rusackas
Copy link
Copy Markdown
Member

SUMMARY

Small hardening of `.github/workflows/claude.yml`: move the `github.event.*.user.login` references off inline `${{ }}` expansion inside the shell and `actions/github-script` bodies and onto step-level `env:` blocks, then read the values as `$COMMENTER` / `process.env.COMMENTER_LOGIN`. This is the standard mitigation pattern recommended by zizmor's template-injection rule and matches the broader Superset workflow conventions.

No behavior change — the values resolved are identical, they just arrive via the runner-set environment instead of being interpolated into the script source before execution.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A — workflow change only.

TESTING INSTRUCTIONS

GitHub Actions workflow files aren't unit-testable in this repo's test suite. The change is verifiable by inspection:

  • The shell step (`Check if user is allowed`) now declares `env: COMMENTER: ${{ github.event.comment.user.login }}` and reads `$COMMENTER` from the environment.
  • The `actions/github-script` step (`Comment access denied`) declares `env: COMMENTER_LOGIN: ...` and reads `process.env.COMMENTER_LOGIN`.

The allowed-users gating logic is unchanged.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
  • Introduces new feature or API
  • Removes existing feature or API

Move the github.event.comment.user.login (and the fallback chain on
the deny-access step) from inline ${{ }} expansion in the script
bodies to step-level env: blocks, then read them as $COMMENTER and
process.env.COMMENTER_LOGIN respectively. Hardens the workflow
against the standard zizmor template-injection class without
changing observable behavior.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@bito-code-review
Copy link
Copy Markdown
Contributor

bito-code-review Bot commented May 12, 2026

Bito Automatic Review Skipped - Files Excluded

Bito didn't auto-review this change because all changed files are in the exclusion list for automatic reviews. No action is needed if you didn't intend for the agent to review it. Otherwise, to manually trigger a review, type /review in a comment and save.
You can change the excluded files settings here, or contact your Bito workspace admin at evan@preset.io.

@github-actions github-actions Bot added the github_actions Pull requests that update GitHub Actions code label May 12, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented May 12, 2026

Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit 5bc4a1e
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/6a0296521488990008f8f367
😎 Deploy Preview https://deploy-preview-40042--superset-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@rusackas rusackas merged commit e66fbc9 into master May 12, 2026
62 of 63 checks passed
@rusackas rusackas deleted the chore/harden-claude-workflow-inputs branch May 12, 2026 03:00
qfcwell pushed a commit to qfcwell/superset that referenced this pull request May 12, 2026
)

Co-authored-by: Superset Dev <dev@superset.apache.org>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants