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

MAIN B-20935 #14157

Merged
merged 3 commits into from
Nov 14, 2024
Merged

MAIN B-20935 #14157

merged 3 commits into from
Nov 14, 2024

Conversation

danieljordan-caci
Copy link
Contributor

@danieljordan-caci danieljordan-caci commented Nov 11, 2024

INT PR

Agility ticket

Summary

os.system = bad
subprocess.run = mo bettuh

subprocess.run(): From what I've read, this function allows you to pass the command and arguments as a list, so no shell is invoked. This approach is safer than os.system() because it doesn’t mess with special shell characters (like &, ;, etc.), which could lead to command injections.

Added in check=True because this flag makes subprocess.run() raise an exception if the command fails, which can be helpful for debugging.

How to test

  1. Not much to test, just ensure everything builds and passes successfully

@danieljordan-caci danieljordan-caci added Mountain Movers Movin' Mountains 1 Sprint at a time MAIN labels Nov 11, 2024
@danieljordan-caci danieljordan-caci self-assigned this Nov 11, 2024
@danieljordan-caci danieljordan-caci marked this pull request as ready for review November 14, 2024 17:47
@danieljordan-caci danieljordan-caci requested a review from a team as a code owner November 14, 2024 17:47
Copy link
Contributor

@deandreJones deandreJones left a comment

Choose a reason for hiding this comment

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

nice and simple

Copy link
Contributor

@traskowskycaci traskowskycaci left a comment

Choose a reason for hiding this comment

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

Matches INT

@deandreJones deandreJones merged commit a84077e into main Nov 14, 2024
41 checks passed
@deandreJones deandreJones deleted the MAIN-B-20935 branch November 14, 2024 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MAIN Mountain Movers Movin' Mountains 1 Sprint at a time
Development

Successfully merging this pull request may close these issues.

3 participants