Skip to content

Commit d603b48

Browse files
yofftausbn
andauthored
Apply suggestions from code review
Co-authored-by: Taus <[email protected]>
1 parent a7386b6 commit d603b48

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/codeql/codeql-language-guides/customizing-library-models-for-python.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Note that this sink is already recognized by the CodeQL Python analysis, but for
5656
The string **"fabric"** means we start at the places where the codebase imports the package **fabric**.
5757
- The second column is an access path that is evaluated from left to right, starting at the values that were identified by the first column.
5858

59-
- **Member[fabric]** selects accesses to the **fabric** package.
59+
- **Member[api]** selects accesses to the **api** package.
6060
- **Member[sudo]** selects accesses to the **sudo** function in the **api** package.
6161
- **Argument[0]** selects the first argument to calls to that function.
6262

@@ -167,7 +167,7 @@ Note that this source is already known by the CodeQL Python analysis, but for th
167167
data:
168168
- [
169169
"django.db.models.FileField!",
170-
"Call.Argument[upload_to:].Parameter[1,filenam:]",
170+
"Call.Argument[0,upload_to:].Parameter[1,filenam:]",
171171
"remote",
172172
]
173173
@@ -179,7 +179,7 @@ Note that this source is already known by the CodeQL Python analysis, but for th
179179
- The second column is an access path that is evaluated from left to right, starting at the values that were identified by the first column.
180180

181181
- **Call** selects calls to the class. That is, constructor calls.
182-
- **Argument[upload_to:]** selects the named argument named **upload_to**. Note that the colon at the end of the argument name indicates that we are looking for a named argument.
182+
- **Argument[0,upload_to:]** selects the first positional argument, or the named argument named **upload_to**. Note that the colon at the end of the argument name indicates that we are looking for a named argument.
183183
- **Parameter[1,filename:]** selects parameters of the callback function. We provide two parameters to search for, namely the second positional parameter and the named parameter **filename**.
184184

185185
- Finally, the kind **remote** indicates that this is considered a source of remote flow.
@@ -215,7 +215,7 @@ Note that this flow is already recognized by the CodeQL Python analysis, but for
215215
216216
217217
- Since we're adding flow through a function call, we add a tuple to the **summaryModel** extensible predicate.
218-
- The first column, **"re"**, begins the search for relevant calls at places where the **re** package is imported.
218+
- The first column, **re**, begins the search for relevant calls at places where the **re** package is imported.
219219
- The second column, **Member[compile]**, is a path leading to the function calls we wish to model.
220220
In this case, we select references to the **compile** function from the `re` package.
221221
- The third column, **Argument[0,pattern:]**, indicates the input of the flow. In this case, either the first argument to the function call or the argument named **pattern**.

0 commit comments

Comments
 (0)