Clearly document passing inputs to the `script` by joshmgross · Pull Request #603 · actions/github-script
Navigation Menu
{{ message }}
actions / github-script Public
- Notifications You must be signed in to change notification settings
- Fork 553
Merged
Clearly document passing inputs to the script#603
joshmgross merged 2 commits intomainfrom
Clearly document passing inputs to the script#603
joshmgross merged 2 commits intomainfrom
Conversation
Copy link Copy Markdown
Contributor
joshmgross
commented
May 13, 2025
joshmgross
commented
A lot of questions we get around SyntaxErrors are due to misusing Actions Expressions with the script - https://github.com/actions/github-script/issues?q=is:issue%20state:closed%20SyntaxError
- Unexpected token 'var' #220
- Error: Unhandled error: SyntaxError: Unexpected token '{' #401
- Syntax Error only on Actions? #567
- Problem when constructing output with value from environment variable #597
This was documented in #126, but I believe it's worth clearly highlighting the security risks of using Actions expressions within the script and moving it up in the README as it's a common scenario.
Copilot AI review requested due to automatic review settings
May 13, 2025 15:01
joshmgross
requested a review
from a team
as a code owner
joshmgross
temporarily deployed
to
debug-integration-test
— with
GitHub Actions
Inactive
Copy link Copy Markdown
Hello from actions/github-script! (23886ca)
Copilot AI reviewed May 13, 2025
Copy link Copy Markdown
Copilot
AI
left a comment
Copilot AI left a comment
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR clarifies how to safely pass inputs into the script step by using environment variables instead of inline Actions expressions, and highlights the security risks of script injection.
- Adds a new Passing inputs to the script section with example usage
- Removes the outdated Use env as input snippet further down in the README
joshmgross
temporarily deployed
to
debug-integration-test
— with
GitHub Actions
Inactive
johnsudol approved these changes May 13, 2025
joshmgross
deleted the
joshmgross/document-inputs
branch
joshmgross
mentioned this pull request
github-actions
bot
mentioned this pull request
github-actions
bot
mentioned this pull request
coderabbitai
bot
mentioned this pull request
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment