交接阶段补上 ui-design-doc.from-images 设计图路径校验
tool_plan_handoff/content_validation.rs 为 from-images 的 images[].path 逐项做绝对路径与逃逸判据,恢复退役工作流工具留出的早检位
This commit is contained in:
@@ -423,6 +423,15 @@ fn collect_native_tool_absolute_path_findings(
|
||||
findings,
|
||||
);
|
||||
}
|
||||
"ui-design-doc.from-images" => {
|
||||
// 设计图可以给项目内相对路径,交接阶段先按同一套判据拒绝绝对路径逃逸。
|
||||
if let Some(images) = input.get("images").and_then(serde_json::Value::as_array) {
|
||||
for (index, image) in images.iter().enumerate() {
|
||||
let pointer = format!("{input_pointer}/images/{index}/path");
|
||||
collect_native_string_field(root, image, "path", &pointer, findings);
|
||||
}
|
||||
}
|
||||
}
|
||||
"task.create" => {
|
||||
collect_native_string_array_field(
|
||||
root,
|
||||
|
||||
Reference in New Issue
Block a user