* New Crowdin translations by Github Action * Reset broken translated files to English * Ran script/i18n/homogenize-frontmatter.js * Ran script/fix-translation-errors.js * Reverted translated files with parsing and rendering errors * fix malformed liquid * add next directory to exclude list * currentversion -> currentVersion * fix liquid errors * fix liquid errors * Reset broken translated files to English * Ran script/i18n/homogenize-frontmatter.js * Revert /ja/github/authenticating-to-github/about-authentication-with-saml-single-sign-on * Reset known broken translation files LAST * Run script/i18n/homogenize-frontmatter.js Co-authored-by: Crowdin Bot <support+bot@crowdin.com> Co-authored-by: Rachael Sewell <rachmari@github.com> Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
5.6 KiB
title, shortTitle, intro, product, redirect_from, versions, topics
| title | shortTitle | intro | product | redirect_from | versions | topics | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Ejecutarel escaneo de código de CodeQL en un contenedor | {% data variables.product.prodname_code_scanning_capc %} en un contenedor | Puedes ejecutar el {% data variables.product.prodname_code_scanning %} en un contenedor si garantizas que todos los procesos se ejecutan en el mismo contenedor. | {% data reusables.gated-features.code-scanning %} |
|
|
|
{% data reusables.code-scanning.beta %}
Acerca del {% data variables.product.prodname_code_scanning %} con una compilación en contenedor
Si estás configurando el {% data variables.product.prodname_code_scanning %} para un lenguaje compilado, y estás compilando el código en un ambiente contenido, el análisis podría fallar con el mensaje de error "No source code was seen during the build". Esto indica que {% data variables.product.prodname_codeql %} no fue capaz de monitorear tu código mientras se compilaba.
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.0" or currentVersion == "github-ae@next" %} You must run {% data variables.product.prodname_codeql %} inside the container in which you build your code. This applies whether you are using the {% data variables.product.prodname_codeql_cli %}, the {% data variables.product.prodname_codeql_runner %}, or {% data variables.product.prodname_actions %}. For the {% data variables.product.prodname_codeql_cli %} or the {% data variables.product.prodname_codeql_runner %}, see "Running {% data variables.product.prodname_codeql_cli %} in your CI system" or "Running {% data variables.product.prodname_codeql_runner %} in your CI system" for more information. Si estás utilizando {% data variables.product.prodname_actions %}, configura tu flujo de trabajo para ejecutar todas las acciones en el mismo contenedor. Para obtener más información, consulta la sección "Ejemplo de flujo de trabajo". {% else %} You must run {% data variables.product.prodname_codeql %} inside the container in which you build your code. This applies whether you are using the {% data variables.product.prodname_codeql_runner %} or {% data variables.product.prodname_actions %}. For the {% data variables.product.prodname_codeql_runner %}, see "Running {% data variables.product.prodname_codeql_runner %} in your CI system" for more information. Si estás utilizando {% data variables.product.prodname_actions %}, configura tu flujo de trabajo para ejecutar todas las acciones en el mismo contenedor. Para obtener más información, consulta la sección "Ejemplo de flujo de trabajo". {% endif %}
Dependencias
Es posible que tengas alguna dificultad para ejecutar el {% data variables.product.prodname_code_scanning %} si el contenedor que estás utilizando carece de ciertas dependencias (Por ejemplo, Git debe instalarse y agregarse a la variable PATH). Si te encuentras con algún problema en las dependencias, revisa la lista de software que habitualmente se incluye en los ambientes virtuales de {% data variables.product.prodname_dotcom %}. Para obtener más información, consulta los archivos readme específicos de la versión en estas ubicaciones:
- Linux: https://github.com/actions/virtual-environments/tree/main/images/linux
- macOS: https://github.com/actions/virtual-environments/tree/main/images/macos
- Windows: https://github.com/actions/virtual-environments/tree/main/images/win
Ejemplo de flujo de trabajo
Este flujo de trabajo de muestra utiliza {% data variables.product.prodname_actions %} para ejecutar un análisis de {% data variables.product.prodname_codeql %} en un ambiente contenido. El valor de container.image identifica el contenedor que se debe utilizar. En este ejemplo, se le llama a la imagen codeql-container, con una etiqueta de f0f91db. Para obtener más información, consulta la sección "Sintaxis de flujo de trabajo para {% data variables.product.prodname_actions %}".
name: "{% data variables.product.prodname_codeql %}"
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '15 5 * * 3'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.1" or currentVersion == "github-ae@next" %}
permissions:
security-events: write
actions: read{% endif %}
strategy:
fail-fast: false
matrix:
language: [java]
# Specify the container in which actions will run
container:
image: codeql-container:f0f91db
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Initialize {% data variables.product.prodname_codeql %}
uses: github/codeql-action/init@v1
with:
languages: {% raw %}${{ matrix.language }}{% endraw %}
- name: Build
run: |
./configure
make
- name: Perform {% data variables.product.prodname_codeql %} Analysis
uses: github/codeql-action/analyze@v1