You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/codeql/codeql-language-guides/customizing-library-models-for-go.rst
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -156,9 +156,9 @@ This pattern covers many of the cases where we need to summarize flow through a
156
156
.. code-block:: go
157
157
158
158
func TaintFlow() {
159
-
ss := []string{"Hello", "World"}
159
+
elems := []string{"Hello", "World"}
160
160
sep := " "
161
-
t := strings.Join(ss, sep) // There is taint flow from ss and sep to t.
161
+
t := strings.Join(elems, sep) // There is taint flow from ss and sep to t.
162
162
...
163
163
}
164
164
@@ -176,7 +176,7 @@ We need to add tuples to the ``summaryModel``\(namespace, type, subtypes, name,
176
176
177
177
Since we are adding flow through a method, we need to add tuples to the ``summaryModel`` extensible predicate.
178
178
Each tuple defines flow from one argument to the return value.
179
-
The first row defines flow from the first argument (``ss`` in the example) to the return value (``t`` in the example) and the second row defines flow from the second argument (``sep`` in the example) to the return value (``t`` in the example).
179
+
The first row defines flow from the first argument (``elems`` in the example) to the return value (``t`` in the example) and the second row defines flow from the second argument (``sep`` in the example) to the return value (``t`` in the example).
180
180
181
181
The first five values identify the callable (in this case a method) to be modeled as a summary.
182
182
These are the same for both of the rows above as we are adding two summaries for the same method.
@@ -190,7 +190,7 @@ These are the same for both of the rows above as we are adding two summaries for
190
190
The sixth value should be left empty and is out of scope for this documentation.
191
191
The remaining values are used to define the ``access path``, the ``kind``, and the ``provenance`` (origin) of the summary.
192
192
193
-
- The seventh value is the access path to the input (where data flows from). ``Argument[0]`` is the access path to the first argument (``ss`` in the example) and ``Argument[1]`` is the access path to the second argument (``sep`` in the example).
193
+
- The seventh value is the access path to the input (where data flows from). ``Argument[0]`` is the access path to the first argument (``elems`` in the example) and ``Argument[1]`` is the access path to the second argument (``sep`` in the example).
194
194
- The eighth value ``ReturnValue`` is the access path to the output (where data flows to), in this case ``ReturnValue``, which means that the input flows to the return value.
195
195
- The ninth value ``taint`` is the kind of the flow. ``taint`` means that taint is propagated through the call.
196
196
- The tenth value ``manual`` is the provenance of the summary, which is used to identify the origin of the summary.
0 commit comments