Skip to content

Commit 67b2034

Browse files
owen-mcCopilot
andcommitted
Go: Add SSA consistency checks
Enable shared SSA and DataFlowIntegration consistency queries and record the remaining capture-retention exit-read phi baselines. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 334e222 commit 67b2034

6 files changed

Lines changed: 78 additions & 0 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import go
2+
import semmle.go.dataflow.SsaImpl
3+
import Consistency
4+
import DataFlowIntegration::DfConsistency
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
uselessPhiNode
2+
| CorsMisconfiguration.go:13:1:229:1 | SSA phi(allowedOrigins) | 1 |
3+
phiWithoutTwoPriorRefs
4+
| CorsMisconfiguration.go:13:1:229:1 | SSA phi(allowedOrigins) | CorsMisconfiguration.go:13:1:229:1 | Exceptional Exit | CorsMisconfiguration.go:94:3:94:16 | allowedOrigins | 1 |
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
uselessPhiNode
2+
| epilogues.go:89:3:91:3 | SSA phi(result) | 1 |
3+
phiWithoutTwoPriorRefs
4+
| epilogues.go:89:3:91:3 | SSA phi(result) | epilogues.go:89:3:91:3 | After if statement | epilogues.go:87:30:87:35 | result | 1 |
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
uselessPhiNode
2+
| main.go:57:9:59:2 | SSA phi(value) | 1 |
3+
| main.go:64:1:71:1 | SSA phi(value) | 1 |
4+
| main.go:76:3:78:3 | SSA phi(value) | 1 |
5+
phiWithoutTwoPriorRefs
6+
| main.go:57:9:59:2 | SSA phi(value) | main.go:57:9:59:2 | Exit | main.go:56:2:56:6 | value | 1 |
7+
| main.go:64:1:71:1 | SSA phi(value) | main.go:64:1:71:1 | Exceptional Exit | main.go:65:2:65:6 | value | 1 |
8+
| main.go:76:3:78:3 | SSA phi(value) | main.go:76:3:78:3 | After if statement | main.go:74:2:74:6 | value | 1 |
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
uselessPhiNode
2+
| rpc/notes/service.twirp.go:446:1:527:1 | SSA phi(handler) | 1 |
3+
| rpc/notes/service.twirp.go:446:1:527:1 | SSA phi(handler) | 1 |
4+
| rpc/notes/service.twirp.go:446:1:527:1 | SSA phi(reqContent) | 1 |
5+
| rpc/notes/service.twirp.go:446:1:527:1 | SSA phi(reqContent) | 1 |
6+
| rpc/notes/service.twirp.go:494:9:494:48 | SSA phi(err) | 1 |
7+
| rpc/notes/service.twirp.go:494:9:494:48 | SSA phi(respContent) | 1 |
8+
| rpc/notes/service.twirp.go:529:1:606:1 | SSA phi(handler) | 1 |
9+
| rpc/notes/service.twirp.go:529:1:606:1 | SSA phi(handler) | 1 |
10+
| rpc/notes/service.twirp.go:529:1:606:1 | SSA phi(reqContent) | 1 |
11+
| rpc/notes/service.twirp.go:529:1:606:1 | SSA phi(reqContent) | 1 |
12+
| rpc/notes/service.twirp.go:575:9:575:48 | SSA phi(err) | 1 |
13+
| rpc/notes/service.twirp.go:575:9:575:48 | SSA phi(respContent) | 1 |
14+
| rpc/notes/service.twirp.go:626:1:707:1 | SSA phi(handler) | 1 |
15+
| rpc/notes/service.twirp.go:626:1:707:1 | SSA phi(handler) | 1 |
16+
| rpc/notes/service.twirp.go:626:1:707:1 | SSA phi(reqContent) | 1 |
17+
| rpc/notes/service.twirp.go:626:1:707:1 | SSA phi(reqContent) | 1 |
18+
| rpc/notes/service.twirp.go:674:9:674:48 | SSA phi(err) | 1 |
19+
| rpc/notes/service.twirp.go:674:9:674:48 | SSA phi(respContent) | 1 |
20+
| rpc/notes/service.twirp.go:709:1:786:1 | SSA phi(handler) | 1 |
21+
| rpc/notes/service.twirp.go:709:1:786:1 | SSA phi(handler) | 1 |
22+
| rpc/notes/service.twirp.go:709:1:786:1 | SSA phi(reqContent) | 1 |
23+
| rpc/notes/service.twirp.go:709:1:786:1 | SSA phi(reqContent) | 1 |
24+
| rpc/notes/service.twirp.go:755:9:755:48 | SSA phi(err) | 1 |
25+
| rpc/notes/service.twirp.go:755:9:755:48 | SSA phi(respContent) | 1 |
26+
| rpc/notes/service.twirp.go:1203:1:1249:1 | SSA phi(resp) | 1 |
27+
| rpc/notes/service.twirp.go:1203:156:1249:1 | SSA phi(resp) | 1 |
28+
| rpc/notes/service.twirp.go:1252:1:1305:1 | SSA phi(resp) | 1 |
29+
| rpc/notes/service.twirp.go:1252:152:1305:1 | SSA phi(resp) | 1 |
30+
phiWithoutTwoPriorRefs
31+
| rpc/notes/service.twirp.go:446:1:527:1 | SSA phi(handler) | rpc/notes/service.twirp.go:446:1:527:1 | Exceptional Exit | rpc/notes/service.twirp.go:468:2:468:8 | handler | 1 |
32+
| rpc/notes/service.twirp.go:446:1:527:1 | SSA phi(handler) | rpc/notes/service.twirp.go:446:1:527:1 | Normal Exit | rpc/notes/service.twirp.go:468:2:468:8 | handler | 1 |
33+
| rpc/notes/service.twirp.go:446:1:527:1 | SSA phi(reqContent) | rpc/notes/service.twirp.go:446:1:527:1 | Exceptional Exit | rpc/notes/service.twirp.go:461:2:461:11 | reqContent | 1 |
34+
| rpc/notes/service.twirp.go:446:1:527:1 | SSA phi(reqContent) | rpc/notes/service.twirp.go:446:1:527:1 | Normal Exit | rpc/notes/service.twirp.go:461:2:461:11 | reqContent | 1 |
35+
| rpc/notes/service.twirp.go:494:9:494:48 | SSA phi(err) | rpc/notes/service.twirp.go:494:9:494:48 | defer-invoke call to ensurePanicResponses | rpc/notes/service.twirp.go:447:6:447:8 | err | 1 |
36+
| rpc/notes/service.twirp.go:494:9:494:48 | SSA phi(respContent) | rpc/notes/service.twirp.go:494:9:494:48 | defer-invoke call to ensurePanicResponses | rpc/notes/service.twirp.go:492:6:492:16 | respContent | 1 |
37+
| rpc/notes/service.twirp.go:529:1:606:1 | SSA phi(handler) | rpc/notes/service.twirp.go:529:1:606:1 | Exceptional Exit | rpc/notes/service.twirp.go:549:2:549:8 | handler | 1 |
38+
| rpc/notes/service.twirp.go:529:1:606:1 | SSA phi(handler) | rpc/notes/service.twirp.go:529:1:606:1 | Normal Exit | rpc/notes/service.twirp.go:549:2:549:8 | handler | 1 |
39+
| rpc/notes/service.twirp.go:529:1:606:1 | SSA phi(reqContent) | rpc/notes/service.twirp.go:529:1:606:1 | Exceptional Exit | rpc/notes/service.twirp.go:543:2:543:11 | reqContent | 1 |
40+
| rpc/notes/service.twirp.go:529:1:606:1 | SSA phi(reqContent) | rpc/notes/service.twirp.go:529:1:606:1 | Normal Exit | rpc/notes/service.twirp.go:543:2:543:11 | reqContent | 1 |
41+
| rpc/notes/service.twirp.go:575:9:575:48 | SSA phi(err) | rpc/notes/service.twirp.go:575:9:575:48 | defer-invoke call to ensurePanicResponses | rpc/notes/service.twirp.go:530:6:530:8 | err | 1 |
42+
| rpc/notes/service.twirp.go:575:9:575:48 | SSA phi(respContent) | rpc/notes/service.twirp.go:575:9:575:48 | defer-invoke call to ensurePanicResponses | rpc/notes/service.twirp.go:573:6:573:16 | respContent | 1 |
43+
| rpc/notes/service.twirp.go:626:1:707:1 | SSA phi(handler) | rpc/notes/service.twirp.go:626:1:707:1 | Exceptional Exit | rpc/notes/service.twirp.go:648:2:648:8 | handler | 1 |
44+
| rpc/notes/service.twirp.go:626:1:707:1 | SSA phi(handler) | rpc/notes/service.twirp.go:626:1:707:1 | Normal Exit | rpc/notes/service.twirp.go:648:2:648:8 | handler | 1 |
45+
| rpc/notes/service.twirp.go:626:1:707:1 | SSA phi(reqContent) | rpc/notes/service.twirp.go:626:1:707:1 | Exceptional Exit | rpc/notes/service.twirp.go:641:2:641:11 | reqContent | 1 |
46+
| rpc/notes/service.twirp.go:626:1:707:1 | SSA phi(reqContent) | rpc/notes/service.twirp.go:626:1:707:1 | Normal Exit | rpc/notes/service.twirp.go:641:2:641:11 | reqContent | 1 |
47+
| rpc/notes/service.twirp.go:674:9:674:48 | SSA phi(err) | rpc/notes/service.twirp.go:674:9:674:48 | defer-invoke call to ensurePanicResponses | rpc/notes/service.twirp.go:627:6:627:8 | err | 1 |
48+
| rpc/notes/service.twirp.go:674:9:674:48 | SSA phi(respContent) | rpc/notes/service.twirp.go:674:9:674:48 | defer-invoke call to ensurePanicResponses | rpc/notes/service.twirp.go:672:6:672:16 | respContent | 1 |
49+
| rpc/notes/service.twirp.go:709:1:786:1 | SSA phi(handler) | rpc/notes/service.twirp.go:709:1:786:1 | Exceptional Exit | rpc/notes/service.twirp.go:729:2:729:8 | handler | 1 |
50+
| rpc/notes/service.twirp.go:709:1:786:1 | SSA phi(handler) | rpc/notes/service.twirp.go:709:1:786:1 | Normal Exit | rpc/notes/service.twirp.go:729:2:729:8 | handler | 1 |
51+
| rpc/notes/service.twirp.go:709:1:786:1 | SSA phi(reqContent) | rpc/notes/service.twirp.go:709:1:786:1 | Exceptional Exit | rpc/notes/service.twirp.go:723:2:723:11 | reqContent | 1 |
52+
| rpc/notes/service.twirp.go:709:1:786:1 | SSA phi(reqContent) | rpc/notes/service.twirp.go:709:1:786:1 | Normal Exit | rpc/notes/service.twirp.go:723:2:723:11 | reqContent | 1 |
53+
| rpc/notes/service.twirp.go:755:9:755:48 | SSA phi(err) | rpc/notes/service.twirp.go:755:9:755:48 | defer-invoke call to ensurePanicResponses | rpc/notes/service.twirp.go:710:6:710:8 | err | 1 |
54+
| rpc/notes/service.twirp.go:755:9:755:48 | SSA phi(respContent) | rpc/notes/service.twirp.go:755:9:755:48 | defer-invoke call to ensurePanicResponses | rpc/notes/service.twirp.go:753:6:753:16 | respContent | 1 |
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
uselessPhiNode
2+
| XPathInjection.go:11:1:28:1 | SSA phi(username) | 1 |
3+
phiWithoutTwoPriorRefs
4+
| XPathInjection.go:11:1:28:1 | SSA phi(username) | XPathInjection.go:11:1:28:1 | Exceptional Exit | XPathInjection.go:13:2:13:9 | username | 1 |

0 commit comments

Comments
 (0)