mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
(Multiple languages) Be clearer about which query is being discussed
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user