DataDog / datadog-ci

Use Datadog from your CI.
https://datadoghq.com
Apache License 2.0
128 stars 55 forks source link

Failed upload SBOM file [trivy.json]: Request failed with status code 400 #1257

Open finchr opened 7 months ago

finchr commented 7 months ago

Bug description

Hi, I get the following error when attempting to run a sbom upload, any help would be appreciated!

$ DD_SERVICE=api DD_ENV=dev datadog-ci sbom upload --debug trivy.json Processing file trivy.json File is a valid CycloneDX 1.5 file license for component anyio not found license for component asgiref not found license for component asttokens not found license for component atomicwrites not found license for component attrs not found license for component auth0-python not found license for component boto3-stubs not found license for component boto3 not found license for component botocore-stubs not found license for component botocore not found license for component bytecode not found license for component cattrs not found license for component certifi not found license for component cffi not found license for component charset-normalizer not found license for component click not found license for component colorama not found license for component coverage not found license for component cryptography not found license for component ddsketch not found license for component ddtrace not found license for component debugpy not found license for component devtools not found license for component envier not found license for component exceptiongroup not found license for component executing not found license for component fastapi not found license for component greenlet not found license for component h11 not found license for component haversine not found license for component httpcore not found license for component httpx not found license for component idna not found license for component iniconfig not found license for component JSON-log-formatter not found license for component jsonschema not found license for component mypy-boto3-sqs not found license for component packaging not found license for component pluggy not found license for component protobuf not found license for component psycopg2 not found license for component py not found license for component pycparser not found license for component pydantic not found license for component PyJWT not found license for component pyparsing not found license for component pyrsistent not found license for component pytest-cov not found license for component pytest not found license for component python-dateutil not found license for component python-dotenv not found license for component python_multipart not found license for component requests not found license for component six not found license for component sniffio not found license for component SQLAlchemy-Utils not found license for component SQLAlchemy not found license for component starlette not found license for component tenacity not found license for component time-machine not found license for component tomli not found license for component types-awscrt not found license for component types-cryptography not found license for component types-s3transfer not found license for component typing_extensions not found license for component urllib3 not found license for component uvicorn not found license for component xmltodict not found Uploading SBOM report in trivy.json ❌ Failed upload SBOM file [trivy.json]: Request failed with status code 400 API status code: 400

Describe what you expected

The command would run without a 400 error.

Steps to reproduce the issue

export DD_API_KEY=xxxx export DD_APP_KEY=yyyy export DD_SITE="us5.datadoghq.com" DD_SERVICE=api DD_ENV=dev datadog-ci sbom upload --debug trivy.json

Additional context

Command

None

dastrong commented 7 months ago

👋 Hey @finchr, could you please try one of these (1) install the Datadog GitHub App and upload again (2) upload the results from your default branch

trooliveira commented 5 months ago

Hi. I have the same problem, but I receive the 500 error. I don't have my repositories on github, but on bitbucket. What do I do for fixing that problem?

AndrewCharlesHay commented 2 months ago

I also have this issue on GitLab