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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ETC,BLD,SEC: quoting to prevent CWE-78, and add branch-checkout-args #8

Merged
merged 2 commits into from
Jan 23, 2024

Conversation

westurner
Copy link
Contributor

  • The (already-prvileged) github actions user controls most(?)/all of these parameters which need to be quoted before passing to a shell

  • It's easier to do shell/yaml code review when things are already shell-quoted; even if unnecessarily per shellcheck, It's easier to review when already shell-quoted.

  • "CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')"

    https://cwe.mitre.org/data/definitions/78.html

- The (already-prvileged) github actions user controls most(?)/all of these parameters which need to be quoted before passing to a shell
- It's easier to do shell/yaml code review when things are already shell-quoted; even if unnecessarily per shellcheck, It's easier to review when already shell-quoted.

- "CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')" 
 
  https://cwe.mitre.org/data/definitions/78.html
action.yml Outdated
Comment on lines 12 to 15
branch-checkout-args:
description: Arguments to pass to `git checkout`: `git checkout ${checkout-args} "${branch}"`
required: false
default: ''
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is maybe not necessary. I think i was thinking of git clone args like --depth=1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@westurner, sorry for my super late reply. I am going back to the maintenance of this repository.

I have to have a look at your changes. Do you still think that this improves the action? I didn't understand if your "This is maybe not necessary" affects your whole PR.

Again, sorry. I hope you still want to discuss about it.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for coming back to this project! Before you merge, please also add quotes around the description value since it contains a colon which the YAML parser does not expect.

@dprada dprada merged commit ae149a8 into uibcdf:main Jan 23, 2024
@dprada
Copy link
Contributor

dprada commented Jan 23, 2024

Let's release a new version. Thanks for your contribution!

@westurner
Copy link
Contributor Author

westurner commented Jan 23, 2024 via email

@westurner
Copy link
Contributor Author

westurner commented Jan 23, 2024 via email

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.

3 participants