linkfox-aigc-imagegen-product
Audited by Socket on Aug 8, 2026
3 alerts found:
Anomalyx3No explicit malicious behavior (exfiltration, keylogging, cryptomining, backdoor networking) is evident in this module. However, it contains high-impact “execution sinks” by (1) running Python scripts whose paths come from untrusted state/spec and (2) dynamically importing modules from a filesystem directory derived from skill_root (sys.path injection). If an attacker can influence state/skill_root, they can achieve arbitrary code execution, enabling sabotage/supply-chain style attacks. Review and enforce strict allowlists/signing/ownership for skill_root and script paths.
No direct malware behavior is evident in this fragment (no obvious credential theft, backdoor logic, or exfiltration code). However, there is a meaningful security risk pattern: job-controlled script paths (job.textgen_script and job.brand_gene_save_script) are used as inputs to run_textgen/extract_brand_gene after only a basic os.path.isfile check. If those helpers execute untrusted code based on these paths, this could enable supply-chain or RCE-style sabotage. Additionally, job.datadir is used to choose a write location without apparent confinement to a safe base directory. Overall, this warrants review of run_textgen/extract_brand_gene and upstream job validation/allowlisting.
This module is largely an orchestrator, and the main security risk is in dispatch: it spawns Python subprocesses using a script path read directly from untrusted state (state['run_one_task_script']) without validation/allowlisting. This can enable arbitrary code execution if the state file is attacker-controlled. Additionally, concurrency is driven by untrusted input (len(state['task_specs'])), creating a resource exhaustion/DoS risk. No clear obfuscation or explicit malware behavior is present in this fragment, but the execution pathway makes the overall risk non-trivial.