add qhelp for unsafe-code-construction · existentializm/codeql@d77c28f · GitHub
Skip to content

Commit d77c28f

Browse files
committed
add qhelp for unsafe-code-construction
1 parent d790f3c commit d77c28f

3 files changed

Lines changed: 70 additions & 0 deletions

File tree

Lines changed: 55 additions & 0 deletions
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export function unsafeDeserialize(value) {
2+
return eval(`(${value})`);
3+
}
4+
5+
export function unsafeGetter(obj, path) {
6+
return eval(`obj.${path}`);
7+
}
Lines changed: 8 additions & 0 deletions

0 commit comments

Comments
 (0)