参考所有分组,完成尽量多的内容:收紧 wasm blocker manifest 校验
结论:wasm blocker 分析器现在与 manifest 输入校验一致拒绝缺少 note 或字段数量异常的坏行,并在 blocker self-check 中覆盖该负向路径;未扩展 smoke 功能。
This commit is contained in:
@@ -63,11 +63,21 @@ wasm_safe_shim_in_build() {
|
||||
|
||||
core_sources=()
|
||||
blocked_sources=()
|
||||
while IFS=: read -r group path note extra; do
|
||||
case "$group" in
|
||||
manifest_line_number=0
|
||||
while IFS= read -r manifest_line || [[ -n "$manifest_line" ]]; do
|
||||
manifest_line_number=$((manifest_line_number + 1))
|
||||
case "$manifest_line" in
|
||||
""|\#*)
|
||||
continue
|
||||
;;
|
||||
esac
|
||||
|
||||
IFS=: read -r group path note extra <<<"$manifest_line"
|
||||
if [[ -z "$group" || -z "$path" || -z "$note" || -n "${extra:-}" ]]; then
|
||||
echo "bad manifest line $manifest_line_number: $manifest_line" >&2
|
||||
exit 1
|
||||
fi
|
||||
case "$group" in
|
||||
core)
|
||||
core_sources+=("$path")
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user