Skip to content

Commit 5f0febb

Browse files
committed
feat(go): Add Sinks and Sources queries with query suite
1 parent c521b98 commit 5f0febb

File tree

3 files changed

+52
-0
lines changed

3 files changed

+52
-0
lines changed

go/src/debugging/Sinks.ql

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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 go/debugging/sinks
9+
* @tags debugging
10+
*/
11+
12+
import ghsl
13+
14+
from AllSinks sinks
15+
select sinks, "sink[" + sinks.sinkType() + "]"

go/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 go/debugging/sources
9+
* @tags debugging
10+
*/
11+
12+
import ghsl
13+
14+
from AllSources sources, string threatModel
15+
where threatModel = sources.getThreatModel()
16+
// Local sources
17+
// sources.getThreatModel() = "local"
18+
select sources, "source[" + threatModel + "]"

go/src/suites/go-debugging.qls

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
- description: "GitHub's Community Packs Go Debugging Suite"
2+
3+
- queries: '.'
4+
from: githubsecuritylab/codeql-go-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)