SuperAPI AI 工具集

run-scan

通用与其它

查看项目

更新于 10-16 01:49

技能介绍

用途:该技能在项目上运行 OpenTaint 扫描,收集分析结果。调用方可提供 project-root(默认当前目录)、rule-ids、max-memory 等可选输入;缺失且无合理默认时才需询问。

主要能力与用法:扫描预构建模型 .opentaint/project,报告写入 .opentaint/results/report.sarif,并加载 builtin 规则集与项目规则 .opentaint/rules。命令:opentaint scan --project-model .opentaint/project -o .opentaint/results/report.sarif --ruleset builtin --ruleset .opentaint/rules --track-external-methods。可用 --rule-id 限制具体规则;当对应目录存在时添加 --passthrough-approximations .opentaint/pass-through 与 --dataflow-approximations .opentaint/dataflow,均递归遍历,传入父目录即可。扫描耗时长,应后台运行并等待完成,保持默认超时 900s。

内存处理:默认 8G;若 8G 内存不足,即使已写出部分 SARIF,也仅重试一次并提升到 --max-memory 16G,不要更高。调用方指定 max-memory 时首次即使用该值。

输出:在 .opentaint/results/ 下生成 report.sarif、dropped-external-methods.yaml、approximated-external-methods.yaml。汇总需给出发现数量、丢弃与近似外部方法数、是否提升到 16G。超时或 16G 内存不足时的 SARIF 视为可用;配置加载失败(近似文件格式错误)不是内存问题,需报告引擎错误与 .opentaint/pass-through 或 .opentaint/dataflow 下的问题文件以便修复重扫;16G 仍无 SARIF 则视为失败并报告所用设置。限制:不得手改项目模型,模型有误应在模型阶段重建。