Your workflow may be vulnerable if it passes user-controlled or computed values into the args field of the sonarqube-scan-action using shell variable syntax. For example:
If the value of github.head_ref were constructed to include a shell command, that command would have been executed when the action calculated the value for sonar.branch.name. v5.3.1 prevents this by treating the entire input as a literal string, which mitigates the vulnerability.
Additional Resources:
Do I need to update my workflow beyond upgrading the action version?
Most users will only need to make sure that they are using a patched version of sonarqube-scan-action. However, some users may have been intentionally using inline shell commands which will no longer work. You must now precompute such values earlier in your workflow.
I have received an email with the subject “Urgent SonarQube Notification” regarding this.
I searched in the message content if there was a way to unsubscribe or edit my email preferences, but could not find anything. I don’t want to mark you as spam, how can I do that properly?
I’m not sure we have a great way to let users unsubscribe from security notices. Let me follow up on this, and at the very least I can see if there’s a way we can remove your email from any future notices.
Great point! We do have rules targeting GitHub Actions, which you can find here. I believe this rule would typically flag issues like this, though I haven’t personally tested it yet. I’ll do that and update you soon.
Update: After checking, it looks like this rule specifically analyzes the run block of an action. Since your issue occurred in the args section, it would not have been detected. I’ll share this feedback with the team to explore possible improvements to the rule!