Skip to content

harden: the ask() function in both linux and macos in... in... - #1564

Open
anupamme wants to merge 1 commit into
deepfakes:masterfrom
anupamme:fix-repo-faceswap-printf-format-string-injection-v001
Open

anupamme wants to merge 1 commit into
deepfakes:masterfrom
anupamme:fix-repo-faceswap-printf-format-string-injection-v001

Conversation

@anupamme

Copy link
Copy Markdown

Summary

Harden input handling in .install/linux/faceswap_setup_x64.sh (flagged by multi_agent_ai).

Vulnerability

Field Value
ID V-001
Severity HIGH
Scanner multi_agent_ai
Rule V-001
File .install/linux/faceswap_setup_x64.sh:97
Assessment Defensive hardening

Description: The ask() function in both Linux and macOS installation scripts reads user input and stores it in shell variables (DIR_CONDA, DIR_FACESWAP, ENV_NAME) via printf -v. These variables are later used unquoted or in contexts where shell metacharacters could be interpreted. While some variables have basic validation, there is no comprehensive validation against shell metacharacters like semicolons, backticks, or $() constructs.

Threat Model Context

This is a Python library - vulnerabilities affect applications that import this code.

Changes

  • .install/linux/faceswap_setup_x64.sh

Behavior Preservation

The change is scoped to 1 file on the vulnerable path; it only tightens handling of untrusted input and leaves valid inputs unaffected.


This patch removes an exploit primitive — a code pattern that, while not independently exploitable today, could be chained with other weaknesses by automated exploit-development tooling. Proactive removal of such primitives raises the bar against increasingly capable automated attack tools.


Automated security fix by OrbisAI Security

Automated security fix generated by OrbisAI Security

This branch has not been deployed

No deployments
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.

1 participant