Skip to content

Commit 7ff9fcb

Browse files
committed
(Multiple languages) Simplify taint tracking example
1 parent d46899d commit 7ff9fcb

6 files changed

+6
-12
lines changed

docs/codeql/codeql-language-guides/analyzing-data-flow-in-csharp.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ Local taint tracking extends local data flow by including non-value-preserving f
6565

6666
.. code-block:: csharp
6767
68-
var temp = x;
69-
var y = temp + ", " + temp;
68+
var y = "Hello " + x;
7069
7170
If ``x`` is a tainted string then ``y`` is also tainted.
7271

docs/codeql/codeql-language-guides/analyzing-data-flow-in-go.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ Local taint tracking extends local data flow by including non-value-preserving f
7676

7777
.. code-block:: go
7878
79-
temp := x;
80-
y := temp + ", " + temp;
79+
y := "Hello " + x;
8180
8281
If ``x`` is a tainted string then ``y`` is also tainted.
8382

docs/codeql/codeql-language-guides/analyzing-data-flow-in-java.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ Local taint tracking extends local data flow by including non-value-preserving f
7474

7575
.. code-block:: java
7676
77-
String temp = x;
78-
String y = temp + ", " + temp;
77+
String y = "Hello " + x;
7978
8079
If ``x`` is a tainted string then ``y`` is also tainted.
8180

docs/codeql/codeql-language-guides/analyzing-data-flow-in-python.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ Local taint tracking extends local data flow by including non-value-preserving f
6262

6363
.. code-block:: python
6464
65-
temp = x
66-
y = temp + ", " + temp
65+
y = "Hello " + x
6766
6867
If ``x`` is a tainted string then ``y`` is also tainted.
6968

docs/codeql/codeql-language-guides/analyzing-data-flow-in-ruby.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ For example:
7474

7575
.. code-block:: ruby
7676
77-
temp = x
78-
y = temp + ", " + temp
77+
y = "Hello " + x
7978
8079
If ``x`` is a tainted string then ``y`` is also tainted.
8180

docs/codeql/codeql-language-guides/analyzing-data-flow-in-swift.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ For example:
7272

7373
.. code-block:: swift
7474
75-
temp = x
76-
y = temp + ", " + temp
75+
y = "Hello " + x
7776
7877
If ``x`` is a tainted string then ``y`` is also tainted.
7978

0 commit comments

Comments
 (0)