freelabz/secator

security: Possible command injection on install commands

Opened this issue · 0 comments

class SourceInstaller:
	"""Install a tool from source."""

	@classmethod
	def install(cls, install_cmd):
		"""Install from source.

		Args:
			cls: ToolInstaller class.
			install_cmd (str): Install command.

		Returns:
			bool: True if install is successful, False otherwise.
		"""
		ret = Command.execute(install_cmd, cls_attributes={'shell': True})
		return ret.return_code == 0