Skip to content

Can technically run another program with args #69

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

Closed
andreamah opened this issue Jul 25, 2023 · 1 comment
Closed

Can technically run another program with args #69

andreamah opened this issue Jul 25, 2023 · 1 comment
Assignees
Labels
triage-needed Needs assignment to the proper sub-team

Comments

@andreamah
Copy link

Testing #64

  1. create another file alongside test.py called evil.py. In evil.py, put print('malicious code')
  2. while test.py is the active file, run the debugpy and enter the args one & python ./evil.py
  3. See that ./evil.py gets run.

If someone malicious wanted to run their own python script, they could inject a call into the args. Perhaps we should be sanitizing the input in some way in case it can be interfered with?

Recording 2023-07-25 at 11 58 21

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Jul 25, 2023
@brettcannon
Copy link
Member

The security model for extensions is either you allow them in a trusted environment or you don't. Since this extension requires a trusted environment, you are already choosing to trust the code being debugged. Whether you bothered to sanitize your code is up to you and not us.

We also can't in any way sanitize the input as we have no idea what you plan to do with the file passed in. Are you parsing it? Are you just counting the number of letters? How do we to know what you plan to do with any file which you could read from and then choose to execute or do something with that could be considered malicious?

All of this is to say, "don't run code you don't trust". 😉

@brettcannon brettcannon closed this as not planned Won't fix, can't repro, duplicate, stale Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

4 participants