Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 13753dd

Browse files
Jami CogswellJami Cogswell
Jami Cogswell
authored and
Jami Cogswell
committedDec 17, 2024·
Java: qldocs for CallGraph module
1 parent 4417f74 commit 13753dd

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed
 

‎java/ql/lib/semmle/code/java/security/CsrfUnprotectedRequestTypeQuery.qll

+8-1
Original file line numberDiff line numberDiff line change
@@ -125,16 +125,21 @@ module SqlExecuteConfig implements DataFlow::ConfigSig {
125125
/** Tracks flow from SQL queries that update a database to the argument of an execute method call. */
126126
module SqlExecuteFlow = TaintTracking::Global<SqlExecuteConfig>;
127127

128+
/** Provides classes and predicates representing call paths. */
128129
module CallGraph {
129-
newtype TCallPathNode =
130+
private newtype TCallPathNode =
130131
TMethod(Method m) or
131132
TCall(Call c)
132133

134+
/** A node in a call path graph */
133135
class CallPathNode extends TCallPathNode {
136+
/** Gets the method corresponding to this `CallPathNode`, if any. */
134137
Method asMethod() { this = TMethod(result) }
135138

139+
/** Gets the call corresponding to this `CallPathNode`, if any. */
136140
Call asCall() { this = TCall(result) }
137141

142+
/** Gets the string representation of this `CallPathNode`. */
138143
string toString() {
139144
result = this.asMethod().toString()
140145
or
@@ -145,6 +150,7 @@ module CallGraph {
145150
[viableCallable(this.asCall()), this.asCall().getCallee()] = result.asMethod()
146151
}
147152

153+
/** Gets a successor node of this `CallPathNode`, if any. */
148154
CallPathNode getASuccessor() {
149155
this.asMethod() = result.asCall().getEnclosingCallable()
150156
or
@@ -159,6 +165,7 @@ module CallGraph {
159165
)
160166
}
161167

168+
/** Gets the location of this `CallPathNode`. */
162169
Location getLocation() {
163170
result = this.asMethod().getLocation()
164171
or

0 commit comments

Comments
 (0)
Please sign in to comment.