Add MaD barrier guard model to make test pass

This commit is contained in:
Owen Mansel-Chan
2026-03-17 11:10:25 +00:00
parent c5457d3e30
commit 77cb35380c
2 changed files with 6 additions and 1 deletions

View File

@@ -4,3 +4,8 @@ extensions:
extensible: barrierModel
data:
- ["main::sanitize", "ReturnValue", "test-barrier", "manual"]
- addsTo:
pack: codeql/rust-all
extensible: barrierGuardModel
data:
- ["main::verify_safe", "Argument[0]", "true", "test-barrier", "manual"]

View File

@@ -43,6 +43,6 @@ fn verify_safe(s: &str) -> bool {
fn with_barrier_guard() {
let s = source(1);
if verify_safe(s) {
sink(s); // $ SPURIOUS: hasValueFlow=1
sink(s);
}
}