Skip to content

Ruby: fix defining every dataflow node as a command execution sink #9797

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

Merged
merged 5 commits into from
Jul 12, 2022

Conversation

nickrolfe
Copy link
Contributor

@nickrolfe nickrolfe commented Jul 11, 2022

For any database where there is at least one call to execute_command, rake, rails_command, or git from Rails::Generations::Actions, we accidentally defined every dataflow node in the database as a system command execution sink.

Originally introduced in #9574, but presumably not spotted by the DCA run because none of our DCA projects call one of those methods.

@nickrolfe nickrolfe requested a review from hmac July 11, 2022 14:09
@nickrolfe nickrolfe requested a review from a team as a code owner July 11, 2022 14:09
@github-actions github-actions bot added the Ruby label Jul 11, 2022
@nickrolfe
Copy link
Contributor Author

6632dfa includes a similar fix for PosixSpawn::SystemCall::isShellInterpreted, which did not adequately bind arg. This only affected databases where there existed at least one call to spawn, fspawn, popen4, pspawn, system, _pspawn methods and the backtick operator from the POSIX::spawn library.

hmac
hmac previously approved these changes Jul 11, 2022
Copy link
Contributor

@hmac hmac left a comment

Choose a reason for hiding this comment

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

Oh dear - thanks for fixing this!

Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com>
@nickrolfe nickrolfe merged commit 685389d into main Jul 12, 2022
@nickrolfe nickrolfe deleted the nickrolfe/railties_fix branch July 12, 2022 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants