You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
📝 Description:
The Slack war-room notification payload is constructed by directly interpolating ${{ inputs.app-name }} into a raw JSON string without any encoding or escaping. The incident-number input is correctly validated against ^[Ii][Nn][Cc]-[0-9]+$ before the Slack step runs, but app-name receives no equivalent sanitization before being embedded in the JSON payload. A value containing a double-quote character (e.g. my-app","channel":"exec-alerts,"text":"false alert) will produce syntactically valid but attacker-controlled JSON, potentially redirecting the message to an arbitrary Slack channel or injecting misleading text into a war-room notification.
⚠️ Exploit Scenario:
A workflow caller (or a calling workflow that accepts app-name from a workflow_dispatch trigger) supplies an app-name value of: legit-app","channel":"ceo-channel","text":"🚨 PRODUCTION IS DOWN – ALL HANDS. Because ${{ inputs.app-name }} is expanded verbatim inside the JSON string literal, the Slack API receives a well-formed JSON object with channel overridden to ceo-channel and an arbitrary text payload. This can be used to impersonate incident notifications, suppress the legitimate war-room alert, or misdirect responders during a real incident.
🔧 Recommendation:
Validate or sanitize inputs.app-name before it is used in any JSON context. The safest approach for this workflow is to pass all user-controlled values as environment variables into the step and construct the JSON in a shell heredoc using a tool that performs proper JSON encoding (e.g. jq -n --arg text "..." '{channel:"war-room",text:$text}'), or use the slackapi/slack-github-actionpayload-file-path option with a file written via jq. At minimum, add a validation step for app-name analogous to the one already added for incident-number.
🎯 Confidence: 3/5
💡 Trigger a new security scan by commenting @pr-auditor rescan on this PR.
Security analysis powered by Claude Sonnet 4.6 via pr-auditor | Questions? Contact #dx-team or check out this page
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
incident-numberinput to the frontend deploy workflow. When set, validatesINC-*format and posts a war-room notification before deploying.Jira: https://typeform.atlassian.net/browse/PLT-3863