(Multiple languages) Be clearer about which query is being discussed

This commit is contained in:
Owen Mansel-Chan
2025-01-17 16:56:16 +00:00
parent 6d9daec514
commit d46899d37b
3 changed files with 5 additions and 5 deletions

View File

@@ -117,7 +117,7 @@ Then we can make the source more specific, for example an access to a public par
and call.getEnclosingCallable().(Member).isPublic()
select p, "Opening a file from a public method."
This query finds calls to ``String.Format`` where the format string isn't hard-coded:
The following query finds calls to ``String.Format`` where the format string isn't hard-coded:
.. code-block:: ql

View File

@@ -93,7 +93,7 @@ For example, you can find taint propagation from a parameter ``source`` to an ex
Examples
~~~~~~~~
This query finds the filename passed to ``os.Open(..)``.
This query finds the filename passed to ``os.Open(..)``:
.. code-block:: ql
@@ -131,7 +131,7 @@ Then we can make the source more specific, for example an access to a parameter.
DataFlow::localFlow(DataFlow::parameterNode(p), DataFlow::exprNode(call.getArgument(0)))
select p
This query finds calls to formatting functions where the format string is not hard-coded.
The following query finds calls to formatting functions where the format string is not hard-coded.
Note that `StringOps::Formatting::Range <https://codeql.github.com/codeql-standard-libraries/go/semmle/go/StringOps.qll/type.StringOps$StringOps$Formatting$Range.html>`_ is a class that represents all functions which have a format string, and its member predicate `getFormatStringIndex` gives the index of the argument which is the format string.
.. code-block:: ql

View File

@@ -97,7 +97,7 @@ For example, you can find taint propagation from a parameter ``source`` to an ex
Examples
~~~~~~~~
This query finds the filename passed to ``new FileReader(..)``.
This query finds the filename passed to ``new FileReader(..)``:
.. code-block:: ql
@@ -137,7 +137,7 @@ Then we can make the source more specific, for example an access to a public par
DataFlow::localFlow(DataFlow::parameterNode(p), DataFlow::exprNode(call.getArgument(0)))
select p
This query finds calls to formatting functions where the format string is not hard-coded.
The following query finds calls to formatting functions where the format string is not hard-coded.
.. code-block:: ql