mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Merge pull request #2235 from max-schaefer/js/issue-2233
Approved by esbena
This commit is contained in:
@@ -13,6 +13,8 @@ import javascript
|
||||
from Directive d
|
||||
where
|
||||
not d instanceof KnownDirective and
|
||||
// ignore ":" pseudo-directive sometimes seen in dual-use shell/node.js scripts
|
||||
not d.getExpr().getStringValue() = ":" and
|
||||
// but exclude attribute top-levels: `<a href="javascript:'some-attribute-string'">`
|
||||
not d.getParent() instanceof CodeInAttribute
|
||||
select d, "Unknown directive: '" + truncate(d.getDirectiveText(), 20, " ... (truncated)") + "'."
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
":" //# ; exec /usr/bin/env node "$0" "$@"
|
||||
|
||||
console.log('javascript');
|
||||
Reference in New Issue
Block a user