oh-xts-generator-template
Audited by Socket on Sep 16, 2026
3 alerts found:
Anomalyx3该片段没有直接证据表明包含恶意软件或数据窃取行为,但建议的构建流程会在版本不匹配时删除本地工具并从未固定提交、未校验完整性的第三方 Gitee 分支获取构建工具,再将其纳入构建链。这构成中高程度的供应链风险。应审查远程仓库、固定可信提交哈希并验证签名或校验和,同时审查未展示的 cleanup_group.sh。
This is an intentionally destructive OpenHarmony build-cache cleanup script, not apparent malware. Its main security risk is accidental deletion caused by unset or incorrect path variables, unvalidated dependency paths, and continuing after a failed directory change. Inputs should be validated, paths canonicalized and confined beneath OH_ROOT, and deletion should abort if any required cd fails.
The code is a straightforward but destructive cleanup script. It shows no clear malicious behavior, data exfiltration, or backdoor functionality. Its main security risk is that BUILD.gn-derived suite paths and the user-supplied OH_ROOT are insufficiently validated before recursive deletion, allowing accidental or potentially attacker-influenced deletion outside the intended scope. Restrict suite paths to verified descendants of the subsystem directory and validate OH_ROOT before deletion.