Skip to content

Commit af64b31

Browse files
erik-kroghesbena
andauthored
update documentation strings
Co-authored-by: Esben Sparre Andreasen <[email protected]>
1 parent 8ba5459 commit af64b31

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

javascript/ql/lib/semmle/javascript/frameworks/CookieLibraries.qll

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module CookieWrites {
2323
abstract predicate isHttpOnly();
2424

2525
/**
26-
* Holds if the cookie is likely an authentication cookie or otherwise sensitive.
26+
* Holds if the cookie likely is an authentication cookie or otherwise sensitive.
2727
*/
2828
abstract predicate isSensitive();
2929

@@ -57,8 +57,10 @@ module CookieWrites {
5757

5858
/**
5959
* Holds if `node` looks like it can contain a sensitive cookie.
60-
* Either from `node` being a sensitive expression, or from `node` containing
61-
* a string value that looks like a sensitive cookie name.
60+
*
61+
* Heuristics:
62+
* - `node` contains a string value that looks like a sensitive cookie name
63+
* - `node` is a sensitive expression
6264
*/
6365
private predicate canHaveSensitiveCookie(DataFlow::Node node) {
6466
exists(string s |
@@ -72,7 +74,7 @@ private predicate canHaveSensitiveCookie(DataFlow::Node node) {
7274
}
7375

7476
/**
75-
* Gets cookie name from a `Set-Cookie` header value.
77+
* Gets the cookie name of a `Set-Cookie` header value.
7678
* The header value always starts with `<cookie-name>=<cookie-value>` optionally followed by attributes:
7779
* `<cookie-name>=<cookie-value>; Domain=<domain-value>; Secure; HttpOnly`
7880
*/

0 commit comments

Comments
 (0)