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
For the examples in this presentation, we will be analyzing `ChakraCore <https://github.com/Chakra-Core/ChakraCore/>`__.
20
-
21
-
You can query the project in `the query console <https://lgtm.com/query/project:2034240708/lang:cpp/>`__ on LGTM.com.
22
-
23
-
.. insert database-note.rst to explain differences between database available to download and the version available in the query console.
24
-
25
-
.. include:: ../slide-snippets/database-note.rst
26
-
27
-
.. resume slides
12
+
For this example you need to set up `CodeQL for Visual Studio Code <https://codeql.github.com/docs/codeql-for-visual-studio-code/setting-up-codeql-in-visual-studio-code/>`__ and download the CodeQL database for `ChakraCore <https://github.com/Chakra-Core/ChakraCore/>`__ from GitHub.
For the examples in this presentation, we will be analyzing `ChakraCore <https://github.com/Chakra-Core/ChakraCore/>`__.
22
-
23
-
You can query the project in `the query console <https://lgtm.com/query/project:2034240708/lang:cpp/>`__ on LGTM.com.
24
-
25
-
.. insert database-note.rst to explain differences between database available to download and the version available in the query console.
26
-
27
-
.. include:: ../slide-snippets/database-note.rst
28
-
29
-
.. resume slides
14
+
For this example you need to set up `CodeQL for Visual Studio Code <https://codeql.github.com/docs/codeql-for-visual-studio-code/setting-up-codeql-in-visual-studio-code/>`__ and download the CodeQL database for `ChakraCore <https://github.com/Chakra-Core/ChakraCore/>`__ from GitHub.
For the examples in this presentation, we will be analyzing `dotnet/coreclr <https://github.com/dotnet/coreclr>`__.
20
-
21
-
You can query the project in `the query console <https://lgtm.com/query/projects:1505958977333/lang:cpp/>`__ on LGTM.com.
22
-
23
-
.. insert database-note.rst to explain differences between database available to download and the version available in the query console.
24
-
25
-
.. include:: ../slide-snippets/database-note.rst
26
-
27
-
.. resume slides
12
+
For this example you need to set up `CodeQL for Visual Studio Code <https://codeql.github.com/docs/codeql-for-visual-studio-code/setting-up-codeql-in-visual-studio-code/>`__ and download the CodeQL database for `dotnet/coreclr <https://github.com/dotnet/coreclr>`__ from GitHub.
For the examples in this presentation, we will be analyzing `dotnet/coreclr <https://github.com/dotnet/coreclr>`__.
20
-
21
-
You can query the project in `the query console <https://lgtm.com/query/projects:1505958977333/lang:cpp/>`__ on LGTM.com.
22
-
23
-
.. insert database-note.rst to explain differences between database available to download and the version available in the query console.
24
-
25
-
.. include:: ../slide-snippets/database-note.rst
26
-
27
-
.. resume slides
12
+
For this example you need to set up `CodeQL for Visual Studio Code <https://codeql.github.com/docs/codeql-for-visual-studio-code/setting-up-codeql-in-visual-studio-code/>`__ and download the CodeQL database for `dotnet/coreclr <https://github.com/dotnet/coreclr>`__ from GitHub.
For this example, we will be analyzing `exiv2 <https://github.com/Exiv2/exiv2>`__.
20
-
21
-
You can also query the project in `the query console <https://lgtm.com/query/project:1506532406873/lang:cpp/>`__ on LGTM.com.
22
-
23
-
.. insert database-note.rst to explain differences between database available to download and the version available in the query console.
24
-
25
-
.. include:: ../slide-snippets/database-note.rst
26
-
27
-
.. resume slides
12
+
For this example you need to set up `CodeQL for Visual Studio Code <https://codeql.github.com/docs/codeql-for-visual-studio-code/setting-up-codeql-in-visual-studio-code/>`__ and download the CodeQL database for `exiv2 <https://github.com/Exiv2/exiv2>`__ from GitHub.
28
13
29
14
.. Include language-agnostic section here
30
15
@@ -66,7 +51,7 @@ A simple CodeQL query
66
51
67
52
.. note::
68
53
69
-
We are going to write a simple query which finds “if statements” with empty “then” blocks, so we can highlight the results like those on the previous slide. The query can be run in the `query console on LGTM <https://lgtm.com/query>`__, or in your `IDE <https://lgtm.com/help/lgtm/running-queries-ide>`__.
54
+
We are going to write a simple query which finds “if statements” with empty “then” blocks, so we can highlight the results like those on the previous slide.
70
55
71
56
A `query <https://codeql.github.com/docs/ql-language-reference/queries/>`__ consists of a “select” clause that indicates what results should be returned. Typically it will also provide a “from” clause to declare some variables, and a “where” clause to state conditions over those variables. For more information on the structure of query files (including links to useful topics in the `QL language reference <https://codeql.github.com/docs/ql-language-reference/>`__), see `About CodeQL queries <https://codeql.github.com/docs/writing-codeql-queries/about-codeql-queries/>`__.
72
57
@@ -203,6 +188,3 @@ Model answer: redundant if-statement
For this example, we will be analyzing `rsyslog <https://github.com/rsyslog/rsyslog>`__.
20
-
21
-
You can also query the project in `the query console <https://lgtm.com/query/project:1506087977050/lang:cpp/>`__ on LGTM.com.
22
-
23
-
.. insert database-note.rst to explain differences between database available to download and the version available in the query console.
24
-
25
-
.. include:: ../slide-snippets/database-note.rst
26
-
27
-
.. resume slides
12
+
For this example you need to set up `CodeQL for Visual Studio Code <https://codeql.github.com/docs/codeql-for-visual-studio-code/setting-up-codeql-in-visual-studio-code/>`__ and download the CodeQL database for `rsyslog <https://github.com/rsyslog/rsyslog>`__ from GitHub.
28
13
29
14
``snprintf``
30
15
============
@@ -94,8 +79,6 @@ Model answer
94
79
95
80
.. rst-class:: build
96
81
97
-
- More full-featured version: `https://lgtm.com/rules/1505913226124 <https://lgtm.com/rules/1505913226124>`__.
98
-
99
82
.. note::
100
83
101
84
The regular expression for matching the format string uses the “(?s)” directive to ensure that “.” also matches any newline characters embedded in the string.
For this example, we will be analyzing `Apache Struts <https://github.com/apache/struts>`__.
24
-
25
-
You can also query the project in `the query console <https://lgtm.com/query/project:1878521151/lang:java/>`__ on LGTM.com.
26
-
27
-
.. insert database-note.rst to explain differences between database available to download and the version available in the query console.
28
-
29
-
.. include:: ../slide-snippets/database-note.rst
30
-
31
-
.. resume slides
16
+
For this example you need to set up `CodeQL for Visual Studio Code <https://codeql.github.com/docs/codeql-for-visual-studio-code/setting-up-codeql-in-visual-studio-code/>`__ and download the CodeQL database for `Apache Struts <https://github.com/apache/struts>`__ from GitHub.
32
17
33
18
Unsafe deserialization in Struts
34
19
================================
@@ -45,7 +30,7 @@ which is intended to populate the ``target`` object with data from the reader, u
45
30
RCE in Apache Struts
46
31
====================
47
32
48
-
- Vulnerable code looked like this (`original <https://lgtm.com/projects/g/apache/struts/snapshot/b434c23f95e0f9d5bde789bfa07f8fc1d5a8951d/files/plugins/rest/src/main/java/org/apache/struts2/rest/handler/XStreamHandler.java?sort=name&dir=ASC&mode=heatmap#L45>`__):
For this example, we will be analyzing `VIVO Vitro <https://github.com/vivo-project/Vitro>`__.
20
-
21
-
You can also query the project in `the query console <https://lgtm.com/query/project:14040005/lang:java/>`__ on LGTM.com.
22
-
23
-
.. insert database-note.rst to explain differences between database available to download and the version available in the query console.
24
-
25
-
.. include:: ../slide-snippets/database-note.rst
26
-
27
-
.. resume slides
12
+
For this example you need to set up `CodeQL for Visual Studio Code <https://codeql.github.com/docs/codeql-for-visual-studio-code/setting-up-codeql-in-visual-studio-code/>`__ and download the CodeQL database for `VIVO Vitro <https://github.com/vivo-project/Vitro>`__ from GitHub.
For this example, we will be analyzing `Apache Struts <https://github.com/apache/struts>`__.
20
-
21
-
You can also query the project in `the query console <https://lgtm.com/query/project:1878521151/lang:java/>`__ on LGTM.com.
22
-
23
-
.. insert database-note.rst to explain differences between database available to download and the version available in the query console.
24
-
25
-
.. include:: ../slide-snippets/database-note.rst
26
-
27
-
.. resume slides
12
+
For this example you need to set up `CodeQL for Visual Studio Code <https://codeql.github.com/docs/codeql-for-visual-studio-code/setting-up-codeql-in-visual-studio-code/>`__ and download the CodeQL database for `Apache Struts <https://github.com/apache/struts>`__ from GitHub.
For this example, we will be analyzing `Apache Struts <https://github.com/apache/struts>`__.
20
-
21
-
You can also query the project in `the query console <https://lgtm.com/query/project:1878521151/lang:java/>`__ on LGTM.com.
22
-
23
-
.. insert database-note.rst to explain differences between database available to download and the version available in the query console.
24
-
25
-
.. include:: ../slide-snippets/database-note.rst
26
-
27
-
.. resume slides
12
+
For this example you need to set up `CodeQL for Visual Studio Code <https://codeql.github.com/docs/codeql-for-visual-studio-code/setting-up-codeql-in-visual-studio-code/>`__ and download the CodeQL database for `Apache Struts <https://github.com/apache/struts>`__ from GitHub.
28
13
29
14
.. Include language-agnostic section here
30
15
@@ -66,7 +51,7 @@ A simple CodeQL query
66
51
67
52
.. note::
68
53
69
-
We are going to write a simple query which finds “if statements” with empty “then” blocks, so we can highlight the results like those on the previous slide. The query can be run in the `query console on LGTM <https://lgtm.com/query>`__, or in your `IDE <https://lgtm.com/help/lgtm/running-queries-ide>`__.
54
+
We are going to write a simple query which finds “if statements” with empty “then” blocks, so we can highlight the results like those on the previous slide.
70
55
71
56
A `query <https://codeql.github.com/docs/ql-language-reference/queries/>`__ consists of a “select” clause that indicates what results should be returned. Typically it will also provide a “from” clause to declare some variables, and a “where” clause to state conditions over those variables. For more information on the structure of query files (including links to useful topics in the `QL language reference <https://codeql.github.com/docs/ql-language-reference/>`__), see `About CodeQL queries <https://codeql.github.com/docs/writing-codeql-queries/about-codeql-queries/>`__.
72
57
@@ -201,7 +186,3 @@ Model answer: redundant if-statement
0 commit comments