fix(anatomy): V1-2.2 read url() references in their strict spelling only
Security review BLOCK(1): url(#%61) passed the dangling check and the per-view scoping and resolved in browsers. One strict reading now, other spellings are active content; glued names are other functions; the composer refuses an unscoped reference; owner export procedure.
This commit is contained in:
1 parent
5281337412
commit
a678faaa23
13 files changed
+553
-70
No files matched your search
@@ -1,4 +1,4 @@
|
||||
# V1-2.2 owner arbitrations, mutation run (evidence .claude/audits/2026-10-29-v1-2-2-evidence.md §7): each
|
||||
# V1-2.2 owner arbitrations, mutation run (evidence .claude/audits/2026-10-29-v1-2-2-evidence.md §7 (A1-A12 on 5281337, A13-A17 after the security review)): each
|
||||
# mutant is applied to its source file, its cargo suite runs (`lib` = the crate's unit tests), the file is
|
||||
# restored. Run from the repo root.
|
||||
import subprocess
|
||||
@@ -15,6 +15,11 @@ muts=[
|
||||
('A10 glued name accepted','crates/core/src/anatomy/svg/sanitize.rs',' _ if glued => return None,',' _ if false && glued => return None,','lib'),
|
||||
('A11 mixed units accepted','crates/core/src/anatomy/svg/sanitize.rs',' _ if *percentages.get_or_insert(percent) != percent => return None,',' _ if *percentages.get_or_insert(percent) != percent && false => return None,','lib'),
|
||||
('A12 rgba with three components','crates/core/src/anatomy/svg/sanitize.rs',' _ if rest.starts_with("rgba(") => (4, 5),',' _ if rest.starts_with("rgba(") => (3, 5),','svg_clean'),
|
||||
('A13 quote left unmatched','crates/core/src/anatomy/svg/sanitize.rs',' if bytes.get(index) != Some("e) {\n return None;\n }\n index += 1;',' if bytes.get(index) == Some("e) {\n index += 1;\n }','svg_clean'),
|
||||
('A14 any id after #','crates/core/src/anatomy/svg/sanitize.rs',' if !is_reference_name(&value[id_start..id_end]) {',' if false {','svg_clean'),
|
||||
('A15 glued url( read as url(','crates/core/src/anatomy/svg/sanitize.rs',' if !glued {\n return Some(from);',' if true || !glued {\n return Some(from);','svg_clean'),
|
||||
('A16 colour glued to what follows','crates/core/src/anatomy/svg/sanitize.rs',' ends.then_some(at + index)',' Some(at + index)','svg_clean'),
|
||||
('A17 percent-escaped id read as local','crates/core/src/anatomy/svg/sanitize.rs'," .take_while(|b| b.is_ascii_alphanumeric() || matches!(b, b'_' | b'.' | b':' | b'-'))"," .take_while(|b| b.is_ascii_alphanumeric() || matches!(b, b'_' | b'.' | b':' | b'-' | b'%'))",'svg_scope'),
|
||||
]
|
||||
for name,path,old,new,suite in muts:
|
||||
src=open(path).read()
|
||||
|
||||
Reference in new issue
Block a user