1
0
mirror of synced 2025-12-19 18:10:59 -05:00
Files
docs/content/code-security/secure-coding/about-codeql-code-scanning-in-your-ci-system.md
Rachael Sewell 46fda7b959 [DO NOT MERGE] GitHub Enterprise Server 3.1 release candidate megabranch (#18399)
* 3.1 megabranch

* these should be in a topic branch to avoid unnecessary ci failures

* add copies of 3.0 schema files

* update link veresion from 3.0 -> 3.1

* update correct version 🤦‍♀️

* update with 3.1 version links

* first stab of this work

* fix product variable and links to section that has been moved

* simplify Liquid conditions

* elsif

* Update content/github/managing-subscriptions-and-notifications-on-github/viewing-your-subscriptions.md

Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com>

* [GHES 3.1] Code scanning: SARIF limit increased to 5000 (#18539)

* revert api previews

* delete 3.1 preview

* Revert "delete 3.1 preview"

This reverts commit 0a7df3e17a1e182e5b01b0fdafacb6bb19100f70.

* regenerate decorated file

* make security policy docs available in GHES 3.1 and GHAE docs

* adapt for GHES/GHAE and remove the word

* revert a whole bunch of stuff

* more reverting and further updating

* update links to Adding a security policy to your repo article

* fix broken links and remove responsibly

* simplify Liquid versioning

* Update content/code-security/getting-started/adding-a-security-policy-to-your-repository.md

Co-authored-by: Felicity Chapman <felicitymay@github.com>

* address comment

* Remove overcomplicated versioning (#18934)

* Update information on licensing and billing for GHES 3.1 (#18835)

* regenerate graphql files with new prerendered input object

* add release notes placeholder file

* add scaffolding

* use real date

* ✂️  3.1 schema added accidentally

* update enterprise release dates

* add base files

* Correct versioning for branch renaming and master to main transition in GHES docs (#19050)

* update versioning

* apply Alistair's suggestion

* add new cached index names

* Update docs for code scanning in external CI to cover CodeQL CLI usage (#19030)

* 3893 add missing flag for GHES and GHAE (next) users (#19129)

* [GHES 3.1] Release candidate 1 release notes  (#18419)

* fleshing out the 33.1 RC1 release notes

* update with moreee

* really flesh it all out

* format a bit

* fix linter errors

* fix errors again

* add quotes around heading with Liquid

* placeholder to get error fixed

* add quotes

* just remove thoose things

* typo

* Update 0-rc1.yml

* update with feedback

* add workflow beta

* upload increase

* some last changes

* change the date

* fix links

Co-authored-by: Sarah Schneider <sarahs@github.com>
Co-authored-by: Rachael Sewell <rachmari@github.com>

* Conflict resolution between 19082 and 3.1 Megabranch (#19158)

* Fix typo in new reusable

* delete 3.1 rest schema files

* Update OpenAPI Descriptions (#19166)

* last minute additions yikes

* redeploy staging

Co-authored-by: Melanie Yarbrough <11952755+myarb@users.noreply.github.com>
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com>
Co-authored-by: mchammer01 <42146119+mchammer01@users.noreply.github.com>
Co-authored-by: skedwards88 <skedwards88@github.com>
Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com>
Co-authored-by: Felicity Chapman <felicitymay@github.com>
Co-authored-by: Meg Bird <megbird@github.com>
Co-authored-by: Sarah Schneider <sarahs@github.com>
Co-authored-by: github-openapi-bot <69533958+github-openapi-bot@users.noreply.github.com>
2021-05-06 09:41:42 -07:00

4.5 KiB

title, shortTitle, intro, product, versions, topics
title shortTitle intro product versions topics
About CodeQL code scanning in your CI system Code scanning in your CI You can analyze your code with {% data variables.product.prodname_codeql %} in a third-party continuous integration system and upload the results to {% data variables.product.product_location %}. The resulting {% data variables.product.prodname_code_scanning %} alerts are shown alongside any alerts generated within {% data variables.product.product_name %}. {% data reusables.gated-features.code-scanning %}
free-pro-team enterprise-server github-ae
* >=3.0 *
Security

{% data reusables.code-scanning.beta %} {% data reusables.code-scanning.enterprise-enable-code-scanning %}

About {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %} in your CI system

{% data reusables.code-scanning.about-code-scanning %} For information, see "About {% data variables.product.prodname_code_scanning %}."

You can run {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %} within {% data variables.product.product_name %} using actions. Alternatively, if you use a third-party continuous integration or continuous delivery/deployment (CI/CD) system, you can run {% data variables.product.prodname_codeql %} analysis in your existing system and upload the results to {% data variables.product.product_location %}.

{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.0" or currentVersion == "github-ae@next" %} You add the {% data variables.product.prodname_codeql_cli %} or the {% data variables.product.prodname_codeql_runner %} to your third-party system, then call the tool to analyze code and upload the SARIF results to {% data variables.product.product_name %}. The resulting {% data variables.product.prodname_code_scanning %} alerts are shown alongside any alerts generated within {% data variables.product.product_name %}.

{% data reusables.code-scanning.upload-sarif-ghas %}

Comparing {% data variables.product.prodname_codeql_cli %} and {% data variables.product.prodname_codeql_runner %}

{% data reusables.code-scanning.what-is-codeql-cli %}

The {% data variables.product.prodname_codeql_runner %} is a command-line tool that uses the {% data variables.product.prodname_codeql_cli %} to analyze code and upload the results to {% data variables.product.product_name %}. The tool mimics the analysis run natively within {% data variables.product.product_name %} using actions. The runner is able to integrate with more complex build environments than the CLI, but this ability makes it more difficult and error-prone to set up. It is also more difficult to debug any problems. Generally, it is better to use the {% data variables.product.prodname_codeql_cli %} directly unless it doesn't support your use case.

Use the {% data variables.product.prodname_codeql_cli %} to analyze:

  • Dynamic languages, for example, JavaScript and Python.
  • Codebases with a compiled language that can be built with a single command or by running a single script.

For more information, see "Running {% data variables.product.prodname_codeql_cli %} in your CI system."

You will need to use the {% data variables.product.prodname_codeql_runner %} if you need to:

  • Set up the CI system to orchestrate compiler invocations as well as running {% data variables.product.prodname_codeql %} analysis.
  • Analyze more than one language in a repository.

{% data reusables.code-scanning.beta-codeql-runner %}

For more information, see "Running {% data variables.product.prodname_codeql_runner %} in your CI system."

{% else %}

{% data reusables.code-scanning.upload-sarif-ghas %}

You add the {% data variables.product.prodname_codeql_runner %} to your third-party system, then call the tool to analyze code and upload the SARIF results to {% data variables.product.product_name %}. The resulting {% data variables.product.prodname_code_scanning %} alerts are shown alongside any alerts generated within {% data variables.product.product_name %}.

{% data reusables.code-scanning.beta-codeql-runner %}

To set up code scanning in your CI system, see "Running {% data variables.product.prodname_codeql_runner %} in your CI system." {% endif %}