|
1 | 1 | # CodeQL workshop for Ruby: Finding open URL redirection vulnerabilities
|
2 | 2 |
|
| 3 | +<h5 align="center">@adityasharad and @rvermeulen</h5> |
| 4 | + |
| 5 | +If you are attending this workshop at GitHub Universe, please follow the instructions below to prepare for the workshop in advance. |
| 6 | + |
| 7 | +Closer to the workshop date, the detailed workshop steps will be available below, which the facilitators will guide you through. |
| 8 | + |
| 9 | +## Contents |
| 10 | + |
| 11 | +- Prerequisites and setup instructions |
| 12 | + - [On your local machine](#setup) |
| 13 | + - [On Codespaces](#setup-codespaces) |
| 14 | +- [Workshop](#workshop) |
| 15 | + |
| 16 | +## Prerequisites and setup instructions (on your local machine) <a id="setup"></a> |
| 17 | + |
| 18 | +Please complete this section before the workshop, if possible. |
| 19 | + |
| 20 | +- Install [Visual Studio Code](https://code.visualstudio.com/). |
| 21 | +- Install the [CodeQL extension for Visual Studio Code](https://codeql.github.com/docs/codeql-for-visual-studio-code/setting-up-codeql-in-visual-studio-code/). |
| 22 | +- You do _not_ need to install the CodeQL CLI: the extension will handle this for you. |
| 23 | +- Clone this repository: |
| 24 | + ``` |
| 25 | + git clone https://github.com/githubuniverseworkshops/codeql |
| 26 | + ``` |
| 27 | + - Use `git pull origin main` to regularly keep this clone up to date with the latest state of the repository. |
| 28 | +- Open the repository in Visual Studio Code: **File** > **Open** (or **Open Folder**) > Browse to the checkout of `githubuniverseworkshops/codeql`. |
| 29 | +- Import the [CodeQL database](https://github.com/githubuniverseworkshops/codeql/releases/download/universe-2022/codeql-ruby-workshop-opf-openproject.zip) to be used in the workshop: |
| 30 | + - Click the **CodeQL** rectangular icon in the left sidebar. |
| 31 | + - Place your mouse over **Databases**, and click the cloud-shaped icon labelled `Download Database`. |
| 32 | + - Copy and paste this URL into the box, then press **OK**/**Enter**: https://github.com/githubuniverseworkshops/codeql/releases/download/universe-2022/codeql-ruby-workshop-opf-openproject.zip |
| 33 | + - The CodeQL extension will download the CodeQL CLI and the chosen database. |
| 34 | + - After the database is downloaded, it will appear in the left sidebar under **Databases**. Click on the database name, and click **Set Current Database**. |
| 35 | +- Run a test CodeQL query: |
| 36 | + - Open the file [`workshop-2022/example.ql`](/workshop-2022/example.ql). |
| 37 | + - From the Command Palette (`Cmd/Ctrl+Shift+P`) or the right-click context menu, click the command `CodeQL: Run Query`. |
| 38 | + - After the query compiles and runs, you should see the results in a new `CodeQL Query Results` tab. |
| 39 | +- Create a new file in the `workshop-2022` directory called `UrlRedirect.ql`. You'll develop this query during the workshop. |
| 40 | + |
| 41 | +## Prerequisites and setup instructions (on Codespaces) <a id="setup-codespaces"></a> |
| 42 | + |
| 43 | +Coming soon! |
| 44 | + |
| 45 | +## Workshop <a id="workshop"></a> |
| 46 | + |
| 47 | +Coming soon! |
0 commit comments