Skip to content

Comments

Improve GH action user input processing#2382

Merged
ihrasko merged 2 commits intoPANTHEONtech:21.xfrom
ihrasko:21.x-gh-actions
Sep 29, 2025
Merged

Improve GH action user input processing#2382
ihrasko merged 2 commits intoPANTHEONtech:21.xfrom
ihrasko:21.x-gh-actions

Conversation

@ihrasko
Copy link
Collaborator

@ihrasko ihrasko commented Sep 29, 2025

JIRA: LIGHTY-381

As per rule githubactions:S7630 we should not directly run user input
in order to prevent script injections attacks.

In lighty.io's publish-action we have multiple user inputs which are
in first step read into env keys to prevent injections.

Then to be able to use them within following steps we write them to
GITHUB_ENV file.

We assume that we can safely use the same name for the first step env
key and GITHUB_ENV definition because original env keys are no more
visible in following steps.

JIRA: LIGHTY-381
Signed-off-by: Ivan Hrasko <[email protected]>
(cherry picked from commit f6755dc)
Here we misuse GITHUB_ENV which is designed to store dynamically
created variables.

We have only statically defined user input as-is or with some
hard-coded parts which can be set to env keys for the entire job.

JIRA: LIGHTY-381
Signed-off-by: Ivan Hrasko <[email protected]>
(cherry picked from commit 420cb8b)
@gemini-code-assist
Copy link

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

@ihrasko ihrasko merged commit fe78d21 into PANTHEONtech:21.x Sep 29, 2025
6 checks passed
@ihrasko ihrasko deleted the 21.x-gh-actions branch September 29, 2025 10:35
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.

1 participant