Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8th May 2024] Add deprecation notices to CodeQL for VS Code documentation #16320

Merged
merged 7 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ We welcome contributions to our CodeQL libraries and queries. Got an idea for a

There is lots of useful documentation to help you write queries, ranging from information about query file structure to tutorials for specific target languages. For more information on the documentation available, see [CodeQL queries](https://codeql.github.com/docs/writing-codeql-queries/codeql-queries) on [codeql.github.com](https://codeql.github.com).

Note that the CodeQL for Visual Studio Code documentation has been migrated to https://docs.github.com/en/code-security/codeql-for-vs-code/, but you can still contribute to it via a different repository. For more information, see [Contributing to GitHub Docs documentation](https://docs.github.com/en/contributing)."

## Change notes

Any nontrivial user-visible change to a query pack or library pack should have a change note. For details on how to add a change note for your change, see [this guide](docs/change-notes.md).
Expand Down Expand Up @@ -43,7 +45,7 @@ If you have an idea for a query that you would like to share with other CodeQL u

3. **Formatting**

- The queries and libraries must be autoformatted, for example using the "Format Document" command in [CodeQL for Visual Studio Code](https://codeql.github.com/docs/codeql-for-visual-studio-code/about-codeql-for-visual-studio-code).
- The queries and libraries must be autoformatted, for example using the "Format Document" command in [CodeQL for Visual Studio Code](https://docs.github.com/en/code-security/codeql-for-vs-code/).

If you prefer, you can either:
1. install the [pre-commit framework](https://pre-commit.com/) and install the configured hooks on this repo via `pre-commit install`, or
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This open source repository contains the standard CodeQL libraries and queries t

## How do I learn CodeQL and run queries?

There is [extensive documentation](https://codeql.github.com/docs/) on getting started with writing CodeQL using the [CodeQL extension for Visual Studio Code](https://codeql.github.com/docs/codeql-for-visual-studio-code/) and the [CodeQL CLI](https://codeql.github.com/docs/codeql-cli/).
There is [extensive documentation](https://codeql.github.com/docs/) on getting started with writing CodeQL using the [CodeQL extension for Visual Studio Code](https://docs.github.com/en/code-security/codeql-for-vs-code/) and the [CodeQL CLI](https://docs.github.com/en/code-security/codeql-cli).
subatoi marked this conversation as resolved.
Show resolved Hide resolved

## Contributing

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
About CodeQL for Visual Studio Code
=================================================

.. include:: ../reusables/vs-code-deprecation-note.rst

CodeQL for Visual Studio Code is an extension that lets you write, run, and test CodeQL queries in Visual Studio Code.

Features
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
About telemetry in CodeQL for Visual Studio Code
=================================================

.. include:: ../reusables/vs-code-deprecation-note.rst

If you specifically opt in to permit GitHub to do so, GitHub will collect usage data and metrics for the purposes of helping the core developers to improve the CodeQL extension for VS Code.

This data will not be shared with any parties outside of GitHub. IP addresses and installation IDs will be retained for a maximum of 30 days. Anonymous data will be retained for a maximum of 180 days.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
Analyzing your projects
=================================================

.. include:: ../reusables/vs-code-deprecation-note.rst

You can run queries on CodeQL databases and view the results in Visual Studio Code. This article explains how to get a CodeQL database and analyze it on your local machine. For information on running analysis at scale across many CodeQL databases, see ":ref:`Running CodeQL queries at scale with multi-repository variant analysis <running-codeql-queries-at-scale-with-mrva>`."

Choosing a database
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
Customizing settings
====================

.. include:: ../reusables/vs-code-deprecation-note.rst

You can edit the settings for the CodeQL extension to suit your needs.

About CodeQL extension settings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
Exploring data flow with path queries
=====================================

.. include:: ../reusables/vs-code-deprecation-note.rst

You can run CodeQL queries in VS Code to help you track the flow of data through a program, highlighting areas that are potential security vulnerabilities.

About path queries
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
Exploring the structure of your source code
=================================================

.. include:: ../reusables/vs-code-deprecation-note.rst

You can use the AST viewer to display the abstract syntax tree of a CodeQL database.

About the abstract syntax tree
Expand Down
2 changes: 2 additions & 0 deletions docs/codeql/codeql-for-visual-studio-code/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
CodeQL for Visual Studio Code
=============================

.. include:: ../reusables/vs-code-deprecation-note.rst

The CodeQL extension for Visual Studio Code adds rich language support for CodeQL and allows you to easily find problems in codebases.

- :doc:`About CodeQL for Visual Studio Code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
Running CodeQL queries at scale with multi-repository variant analysis
======================================================================

.. include:: ../reusables/vs-code-deprecation-note.rst

.. include:: ../reusables/beta-note-mrva.rst

About multi-repository variant analysis
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
Setting up CodeQL in Visual Studio Code
=================================================

.. include:: ../reusables/vs-code-deprecation-note.rst

You can install and configure the CodeQL extension in Visual Studio Code.

.. include:: ../reusables/license-note.rst
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
Testing CodeQL queries in Visual Studio Code
============================================

.. include:: ../reusables/vs-code-deprecation-note.rst

You can run unit tests for CodeQL queries using the Visual Studio Code extension. When you are sure that your query finds the results you want to identify, you can use variant analysis to run it at scale. For information on running analysis at scale across many CodeQL databases, see ":ref:`Running CodeQL queries at scale with multi-repository variant analysis <running-codeql-queries-at-scale-with-mrva>`."

About testing queries in VS Code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
Troubleshooting CodeQL for Visual Studio Code
=============================================

.. include:: ../reusables/vs-code-deprecation-note.rst

This article explains how to debug problems with the analysis of CodeQL databases that are stored on your local
machine. For information on troubleshooting variant analysis, which runs on GitHub.com, see
":ref:`Troubleshooting variant analysis <troubleshooting-variant-analysis>`."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
Troubleshooting variant analysis
================================

.. include:: ../reusables/vs-code-deprecation-note.rst

.. include:: ../reusables/beta-note-mrva.rst

This article explains how to debug problems with variant analysis, that is, analysis run using GitHub Actions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
Using the CodeQL model editor
=============================

.. include:: ../reusables/vs-code-deprecation-note.rst

.. include:: ../reusables/beta-note-model-pack-editor-vsc.rst

You can view, write, and edit CodeQL packs in Visual Studio Code using the CodeQL extension. The model editor is designed to help you model external dependencies of your codebase that are not supported by the standard CodeQL Libraries.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
Working with CodeQL packs in Visual Studio Code
===============================================

.. include:: ../reusables/vs-code-deprecation-note.rst

.. include:: ../reusables/beta-note-package-management.rst

You can view, write, and edit all types of CodeQL packs in Visual Studio Code using the CodeQL extension.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ The CodeQL examples in this article are only excerpts and are not meant to repre
Abstract syntax
---------------

The abstract syntax tree (AST) represents the elements of the source code organized into a tree. The `AST viewer <https://codeql.github.com/docs/codeql-for-visual-studio-code/exploring-the-structure-of-your-source-code/>`__
The abstract syntax tree (AST) represents the elements of the source code organized into a tree. The `AST viewer <https://docs.github.com/en/code-security/codeql-for-vs-code/using-the-advanced-functionality-of-the-codeql-for-vs-code-extension/exploring-the-structure-of-your-source-code/>`__
in Visual Studio Code shows the AST nodes, including the relevant CodeQL classes and predicates.

All CodeQL AST classes inherit from the `AstNode` class, which provides the following member predicates
Expand Down
4 changes: 2 additions & 2 deletions docs/codeql/codeql-overview/about-codeql.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ Query execution
After you've created a CodeQL database, one or more queries are executed
against it. CodeQL queries are written in a specially-designed object-oriented
query language called QL. You can run the queries checked out from the CodeQL
repo (or custom queries that you've written yourself) using the :ref:`CodeQL
for VS Code extension <codeql-for-visual-studio-code>` or the `CodeQL CLI
repo (or custom queries that you've written yourself) using the `CodeQL
for VS Code extension <https://docs.github.com/en/code-security/codeql-for-vs-code/>`__ or the `CodeQL CLI
<https://docs.github.com/en/code-security/codeql-cli>`__. For more information about queries, see ":ref:`About CodeQL queries <about-codeql-queries>`."

.. _interpret-query-results:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Bug Fixes
Python
""""""

* The `View AST functionality <https://codeql.github.com/docs/codeql-for-visual-studio-code/exploring-the-structure-of-your-source-code/>`__ no longer prints detailed information about regular expressions, greatly improving performance.
* The `View AST functionality <https://docs.github.com/en/code-security/codeql-for-vs-code/using-the-advanced-functionality-of-the-codeql-for-vs-code-extension/exploring-the-structure-of-your-source-code/>`__ no longer prints detailed information about regular expressions, greatly improving performance.

Minor Analysis Improvements
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
4 changes: 2 additions & 2 deletions docs/codeql/codeql-overview/codeql-tools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ CodeQL for Visual Studio Code

You can analyze CodeQL databases in Visual Studio Code using the CodeQL
extension, which provides an enhanced environment for writing and running custom
queries and viewing the results. For more information, see ":ref:`CodeQL
for Visual Studio Code <codeql-for-visual-studio-code>`."
queries and viewing the results. For more information, see "`CodeQL
for Visual Studio Code <https://docs.github.com/en/code-security/codeql-for-vs-code/>`__."
2 changes: 1 addition & 1 deletion docs/codeql/ql-training/cpp/bad-overflow-guard.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ CodeQL for C/C++
Setup
=====

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 this example you need to set up `CodeQL for Visual Studio Code <https://docs.github.com/en/code-security/codeql-for-vs-code/getting-started-with-codeql-for-vs-code/installing-codeql-for-vs-code>`__ and download the CodeQL database for `ChakraCore <https://github.com/Chakra-Core/ChakraCore/>`__ from GitHub.

Checking for overflow in C
==========================
Expand Down
2 changes: 1 addition & 1 deletion docs/codeql/ql-training/cpp/control-flow-cpp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ CodeQL for C/C++
Setup
=====

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 this example you need to set up `CodeQL for Visual Studio Code <https://docs.github.com/en/code-security/codeql-for-vs-code/getting-started-with-codeql-for-vs-code/installing-codeql-for-vs-code/>`__ and download the CodeQL database for `ChakraCore <https://github.com/Chakra-Core/ChakraCore/>`__ from GitHub.


.. rst-class:: agenda
Expand Down
2 changes: 1 addition & 1 deletion docs/codeql/ql-training/cpp/data-flow-cpp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Finding string formatting vulnerabilities in C/C++
Setup
=====

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 you need to set up `CodeQL for Visual Studio Code <hhttps://docs.github.com/en/code-security/codeql-for-vs-code/getting-started-with-codeql-for-vs-code/installing-codeql-for-vs-code>`__ and download the CodeQL database for `dotnet/coreclr <https://github.com/dotnet/coreclr>`__ from GitHub.

.. rst-class:: agenda

Expand Down
2 changes: 1 addition & 1 deletion docs/codeql/ql-training/cpp/global-data-flow-cpp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ CodeQL for C/C++
Setup
=====

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 you need to set up `CodeQL for Visual Studio Code <https://docs.github.com/en/code-security/codeql-for-vs-code/getting-started-with-codeql-for-vs-code/installing-codeql-for-vs-code>`__ and download the CodeQL database for `dotnet/coreclr <https://github.com/dotnet/coreclr>`__ from GitHub.

.. rst-class:: agenda

Expand Down
2 changes: 1 addition & 1 deletion docs/codeql/ql-training/cpp/intro-ql-cpp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ CodeQL for C/C++
Setup
=====

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.
For this example you need to set up `CodeQL for Visual Studio Code <https://docs.github.com/en/code-security/codeql-for-vs-code/getting-started-with-codeql-for-vs-code/installing-codeql-for-vs-code>`__ and download the CodeQL database for `exiv2 <https://github.com/Exiv2/exiv2>`__ from GitHub.

.. Include language-agnostic section here

Expand Down
2 changes: 1 addition & 1 deletion docs/codeql/ql-training/cpp/snprintf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ CodeQL for C/C++
Setup
=====

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.
For this example you need to set up `CodeQL for Visual Studio Code <https://docs.github.com/en/code-security/codeql-for-vs-code/getting-started-with-codeql-for-vs-code/installing-codeql-for-vs-code>`__ and download the CodeQL database for `rsyslog <https://github.com/rsyslog/rsyslog>`__ from GitHub.

``snprintf``
============
Expand Down
2 changes: 1 addition & 1 deletion docs/codeql/ql-training/java/apache-struts-java.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Exercise: Apache Struts
Setup
=====

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 you need to set up `CodeQL for Visual Studio Code <https://docs.github.com/en/code-security/codeql-for-vs-code/getting-started-with-codeql-for-vs-code/installing-codeql-for-vs-code>`__ and download the CodeQL database for `Apache Struts <https://github.com/apache/struts>`__ from GitHub.

Unsafe deserialization in Struts
================================
Expand Down
2 changes: 1 addition & 1 deletion docs/codeql/ql-training/java/data-flow-java.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Finding SPARQL injection vulnerabilities in Java
Setup
=====

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 you need to set up `CodeQL for Visual Studio Code <https://docs.github.com/en/code-security/codeql-for-vs-code/getting-started-with-codeql-for-vs-code/installing-codeql-for-vs-code>`__ and download the CodeQL database for `VIVO Vitro <https://github.com/vivo-project/Vitro>`__ from GitHub.

.. rst-class:: agenda

Expand Down
2 changes: 1 addition & 1 deletion docs/codeql/ql-training/java/global-data-flow-java.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ CodeQL for Java
Setup
=====

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 you need to set up `CodeQL for Visual Studio Code <https://docs.github.com/en/code-security/codeql-for-vs-code/getting-started-with-codeql-for-vs-code/installing-codeql-for-vs-code>`__ and download the CodeQL database for `Apache Struts <https://github.com/apache/struts>`__ from GitHub.

.. rst-class:: agenda

Expand Down
2 changes: 1 addition & 1 deletion docs/codeql/ql-training/java/intro-ql-java.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ CodeQL for Java
Setup
=====

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 you need to set up `CodeQL for Visual Studio Code <https://docs.github.com/en/code-security/codeql-for-vs-code/getting-started-with-codeql-for-vs-code/installing-codeql-for-vs-code>`__ and download the CodeQL database for `Apache Struts <https://github.com/apache/struts>`__ from GitHub.

.. Include language-agnostic section here

Expand Down
2 changes: 1 addition & 1 deletion docs/codeql/ql-training/java/query-injection-java.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ CodeQL for Java
Setup
=====

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 you need to set up `CodeQL for Visual Studio Code <https://docs.github.com/en/code-security/codeql-for-vs-code/getting-started-with-codeql-for-vs-code/installing-codeql-for-vs-code>`__ and download the CodeQL database for `VIVO Vitro <https://github.com/vivo-project/Vitro>`__ from GitHub.

SQL injection
=============
Expand Down
2 changes: 1 addition & 1 deletion docs/codeql/ql-training/template.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Setup

For this example you should download:

- `CodeQL for Visual Studio Code <https://codeql.github.com/docs/codeql-for-visual-studio-code/setting-up-codeql-in-visual-studio-code/>`__
- `CodeQL for Visual Studio Code <https://docs.github.com/en/code-security/codeql-for-vs-code/getting-started-with-codeql-for-vs-code/installing-codeql-for-vs-code>`__
- A CodeQL database

.. note::
Expand Down
6 changes: 6 additions & 0 deletions docs/codeql/reusables/vs-code-deprecation-note.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. pull-quote::

Note

This documentation `was migrated <https://github.blog/changelog/2024-04-18-codeql-for-visual-studio-code-documentation-is-now-on-docs-github-com/>`_ to docs.github.com/en/code-security/codeql-for-vs-code on 2024/05/08, and this version is no longer maintained.
felicitymay marked this conversation as resolved.
Show resolved Hide resolved