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

Disable shell=True for monitoring commands #684

Closed
kevinlondon opened this issue Sep 20, 2015 · 1 comment
Closed

Disable shell=True for monitoring commands #684

kevinlondon opened this issue Sep 20, 2015 · 1 comment

Comments

@kevinlondon
Copy link
Contributor

Hello! This is somewhat related to a Pull Request I opened. I'm checking for security issues in a few projects and noticed that this one uses shell=True for checking the output on the monitoring commands.

>> Issue: subprocess call with shell=True identified, security issue.
   Severity: High   Confidence: High
   Location: glances/glances/core/glances_monitor_list.py:138
134             if self.command(i) is not None:
135                 # Execute the user command line
136                 try:
137                     self.__monitor_list[i]['result'] = subprocess.check_output(self.command(i),
138                                                                                shell=True)

This could be problematic, especially if the configuration file is not properly sanitized or the command includes some illegal characters. Here's a Stack Overflow discussion and a blog post related to problems with shell=True.

@nicolargo
Copy link
Owner

No more Monitoring process list. To be report in AMP ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants