deploy-folder-to-modelscope
Fail
Audited by Gen Agent Trust Hub on Mar 1, 2026
Risk Level: HIGHCOMMAND_EXECUTIONCREDENTIALS_UNSAFE
Full Analysis
- [COMMAND_EXECUTION]: The entry point script
scripts/run.pyconstructs a shell command by interpolating themodelscope_urlanddeploy_dirvariables directly into a string executed viasubprocess.run(shell=True). Because these variables are taken from user input without any sanitization or escaping, an attacker can provide a crafted URL (e.g.,"; malicious_command; #) to execute arbitrary shell commands on the system. - [COMMAND_EXECUTION]: The deployment script
scripts/deploy.pyis also vulnerable to command injection. It usessubprocess.run(shell=True)to execute commands such asgit clone {modelscope_url} {temp_dir}andfind {temp_dir} .... Since themodelscope_urlis passed as a command-line argument from the entry point script, the injection vulnerability persists throughout the deployment flow. - [CREDENTIALS_UNSAFE]: The skill requests a ModelScope repository URL from the user, which typically includes sensitive authentication credentials like OAuth2 tokens (e.g.,
http://oauth2:ACCESS_TOKEN@www.modelscope.cn/...). This URL is stored in plain text within a.envfile in the current working directory. While the skill attempts to add.envto.gitignore, storing secrets in unencrypted files on disk is a security risk.
Recommendations
- AI detected serious security threats
Audit Metadata