이 페이지는 아직 한국어로 제공되지 않습니다. 번역 작업 중입니다. 현재 번역 프로젝트에 대한 질문이나 피드백이 있으신 경우 언제든지 연락주시기 바랍니다.
Run a Datadog Software Composition Analysis (SCA) job in your GitLab CI/CD pipelines.
Datadog Software Composition Analysis CI jobs are only supported on push event triggers. Other event triggers (for example, pull_request) are not supported and can cause issues with the product.
Environment variables
Configure the following environment variables in your GitLab CI/CD settings.
Name
Description
Required
Default
DD_API_KEY
Your Datadog API key. This key is created by your Datadog organization and should be stored as a secret.
Yes
DD_APP_KEY
Your Datadog application key. This key is created by your Datadog organization, must include the code_analysis_read scope, and should be stored as a secret.
Add the following to your .gitlab-ci.yml file, or place it in an include section.
.gitlab-ci.yml
# Ensure stages definition is only defined in the root .gitlab-ci.yml file.stages:- software_composition_analysisvariables:DD_SITE:"datadoghq.com"DD_APP_KEY:"$DD_APP_KEY"DD_API_KEY:"$DD_API_KEY"datadog_software_composition_analysis:stage:software_composition_analysisimage:node:ltsscript:- apt-get update && apt-get install -y curl unzip- npm install -g @datadog/datadog-ci- export DATADOG_SBOM_GENERATOR_URL="https://github.com/DataDog/datadog-sbom-generator/releases/latest/download/datadog-sbom-generator_linux_amd64.zip"- mkdir -p /datadog-sbom-generator- curl -L -o /datadog-sbom-generator/datadog-sbom-generator.zip $DATADOG_SBOM_GENERATOR_URL- unzip /datadog-sbom-generator/datadog-sbom-generator.zip -d /datadog-sbom-generator- chmod 755 /datadog-sbom-generator/datadog-sbom-generator# Scanning the current repository; adjust the scan directory as needed.- /datadog-sbom-generator/datadog-sbom-generator scan --output=/tmp/sbom.json .- datadog-ci sbom upload /tmp/sbom.json
The snippet uses the x86_64 Linux version of Datadog’s SBOM generator. If you’re using a different OS or architecture, update the DATADOG_SBOM_GENERATOR_URL accordingly.
1
2
rulesets:- %!s(<nil>) # Rules to enforce .
맞춤형 데모 요청
Datadog 시작하기
Datadog Docs AIYour use of this AI-powered assistant is subject to our Privacy Policy. Please do not submit sensitive or personal information.