{"id":21096397,"url":"https://github.com/githubtraining/exercise-reference-a-codeql-query","last_synced_at":"2025-05-16T15:34:40.169Z","repository":{"id":45876206,"uuid":"408897023","full_name":"githubtraining/exercise-reference-a-codeql-query","owner":"githubtraining","description":"A hands-on exercise using GitHub Actions. See README.md for instructions on how to get started.","archived":true,"fork":false,"pushed_at":"2022-10-12T05:49:54.000Z","size":55,"stargazers_count":2,"open_issues_count":5,"forks_count":14,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T07:27:46.850Z","etag":null,"topics":["exercise"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc-by-4.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/githubtraining.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-21T16:38:37.000Z","updated_at":"2024-10-01T15:15:49.000Z","dependencies_parsed_at":"2023-01-19T21:45:17.955Z","dependency_job_id":null,"html_url":"https://github.com/githubtraining/exercise-reference-a-codeql-query","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubtraining%2Fexercise-reference-a-codeql-query","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubtraining%2Fexercise-reference-a-codeql-query/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubtraining%2Fexercise-reference-a-codeql-query/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubtraining%2Fexercise-reference-a-codeql-query/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/githubtraining","download_url":"https://codeload.github.com/githubtraining/exercise-reference-a-codeql-query/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254557016,"owners_count":22091034,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["exercise"],"created_at":"2024-11-19T22:36:20.149Z","updated_at":"2025-05-16T15:34:39.884Z","avatar_url":"https://github.com/githubtraining.png","language":"JavaScript","readme":"# Welcome to the Reference a CodeQL query exercise!\n\nThis exercise checks your knowledge on referencing a query in a CodeQL workflow. It is automatically graded via a workflow once you have completed the instructions.\n\n## About this exercise\n\nA grading script exists under `.github/workflows/grading.yml`. You do not need to use this workflow for any purpose and **altering its contents will affect the repository's ability to assess your exercise and give feedback.**\n\n\u003c!-- some of the notices below are required, others are dependent on the exercise, see comment on each one to decide whether to keep or delete --\u003e\n\n\u003c!-- REQUIRED for all exercises --\u003e\n\u003cdetails\u003e\u003csummary\u003e:information_source: About the use of GitHub Actions in this exercise\u003c/summary\u003e\n\n\u003e This exercise utilizes [GitHub Actions](https://docs.github.com/en/actions), which is free for public repositories and self-hosted runners, but may incur charges on private repositories. See [About billing for GitHub Actions](https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions) to learn more. The use of GitHub Actions also means that it may take the grading workflow a few seconds and sometimes minutes to run.\n\u003c/details\u003e\n\n\u003c!-- OPTIONAL, only required for exercises that use PATs\n\u003cdetails\u003e\u003csummary\u003e:closed_lock_with_key: About the use of secrets and access tokens in this exercise.\u003c/summary\u003e\n\n\u003e This exercise asks you to create a personal access token (PAT). This step is a prerequisite of the exercise, and you should already be comfortable with PATs on GitHub before proceeding. The PAT is encrypted and used only by a local action that does not leave your repository. GitHub has safeguards in place if the PAT is exposed by mistake, but you should know that if someone gains access to your PAT, they would have the same access you've given the token. To be safe, we recommend setting an expiration for the token. If you'd like to learn more about how your PAT is used, check the action's documentation in [`.github/actions/`](.github/actions/), [Creating a personal access token](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token), and [Available scopes](https://docs.github.com/en/developers/apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes).\n\n\u003c/details\u003e\n--\u003e\n\n\u003c!-- OPTIONAL, only required for exercises that use orgs\n\u003cdetails\u003e\u003csummary\u003e 👥 About the use of organizations in this exercise\u003c/summary\u003e\n\n\u003e This exercise needs to be completed in an organization. We recommend you [create a new organization](https://github.com/account/organizations/new?coupon=\u0026plan=team_free) for free. If you choose to use an existing organization, note that this exercise will ask you to adjust settings in the organization that may have unintended effects on existing repositories or organization members.\n\u003c/details\u003e\n --\u003e\n\n## Instructions\n\n\u003c!-- Specific instructions for your exercise --\u003e\n\nPlease complete the instructions below:\n\n1. Create your own copy of this repository by using the [Use this template](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template#creating-a-repository-from-a-template) button.\n\n2. Configure the `init` action in the `.github/workflows/codeQL.yml` workflow file to use the `.github/codeql/codeql-config.yml` configuration file as input.\n\n## Useful resources\n\nUse these to help you!\n\nResources specific to this exercise:\n\n- [Configuring code scanning](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning)\n\nResources for working with exercises and GitHub Actions in general:\n\n- [Creating a repository from a template]( https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template)\n- [Viewing workflow run history](https://docs.github.com/en/actions/managing-workflow-runs/viewing-workflow-run-history)\n- [Running a workflow on GitHub](https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow#running-a-workflow-on-github)\n- [About billing for GitHub Actions](https://docs.github.com/en/github/setting-up-and-managing-billing-and-payments-on-github/about-billing-for-github-actions)\n- [GitHub Actions](https://docs.github.com/en/actions)\n\n\n## Seeing your result\n\nYour exercise is graded automatically once you have completed the instructions. To see the result of your exercise, go to the **Actions** tab, and see the most recent run on the **Grading** workflow.\n\nSee [Viewing workflow run history](https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/viewing-workflow-run-history) if you need assistance.\n\n## Troubleshooting\n\nIf you are stuck with a step in the exercise or the grading workflow does not automatically run after you complete the instructions, run the troubleshooter: in the **Actions** tab select the **Grading workflow**, click **Run workflow**, select the appropriate branch, and click the **Run workflow** button.\n\nThe troubleshooter will either display useful information to help you understand what you might have done wrong in your exercise or redirect you to the documentation relevant to your exercise to help you out.\n\nSee [Running a workflow on GitHub](https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow#running-a-workflow) if you need assistance.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithubtraining%2Fexercise-reference-a-codeql-query","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithubtraining%2Fexercise-reference-a-codeql-query","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithubtraining%2Fexercise-reference-a-codeql-query/lists"}