Tainted flow: 'OUTPUT' from os.environ.get (line 31, credential/environment) → open (file write)
Medium
- Category
- Data Flow
- Content
sys.exit(2) # 保存 with open(OUTPUT, 'w', encoding='utf-8') as f: json.dump(all_data, f, ensure_ascii=False, indent=2) sycm_list = all_data.get('data', {}).get('sycm', [])- Confidence
- 84% confidence
- Finding
- The output file path can be influenced by environment variables (TMPDIR/TEMP) or a command-line argument and is written without validation or safe file creation controls. In a higher-privilege or shared environment, this can enable unintended file overwrite, symlink attacks, or writing sensitive scraped business data to an attacker-chosen location.
