Skip to content

Commit 09ad708

Browse files
committed
feat(js): Add debugging sources and sinks queries
1 parent ff0e599 commit 09ad708

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed

javascript/src/debugging/Sinks.ql

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* @name List of all known sinks
3+
* @kind problem
4+
* @problem.severity warning
5+
* @security-severity 1.0
6+
* @sub-severity low
7+
* @precision high
8+
* @id js/debugging/sinks
9+
* @tags debugging
10+
*/
11+
12+
import javascript
13+
import ghsl
14+
15+
from AllSinks sinks
16+
// where
17+
/// Filter by file and line number
18+
// filterByLocation(sinks, "app.js", _)
19+
select sinks, "sink[" + sinks.sinkType() + "]"

javascript/src/debugging/Sources.ql

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* @name List of all known sources (remote, local, etc.)
3+
* @kind problem
4+
* @problem.severity warning
5+
* @security-severity 1.0
6+
* @sub-severity low
7+
* @precision high
8+
* @id js/debugging/sources
9+
* @tags debugging
10+
*/
11+
12+
import javascript
13+
import ghsl
14+
15+
from AllSources sources, string threatModel
16+
where
17+
sources.getThreatModel() = threatModel
18+
select sources, "source[" + threatModel + "]"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
- description: "GitHub's Community Packs JavaScript/TypeScript Debugging Suite"
2+
3+
- queries: '.'
4+
from: githubsecuritylab/codeql-javascript-queries
5+
6+
- include:
7+
kind:
8+
- problem
9+
- path-problem
10+
precision:
11+
- very-high
12+
- high
13+
tags contain:
14+
- debugging
15+
16+
# Remove local testing folders
17+
- exclude:
18+
query path:
19+
- /testing\/.*/

0 commit comments

Comments
 (0)