Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Securing input values #38

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Securing input values #38

wants to merge 1 commit into from

Conversation

cmboling
Copy link
Contributor

@cmboling cmboling commented Mar 4, 2022

Adding documentation to provide guidance on how to avoid injections using this action. Adding intermediate environment variables will help avoid this issue.

The other approach is to refactor the action.yml, and let the action directly use the envs, provided the envs are absolutely set by users who are using this action. Keep in mind this approach would be a breaking change.

Let me know if you have a preference for either approach or have another idea. 馃馃徏

@cmboling cmboling requested a review from zbazztian March 4, 2022 08:37
@zbazztian
Copy link
Contributor

@cmboling Thanks, I agree that this should be improved indeed.

I am not sure I understand your second suggestions. Couldn't we just use this to modify the action along the lines of:

name: 'Test action'
description: "Testing"
inputs:
  jira_url:
    description: 'URL of the JIRA instance'
    required: true
runs:
  using: composite
  steps:
  - name: Run a test
    env:
      JIRA_URL: '${{ inputs.jira_url }}'
    shell: bash
    run: |
      echo "$JIRA_URL"

I believe this wouldn't break anything while fixing the issue or am I missing a detail?

By the way: It's a shame to see you leave! I wish you good luck with whatever you will be doing next!

@cmboling
Copy link
Contributor Author

cmboling commented Mar 8, 2022

Ahh yea very true!!! Not sure what I was thinking when I originally thought about the issue, but yea I definitely think your code snippet actually resolves the issue! 馃挴

@zbazztian
Copy link
Contributor

I created a PR for the changes. I reckon you are off this project now, so did not mention you there. This is just FYI. I plan to create a new release once it is merged. Cheers!

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.

None yet

2 participants