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

412 when submitting sbom #1439

Closed
shm-eboks opened this issue Sep 6, 2024 · 2 comments
Closed

412 when submitting sbom #1439

shm-eboks opened this issue Sep 6, 2024 · 2 comments
Labels
bug Something isn't working static-analysis Related to [sarif, sbom]

Comments

@shm-eboks
Copy link

shm-eboks commented Sep 6, 2024

Bug description

./datadog-ci sbom upload --service xxx --env ci --debug sbom.json
Processing file sbom.json
File is a valid CycloneDX 1.5 file
Uploading SBOM report in sbom.json
❌ Failed upload SBOM file [sbom.json]: Request failed with status code 412
API status code: 412

Describe what you expected

DD_API_KEY (is set and valid)
DD_APP_KEY (is set valid and has code_analysis_read enabled)
DD_SITE = datadoghq.eu

running datadog-ci version 2.42

running it currently locally AND from a non default branch azure devops pipeline

note: ado pipeline is running linux_amd64, locally i'm using darwin_arm64 - both are failing.

Steps to reproduce the issue

running this setup to install osv + ci binaries:

curl -L -o osv-scanner.zip https://github.com/DataDog/osv-scanner/releases/latest/download/osv-scanner_linux_amd64.zip
mkdir osv-scanner
unzip osv-scanner.zip -d ./osv-scanner

osv-scanner/osv-scanner --skip-git -r --experimental-only-packages --format=cyclonedx-1-5 --paths-relative-to-scan-dir  --output=sbom.json ./src

URL="https://github.com/DataDog/datadog-ci/releases/download/v2.42.0/datadog-ci_linux-x64"
OUTPUT="datadog-ci"
curl -L $URL -o $OUTPUT
chmod +x $OUTPUT
./datadog-ci sbom upload --service xxx --env ci --debug sbom.json

Additional context

No response

Command

None

@shm-eboks shm-eboks added the bug Something isn't working label Sep 6, 2024
@Drarig29 Drarig29 added the static-analysis Related to [sarif, sbom] label Sep 6, 2024
@dastrong
Copy link
Contributor

dastrong commented Sep 12, 2024

👋 @shm-eboks, since you're using Azure, your first upload must be from your git default branch.
https://docs.datadoghq.com/code_analysis/troubleshooting#results-are-not-being-surfaced-in-the-datadog-ui

@shm-eboks
Copy link
Author

i recommend you don't close this ticket yet - but be sure to instead of doing a catch-all error - you handle this error specifically and report that this is indeed the case in the cli.

i will try and do a run from the master branch and verify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working static-analysis Related to [sarif, sbom]
Projects
None yet
Development

No branches or pull requests

3 participants