Skip to content

Commit 24635df

Browse files
committed
ruby: add some qldoc for rack
1 parent 40da7d4 commit 24635df

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

ruby/ql/lib/codeql/ruby/frameworks/rack/internal/App.qll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ private DataFlow::Node trackRackResponse(RP::PotentialResponseNode n) {
1414
trackRackResponse(TypeTracker::end(), n).flowsTo(result)
1515
}
1616

17+
/**
18+
* Provides modeling for Rack applications.
19+
*/
1720
module App {
1821
/**
1922
* A class that may be a rack application.

ruby/ql/lib/codeql/ruby/frameworks/rack/internal/Mime.qll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1287,6 +1287,9 @@ private predicate mimeTypeMatches(string ext, string mimeType) {
12871287
ext = ".zmm" and mimeType = "application/vnd.handheld-entertainment+xml"
12881288
}
12891289

1290+
/**
1291+
* Provides modeling for the `Response` component of the `Rack` library.
1292+
*/
12901293
module Mime {
12911294
class MimetypeCall extends DataFlow::CallNode {
12921295
MimetypeCall() {

ruby/ql/lib/codeql/ruby/frameworks/rack/internal/Response.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ private import codeql.ruby.DataFlow
66
private import codeql.ruby.typetracking.TypeTracker
77
private import App as A
88

9+
/** Contains implementation details for modelling `Rack::Response`. */
910
module Private {
1011
private DataFlow::LocalSourceNode trackInt(TypeTracker t, int i) {
1112
t.start() and
@@ -33,6 +34,9 @@ module Private {
3334
}
3435
}
3536

37+
/**
38+
* Provides modeling for the `Response` component of the `Rack` library.
39+
*/
3640
module Public {
3741
bindingset[headerName]
3842
private DataFlow::Node getHeaderValue(ResponseNode resp, string headerName) {

0 commit comments

Comments
 (0)