Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Run Datadog SCA in CI #2636

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitlab-ci.yml
Expand Up @@ -15,3 +15,4 @@ include:
- ".gitlab/benchmarks.yml"
- ".gitlab/macrobenchmarks.yml"
- ".gitlab/test-apps.yml"
- local: ".gitlab/software_composition_analysis.yaml"
19 changes: 19 additions & 0 deletions .gitlab/software_composition_analysis.yaml
@@ -0,0 +1,19 @@
datadog-sca-ci:
stage: benchmarks
tags: ["arch:amd64"]
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/datadog-static-analyzer:2024031801
when: always
# We don't want to disrupt the pipeline so let's fail silently.
allow_failure: true
# This specifies the job does not have any dependency, meaning it can start as soon as it can.
needs: []
script:
# Disabling tracing to avoid leaking secrets.
# See https://www.gnu.org/software/bash/manual/bash.html#The-Set-Builtin:
# "Using ‘+’ rather than ‘-’ causes these options to be turned off"
- set +o xtrace
- export DD_API_KEY=$(aws ssm get-parameter --region us-east-1 --name "ci.dd-trace-go.datadog_api_key_org2" --with-decryption --query "Parameter.Value" --out text)
- export DD_APP_KEY=$(aws ssm get-parameter --region us-east-1 --name "ci.dd-trace-go.datadog_app_key_org2" --with-decryption --query "Parameter.Value" --out text)
- set -o xtrace
- osv-scanner --skip-git --recursive --experimental-only-packages --format=cyclonedx-1-4 --output=/tmp/sbom.json .
- datadog-ci sbom upload --service integrations-core --env ci /tmp/sbom.json

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you set the service to dd-trace-go please?

5 changes: 4 additions & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Expand Up @@ -30,4 +30,7 @@ go.sum

# Gitlab configuration
.gitlab-ci.yml @DataDog/dd-trace-go-guild @DataDog/apm-core-reliability-and-performance
/.gitlab-ci @DataDog/dd-trace-go-guild @DataDog/apm-core-reliability-and-performance
/.gitlab-ci @DataDog/dd-trace-go-guild @DataDog/apm-core-reliability-and-performance

# Security
/.gitlab/software_composition_analysis.yaml @DataDog/software-integrity-and-trust