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

[BUG] Address the use of Invoke-Expression #327

Open
3 tasks done
mitchelbaker-cisa opened this issue Jun 5, 2024 · 0 comments
Open
3 tasks done

[BUG] Address the use of Invoke-Expression #327

mitchelbaker-cisa opened this issue Jun 5, 2024 · 0 comments

Comments

@mitchelbaker-cisa
Copy link
Collaborator

BEFORE CREATING THE ISSUE, CHECK THE FOLLOWING GUIDES:

  • FAQ
  • Troubleshooting
  • Search current/closed issues for similar questions, and utilize github/google search to see if an answer exists for the error I'm encountering.

Describe the bug

The Invoke-Expression cmdlet should only be used as a last resort since it has implications such as code injection. In most scenarios, safer and more robust alternatives are available.

SetupTestbed.ps1 and install_lme.ps1 are the two files which should be updated.

Additional info:
https://learn.microsoft.com/en-us/powershell/scripting/learn/deep-dives/avoid-using-invoke-expression?view=powershell-7.4
https://learn.microsoft.com/en-us/powershell/utility-modules/psscriptanalyzer/rules/avoidusinginvokeexpression?view=ps-modules

Expected behavior

Same behavior is expected, solution is to simply invoke the command directly.

@mitchelbaker-cisa mitchelbaker-cisa added the bug This issue or pull request addresses broken functionality label Jun 5, 2024
@mitchelbaker-cisa mitchelbaker-cisa removed the bug This issue or pull request addresses broken functionality label Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗 In Progress
Development

No branches or pull requests

1 participant