mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
QL code and tests for C#/C++/JavaScript.
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
| tst.html:5:17:5:33 | src=external.js | tst.html:5:9:5:43 | <script>...</> | src | external.js |
|
||||
| tst.html:10:11:10:16 | ng-app= | tst.html:10:5:12:11 | <body>...</> | ng-app | |
|
||||
| tst.html:11:12:11:49 | href=javascript:void(alert('Nope!')) | tst.html:11:9:11:64 | <a>...</> | href | javascript:void(alert('Nope!')) |
|
||||
@@ -0,0 +1,4 @@
|
||||
import javascript
|
||||
|
||||
from HTML::Attribute a
|
||||
select a, a.getElement(), a.getName(), a.getValue()
|
||||
@@ -0,0 +1,3 @@
|
||||
| tst.html:5:9:5:43 | <script>...</> | 0 | tst.html:5:17:5:33 | src=external.js |
|
||||
| tst.html:10:5:12:11 | <body>...</> | 0 | tst.html:10:11:10:16 | ng-app= |
|
||||
| tst.html:11:9:11:64 | <a>...</> | 0 | tst.html:11:12:11:49 | href=javascript:void(alert('Nope!')) |
|
||||
@@ -0,0 +1,4 @@
|
||||
import javascript
|
||||
|
||||
from HTML::Element elt, int i
|
||||
select elt, i, elt.getAttribute(i)
|
||||
@@ -0,0 +1,6 @@
|
||||
| tst.html:2:1:13:7 | <html>...</> | 0 | tst.html:3:5:9:11 | <head>...</> |
|
||||
| tst.html:2:1:13:7 | <html>...</> | 1 | tst.html:10:5:12:11 | <body>...</> |
|
||||
| tst.html:3:5:9:11 | <head>...</> | 0 | tst.html:4:9:4:32 | <title>...</> |
|
||||
| tst.html:3:5:9:11 | <head>...</> | 1 | tst.html:5:9:5:43 | <script>...</> |
|
||||
| tst.html:3:5:9:11 | <head>...</> | 2 | tst.html:6:9:8:17 | <script>...</> |
|
||||
| tst.html:10:5:12:11 | <body>...</> | 0 | tst.html:11:9:11:64 | <a>...</> |
|
||||
@@ -0,0 +1,4 @@
|
||||
import javascript
|
||||
|
||||
from HTML::Element elt, int i
|
||||
select elt, i, elt.getChild(i)
|
||||
@@ -0,0 +1,7 @@
|
||||
| tst.html:2:1:13:7 | <html>...</> | html |
|
||||
| tst.html:3:5:9:11 | <head>...</> | head |
|
||||
| tst.html:4:9:4:32 | <title>...</> | title |
|
||||
| tst.html:5:9:5:43 | <script>...</> | script |
|
||||
| tst.html:6:9:8:17 | <script>...</> | script |
|
||||
| tst.html:10:5:12:11 | <body>...</> | body |
|
||||
| tst.html:11:9:11:64 | <a>...</> | a |
|
||||
@@ -0,0 +1,4 @@
|
||||
import javascript
|
||||
|
||||
from HTML::Element elt
|
||||
select elt, elt.getName()
|
||||
@@ -0,0 +1,6 @@
|
||||
| tst.html:3:5:9:11 | <head>...</> | tst.html:2:1:13:7 | <html>...</> |
|
||||
| tst.html:4:9:4:32 | <title>...</> | tst.html:3:5:9:11 | <head>...</> |
|
||||
| tst.html:5:9:5:43 | <script>...</> | tst.html:3:5:9:11 | <head>...</> |
|
||||
| tst.html:6:9:8:17 | <script>...</> | tst.html:3:5:9:11 | <head>...</> |
|
||||
| tst.html:10:5:12:11 | <body>...</> | tst.html:2:1:13:7 | <html>...</> |
|
||||
| tst.html:11:9:11:64 | <a>...</> | tst.html:10:5:12:11 | <body>...</> |
|
||||
@@ -0,0 +1,4 @@
|
||||
import javascript
|
||||
|
||||
from HTML::Element elt
|
||||
select elt, elt.getParent()
|
||||
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test page</title>
|
||||
<script src="external.js"></script>
|
||||
<script>
|
||||
alert("Hello, world!");
|
||||
</script>
|
||||
</head>
|
||||
<body ng-app>
|
||||
<A href="javascript:void(alert('Nope!'))">click here</a>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user