mirror of
https://github.com/nektos/act.git
synced 2026-04-26 09:25:54 +03:00
[GH-ISSUE #1434] switch case statement not working? #748
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#748
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @fauxbytes on GitHub (Nov 12, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/1434
Bug report info
Command used with act
Describe issue
On github.com, am able to execute a case statement w/o issues
Link to GitHub repository
No response
Workflow content
Relevant log output
Additional information
No response
@ChristopherHX commented on GitHub (Nov 12, 2022):
It is currently up to you to define
github.head_ref, the default is emptySee https://github.com/nektos/act#events
Your workflow has a code injection security vulnerability.
${{ github.base_ref }}contains user provided branch names, which can alter the meaning of your script e.g. if it is empty like in your example.You should replace
${{ github.base_ref }}with$GITHUB_BASE_REFto fix the security vulnerability in your worklfow. Ref https://docs.github.com/en/actions/learn-github-actions/environment-variables.@fauxbytes commented on GitHub (Nov 12, 2022):
🤦♂️👍
Many thanks for the heads-up on vuln.
@KnisterPeter commented on GitHub (Nov 12, 2022):
It's also a good practice to always surrounded your vars with double quotes. That would prevent the code injection as well.