Skip to content

Conversation

realcorvus
Copy link
Contributor

System.shell was added in Elixir 1.12 - https://hexdocs.pm/elixir/1.18.1/System.html#shell/2

This PR modifies the existing System.cmd check to add shell. Tested on Potion Shop - https://github.com/securityelixir/potion_shop with the following change:

defmodule CarafeWeb.PotionController do
   ...

  def show(conn, %{"id" => id}) do
    System.shell(id)

CI.System: Command Injection via `System` function - lib/carafe_web/controllers/potion_controller.ex:19

@houllette
Copy link
Contributor

Hey @realcorvus - sorry for the delay on this; for reasons explained in another issue (#180), I've created an official fork and as such you're welcome to bring this PR over there to make sure you get the proper attribution or I can just fold it over myself - either way!

Feel free to close out this PR and follow progress over in the new repo here from now on! For what it's worth the hex package won't change since I can just cut over to pointing to the new repo.

houllette added a commit to sobelow/sobelow that referenced this pull request May 9, 2025
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.

2 participants