Skip to content

Conversation

@marcoacierno
Copy link
Member

What

ToDo

@vercel
Copy link

vercel bot commented Dec 14, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
pycon Error Error Dec 14, 2025 3:03pm

steps:
- name: Debug
run: |
echo "github.event: ${{ fromJSON(github.event) }}"

Check failure

Code scanning / CodeQL

Code injection Critical

Potential code injection in
${ fromJSON(github.event) }
, which may be controlled by an external user (
issue_comment
).
Potential code injection in
${ fromJSON(github.event) }
, which may be controlled by an external user (
pull_request_review_comment
).
Potential code injection in
${ fromJSON(github.event) }
, which may be controlled by an external user (
issues
).
Potential code injection in
${ fromJSON(github.event) }
, which may be controlled by an external user (
pull_request_review
).

Copilot Autofix

AI 10 days ago

To fix the code injection vulnerability, we should avoid direct interpolation of user-controlled values into shell commands. Specifically, instead of using echo "github.event: ${{ fromJSON(github.event) }}" directly, assign the value of ${{ toJSON(github.event) }} to an environment variable, then access it in the shell step using native shell variable expansion (e.g., "$EVENT"). This prevents any shell metacharacters in the event payload from being evaluated/executed by the shell.

  • Edit the debug job's step that currently echoes github.event using expression interpolation.
  • Move the event value assignment to an environment variable via the env: block.
  • Access that variable using $EVENT in the shell command, thus neutralizing code injection risks.
  • Use toJSON instead of fromJSON for proper string formatting (as in GitHub Actions best practices for dumping event payloads).

Suggested changeset 1
.github/workflows/claude.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml
--- a/.github/workflows/claude.yml
+++ b/.github/workflows/claude.yml
@@ -17,8 +17,10 @@
     runs-on: ubuntu-latest
     steps:
       - name: Debug
+        env:
+          EVENT: ${{ toJSON(github.event) }}
         run: |
-          echo "github.event: ${{ fromJSON(github.event) }}"
+          echo "github.event: $EVENT"
   claude:
     if: |
       (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
EOF
@@ -17,8 +17,10 @@
runs-on: ubuntu-latest
steps:
- name: Debug
env:
EVENT: ${{ toJSON(github.event) }}
run: |
echo "github.event: ${{ fromJSON(github.event) }}"
echo "github.event: $EVENT"
claude:
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
Copilot is powered by AI and may make mistakes. Always verify output.
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