Skip to content

The open alternative to Salesforce, designed for AI.

Fix expression injection in cross-repo GitHub Actions workflow (#18316)

Félix Malfait68d229733814
diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml
index bc77d328c1f..37747d40839 100644
--- a/.github/workflows/claude.yml
+++ b/.github/workflows/claude.yml
@@ -160,11 +160,14 @@ jobs:
- name: Post response to source issue
if: always()
uses: actions/github-script@v7
+ env:
+ TARGET_REPO: ${{ steps.prompt.outputs.repo }}
+ TARGET_ISSUE: ${{ steps.prompt.outputs.issue_number }}
with:
github-token: ${{ secrets.TWENTY_DISPATCH_TOKEN }}
script: |
- const [owner, repo] = '${{ steps.prompt.outputs.repo }}'.split('/');
- const issueNumber = parseInt('${{ steps.prompt.outputs.issue_number }}', 10);
+ const [owner, repo] = process.env.TARGET_REPO.split('/');
+ const issueNumber = parseInt(process.env.TARGET_ISSUE, 10);
await github.rest.issues.createComment({
owner,