Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b212af0

Browse files
committedAug 14, 2020
Docs: Rename default branch
1 parent 1d4978a commit b212af0

15 files changed

+34
-34
lines changed
 

‎README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ You can use the [interactive query console](https://lgtm.com/help/lgtm/using-que
99

1010
## Contributing
1111

12-
We welcome contributions to our standard library and standard checks. Do you have an idea for a new check, or how to improve an existing query? Then please go ahead and open a pull request! Before you do, though, please take the time to read our [contributing guidelines](CONTRIBUTING.md). You can also consult our [style guides](https://github.com/github/codeql/tree/master/docs) to learn how to format your code for consistency and clarity, how to write query metadata, and how to write query help documentation for your query.
12+
We welcome contributions to our standard library and standard checks. Do you have an idea for a new check, or how to improve an existing query? Then please go ahead and open a pull request! Before you do, though, please take the time to read our [contributing guidelines](CONTRIBUTING.md). You can also consult our [style guides](https://github.com/github/codeql/tree/main/docs) to learn how to format your code for consistency and clarity, how to write query metadata, and how to write query help documentation for your query.
1313

1414
## License
1515

‎docs/language/README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ generates html slide shows in the ``<slides-output>`` directory when run from
103103
the ``ql-training`` source directory.
104104

105105
For more information about creating slides for QL training and variant analysis
106-
examples, see the `template slide deck <https://github.com/github/codeql/blob/master/docs/language/ql-training/template.rst>`__.
106+
examples, see the `template slide deck <https://github.com/github/codeql/blob/main/docs/language/ql-training/template.rst>`__.
107107

108108
Viewing the current version of the CodeQL documentation
109109
*******************************************************

‎docs/language/learn-ql/writing-queries/introduction-to-queries.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ CodeQL includes queries to find the most relevant and interesting problems for e
1414
You can add custom queries to `custom query packs <https://lgtm.com/help/lgtm/about-queries#what-are-query-packs>`__ to analyze your projects in `LGTM <https://lgtm.com>`__, use them to analyze a database with the "`CodeQL CLI <https://help.semmle.com/codeql/codeql-cli.html>`__," or you can contribute to the standard CodeQL queries in our `open source repository on GitHub <https://github.com/github/codeql>`__.
1515

1616
This topic is a basic introduction to query files. You can find more information on writing queries for specific programming languages `here <https://help.semmle.com/QL/learn-ql/>`__, and detailed technical information about QL in the `QL language reference <https://help.semmle.com/QL/ql-handbook/index.html>`__.
17-
For more information on how to format your code when contributing queries to the GitHub repository, see the `CodeQL style guide <https://github.com/github/codeql/blob/master/docs/ql-style-guide.md>`__.
17+
For more information on how to format your code when contributing queries to the GitHub repository, see the `CodeQL style guide <https://github.com/github/codeql/blob/main/docs/ql-style-guide.md>`__.
1818

1919
Basic query structure
2020
*********************
@@ -42,7 +42,7 @@ Query metadata
4242

4343
Query metadata is used to identify your custom queries when they are added to the GitHub repository or used in your analysis. Metadata provides information about the query's purpose, and also specifies how to interpret and display the query results. For a full list of metadata properties, see ":doc:`Metadata for CodeQL queries <query-metadata>`." The exact metadata requirement depends on how you are going to run your query:
4444

45-
- If you are contributing a query to the GitHub repository, please read the `query metadata style guide <https://github.com/github/codeql/blob/master/docs/query-metadata-style-guide.md>`__.
45+
- If you are contributing a query to the GitHub repository, please read the `query metadata style guide <https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md>`__.
4646
- If you are adding a custom query to a query pack for analysis using LGTM , see `Writing custom queries to include in LGTM analysis <https://lgtm.com/help/lgtm/writing-custom-queries>`__.
4747
- If you are analyzing a database using the `CodeQL CLI <https://help.semmle.com/codeql/codeql-cli.html>`__, your query metadata must contain ``@kind``.
4848
- If you are running a query in the query console on LGTM or with the CodeQL extension for VS Code, metadata is not mandatory. However, if you want your results to be displayed as either an 'alert' or a 'path', you must specify the correct ``@kind`` property, as explained below. For more information, see `Using the query console <https://lgtm.com/help/lgtm/using-query-console>`__ on LGTM.com and "`Analyzing your projects <https://help.semmle.com/codeql/codeql-for-vscode/procedures/using-extension.html>`__" in the CodeQL for VS Code help.
@@ -120,15 +120,15 @@ You can also find examples of queries developed to find security vulnerabilities
120120
Contributing queries
121121
********************
122122

123-
Contributions to the standard queries and libraries are very welcome. For more information, see our `contributing guidelines <https://github.com/github/codeql/blob/master/CONTRIBUTING.md>`__.
123+
Contributions to the standard queries and libraries are very welcome. For more information, see our `contributing guidelines <https://github.com/github/codeql/blob/main/CONTRIBUTING.md>`__.
124124
If you are contributing a query to the open source GitHub repository, writing a custom query for LGTM, or using a custom query in an analysis with the CodeQL CLI, then you need to include extra metadata in your query to ensure that the query results are interpreted and displayed correctly. See the following topics for more information on query metadata:
125125

126126
- ":doc:`Metadata for CodeQL queries <query-metadata>`"
127-
- `Query metadata style guide on GitHub <https://github.com/github/codeql/blob/master/docs/query-metadata-style-guide.md>`__
127+
- `Query metadata style guide on GitHub <https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md>`__
128128

129-
Query contributions to the open source GitHub repository may also have an accompanying query help file to provide information about their purpose for other users. For more information on writing query help, see the `Query help style guide on GitHub <https://github.com/github/codeql/blob/master/docs/query-help-style-guide.md>`__ and the ":doc:`Query help files <query-help>`."
129+
Query contributions to the open source GitHub repository may also have an accompanying query help file to provide information about their purpose for other users. For more information on writing query help, see the `Query help style guide on GitHub <https://github.com/github/codeql/blob/main/docs/query-help-style-guide.md>`__ and the ":doc:`Query help files <query-help>`."
130130

131131
Query help files
132132
****************
133133

134-
When you write a custom query, we also recommend that you write a query help file to explain the purpose of the query to other users. For more information, see the `Query help style guide <https://github.com/github/codeql/blob/master/docs/query-help-style-guide.md>`__ on GitHub, and the ":doc:`Query help files <query-help>`."
134+
When you write a custom query, we also recommend that you write a query help file to explain the purpose of the query to other users. For more information, see the `Query help style guide <https://github.com/github/codeql/blob/main/docs/query-help-style-guide.md>`__ on GitHub, and the ":doc:`Query help files <query-help>`."

‎docs/language/learn-ql/writing-queries/query-help.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Query help files
44
Query help files tell users the purpose of a query, and recommend how to solve the potential problem the query finds.
55

66
This topic provides detailed information on the structure of query help files.
7-
For more information about how to write useful query help in a style that is consistent with the standard CodeQL queries, see the `Query help style guide <https://github.com/github/codeql/blob/master/docs/query-help-style-guide.md>`__ on GitHub.
7+
For more information about how to write useful query help in a style that is consistent with the standard CodeQL queries, see the `Query help style guide <https://github.com/github/codeql/blob/main/docs/query-help-style-guide.md>`__ on GitHub.
88

99

1010
.. pull-quote::
@@ -13,7 +13,7 @@ For more information about how to write useful query help in a style that is con
1313

1414
You can access the query help for CodeQL queries by visiting the `Built-in query pages <https://help.semmle.com/wiki/display/QL/Built-in+queries>`__.
1515
You can also access the raw query help files in the `GitHub repository <https://github.com/github/codeql>`__.
16-
For example, see the `JavaScript security queries <https://github.com/github/codeql/tree/master/javascript/ql/src/Security>`__ and `C/C++ critical queries <https://github.com/github/codeql/tree/master/cpp/ql/src/Critical>`__.
16+
For example, see the `JavaScript security queries <https://github.com/github/codeql/tree/main/javascript/ql/src/Security>`__ and `C/C++ critical queries <https://github.com/github/codeql/tree/main/cpp/ql/src/Critical>`__.
1717

1818
For queries run by default on LGTM, there are several different ways to access the query help. For further information, see `Where do I see the query help for a query on LGTM? <https://lgtm.com/help/lgtm/query-help#where-query-help-in-lgtm>`__ in the LGTM user help.
1919

@@ -169,20 +169,20 @@ The ``include`` element can be used as a section or block element. The content o
169169
Section-level include elements
170170
------------------------------
171171

172-
Section-level ``include`` elements can be located beneath the top-level ``qhelp`` element. For example, in `StoredXSS.qhelp <https://github.com/github/codeql/blob/master/csharp/ql/src/Security%20Features/CWE-079/StoredXSS.qhelp>`__, a full query help file is reused:
172+
Section-level ``include`` elements can be located beneath the top-level ``qhelp`` element. For example, in `StoredXSS.qhelp <https://github.com/github/codeql/blob/main/csharp/ql/src/Security%20Features/CWE-079/StoredXSS.qhelp>`__, a full query help file is reused:
173173

174174
.. code-block:: xml
175175
176176
<qhelp>
177177
<include src="XSS.qhelp" />
178178
</qhelp>
179179
180-
In this example, the `XSS.qhelp <https://github.com/github/codeql/blob/master/csharp/ql/src/Security%20Features/CWE-079/XSS.qhelp>`__ file must conform to the standard for a full query help file as described above. That is, the ``qhelp`` element may only contain non-``fragment``, section-level elements.
180+
In this example, the `XSS.qhelp <https://github.com/github/codeql/blob/main/csharp/ql/src/Security%20Features/CWE-079/XSS.qhelp>`__ file must conform to the standard for a full query help file as described above. That is, the ``qhelp`` element may only contain non-``fragment``, section-level elements.
181181

182182
Block-level include elements
183183
----------------------------
184184

185-
Block-level ``include`` elements can be included beneath section-level elements. For example, an ``include`` element is used beneath the ``overview`` section in `ThreadUnsafeICryptoTransform.qhelp <https://github.com/github/codeql/blob/master/csharp/ql/src/Likely%20Bugs/ThreadUnsafeICryptoTransform.qhelp>`__:
185+
Block-level ``include`` elements can be included beneath section-level elements. For example, an ``include`` element is used beneath the ``overview`` section in `ThreadUnsafeICryptoTransform.qhelp <https://github.com/github/codeql/blob/main/csharp/ql/src/Likely%20Bugs/ThreadUnsafeICryptoTransform.qhelp>`__:
186186

187187
.. code-block:: xml
188188
@@ -193,7 +193,7 @@ Block-level ``include`` elements can be included beneath section-level elements.
193193
...
194194
</qhelp>
195195
196-
The included file, `ThreadUnsafeICryptoTransformOverview.qhelp <https://github.com/github/codeql/blob/master/csharp/ql/src/Likely%20Bugs/ThreadUnsafeICryptoTransformOverview.qhelp>`_, may only contain one or more ``fragment`` sections. For example:
196+
The included file, `ThreadUnsafeICryptoTransformOverview.qhelp <https://github.com/github/codeql/blob/main/csharp/ql/src/Likely%20Bugs/ThreadUnsafeICryptoTransformOverview.qhelp>`_, may only contain one or more ``fragment`` sections. For example:
197197

198198
.. code-block:: xml
199199

‎docs/language/learn-ql/writing-queries/query-metadata.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ About query metadata
88

99
Any query that is run as part of an analysis includes a number of properties, known as query metadata. Metadata is included at the top of each query file as the content of a `QLDoc <https://help.semmle.com/QL/ql-spec/qldoc.html>`__ comment.
1010
This metadata tells LGTM and the CodeQL `extension for VS Code <https://help.semmle.com/codeql/codeql-for-vscode.html>`__ how to handle the query and display its results correctly.
11-
It also gives other users information about what the query results mean. For more information on query metadata, see the `query metadata style guide <https://github.com/github/codeql/blob/master/docs/query-metadata-style-guide.md>`__ in our `open source repository <https://github.com/github/codeql>`__ on GitHub.
11+
It also gives other users information about what the query results mean. For more information on query metadata, see the `query metadata style guide <https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md>`__ in our `open source repository <https://github.com/github/codeql>`__ on GitHub.
1212

1313
.. pull-quote::
1414

@@ -34,7 +34,7 @@ The following properties are supported by all query files:
3434
| ``@name`` | ``<text>`` | A statement that defines the label of the query. The name is written in plain text, and uses single quotes (``'``) to enclose code elements. |
3535
+-----------------------+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
3636
| ``@tags`` | | ``correctness`` | These tags group queries together in broad categories to make it easier to search for them and identify them. In addition to the common tags listed here, there are also a number of more specific categories. For more information, see the |
37-
| | | ``maintainability`` | `Query metadata style guide <https://github.com/github/codeql/blob/master/docs/query-metadata-style-guide.md>`__. |
37+
| | | ``maintainability`` | `Query metadata style guide <https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md>`__. |
3838
| | | ``readability`` | |
3939
| | | ``security`` | |
4040
+-----------------------+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

‎docs/language/ql-training/java/apache-struts-java.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,4 @@ Model answer, step 4
134134
and sink.getNode() instanceof UnsafeDeserializationSink
135135
select sink.getNode().(UnsafeDeserializationSink).getMethodAccess(), source, sink, "Unsafe deserialization of $@.", source, "user input"
136136
137-
More full-featured version: https://github.com/github/security-lab/tree/master/CodeQL_Queries/java/Apache_Struts_CVE-2017-9805
137+
More full-featured version: https://github.com/github/security-lab/tree/main/CodeQL_Queries/java/Apache_Struts_CVE-2017-9805

‎docs/language/ql-training/java/global-data-flow-java.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Code injection in Apache struts
5454
.. note::
5555

5656
More details on the CVE can be found here: https://securitylab.github.com/research/apache-struts-CVE-2018-11776 and
57-
https://github.com/github/security-lab/tree/master/CodeQL_Queries/java/Apache_Struts_CVE-2018-11776
57+
https://github.com/github/security-lab/tree/main/CodeQL_Queries/java/Apache_Struts_CVE-2018-11776
5858

5959
More details on OGNL can be found here: https://commons.apache.org/proper/commons-ognl/
6060

‎docs/language/ql-training/slide-snippets/abstract-syntax-tree.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,6 @@ Entity types are rarely used directly, the usual pattern is to define a class th
6565

6666
For example, the database schemas for C/++, C#, and Java CodeQL databases are here:
6767

68-
- https://github.com/github/codeql/blob/master/cpp/ql/src/semmlecode.cpp.dbscheme
69-
- https://github.com/github/codeql/blob/master/csharp/ql/src/semmlecode.csharp.dbscheme
70-
- https://github.com/github/codeql/blob/master/java/ql/src/config/semmlecode.dbscheme
68+
- https://github.com/github/codeql/blob/main/cpp/ql/src/semmlecode.cpp.dbscheme
69+
- https://github.com/github/codeql/blob/main/csharp/ql/src/semmlecode.csharp.dbscheme
70+
- https://github.com/github/codeql/blob/main/java/ql/src/config/semmlecode.dbscheme
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
- `CodeQL queries for C and C++ <https://github.com/github/codeql/tree/master/cpp/ql/src>`__
2-
- `Example queries for C and C++ <https://github.com/github/codeql/tree/master/cpp/ql/examples>`__
1+
- `CodeQL queries for C and C++ <https://github.com/github/codeql/tree/main/cpp/ql/src>`__
2+
- `Example queries for C and C++ <https://github.com/github/codeql/tree/main/cpp/ql/examples>`__
33
- `CodeQL library reference for C and C++ <https://help.semmle.com/qldoc/cpp/>`__
44

Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
- `CodeQL queries for C# <https://github.com/github/codeql/tree/master/csharp/ql/src>`__
2-
- `Example queries for C# <https://github.com/github/codeql/tree/master/csharp/ql/examples>`__
1+
- `CodeQL queries for C# <https://github.com/github/codeql/tree/main/csharp/ql/src>`__
2+
- `Example queries for C# <https://github.com/github/codeql/tree/main/csharp/ql/examples>`__
33
- `CodeQL library reference for C# <https://help.semmle.com/qldoc/csharp/>`__
44

Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
- `CodeQL queries for Go <https://github.com/github/codeql-go/tree/master/ql/src>`__
2-
- `Example queries for Go <https://github.com/github/codeql-go/tree/master/ql/examples>`__
1+
- `CodeQL queries for Go <https://github.com/github/codeql-go/tree/main/ql/src>`__
2+
- `Example queries for Go <https://github.com/github/codeql-go/tree/main/ql/examples>`__
33
- `CodeQL library reference for Go <https://help.semmle.com/qldoc/go/>`__
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
- `CodeQL queries for Java <https://github.com/github/codeql/tree/master/java/ql/src>`__
2-
- `Example queries for Java <https://github.com/github/codeql/tree/master/java/ql/examples>`__
1+
- `CodeQL queries for Java <https://github.com/github/codeql/tree/main/java/ql/src>`__
2+
- `Example queries for Java <https://github.com/github/codeql/tree/main/java/ql/examples>`__
33
- `CodeQL library reference for Java <https://help.semmle.com/qldoc/java/>`__
44

Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
- `CodeQL queries for JavaScript <https://github.com/github/codeql/tree/master/javascript/ql/src>`__
2-
- `Example queries for JavaScript <https://github.com/github/codeql/tree/master/javascript/ql/examples>`__
1+
- `CodeQL queries for JavaScript <https://github.com/github/codeql/tree/main/javascript/ql/src>`__
2+
- `Example queries for JavaScript <https://github.com/github/codeql/tree/main/javascript/ql/examples>`__
33
- `CodeQL library reference for JavaScript <https://help.semmle.com/qldoc/javascript/>`__
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
- `CodeQL queries for Python <https://github.com/github/codeql/tree/master/python/ql/src>`__
2-
- `Example queries for Python <https://github.com/github/codeql/tree/master/python/ql/examples>`__
1+
- `CodeQL queries for Python <https://github.com/github/codeql/tree/main/python/ql/src>`__
2+
- `Example queries for Python <https://github.com/github/codeql/tree/main/python/ql/examples>`__
33
- `CodeQL library reference for Python <https://help.semmle.com/qldoc/python/>`__
44

‎docs/query-metadata-style-guide.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Query files have the extension `.ql`. Each file has two distinct areas:
1212
* Query definition–defined using QL. The query includes a select statement, which defines the content and format of the results. For further information about writing QL, see the following topics:
1313
* [Learning CodeQL](https://help.semmle.com/QL/learn-ql/index.html)
1414
* [QL language reference](https://help.semmle.com/QL/ql-handbook/index.html)
15-
* [CodeQL style guide](https://github.com/github/codeql/blob/master/docs/ql-style-guide.md)
15+
* [CodeQL style guide](https://github.com/github/codeql/blob/main/docs/ql-style-guide.md)
1616

1717

1818
For examples of query files for the languages supported by CodeQL, visit the following links:

0 commit comments

Comments
 (0)
Please sign in to comment.