X_SQL_UNSAFE
Means
SQL was built by string interpolation
Typical cause
a non-scalar interpolated into a sql template, or an identifier or branch name that is not [a-z0-9_-]+
Fix
pass a scalar (it becomes $n), a nested sql fragment, or wrap audited SQL in raw() — cause numbers the interpolation