Setup
We have a large monorepo and generate individal cyclonedx sboms using several tools, then merge them all into a single hierachical sboms cyclonedx-cli merge --hierarchical, which we pass to sonar.sca.sbomImportPaths.
Error
Dependency analysis failed Learn more about dependency analysis opens in new tab
Error from dependency analysis service: 400. If needed,
contact your Sonar support rep and include the following information: acf6f606-dc46-43c5-94e4-36001cb1ac54
Root cause analysis
The 400 bad request is likely in fact a payload too large error.
In the monorepo we generate many sboms.
On release candidates it also generate images for both linux/arm64 and linux/amd64.
| Platform config | Image SBOMs | Source sboms | Total individual SBOMs |
|---|---|---|---|
| amd64 only | ~13 | +2 | ~15 |
| amd64+arm64 | ~26 | +2 | ~28 |
| Branch | RELEASE_CANDIDATE | platform | container SBOM deps | merged SBOM size |
SCA |
|---|---|---|---|---|---|
| master | false | amd64 only | 5,798 | 20MB | OK |
| a | false | amd64 only | 5,714 | 20MB | OK |
| b | true | amd64+arm64 | ~11,400? | ~35MB? | 400 |
| c | true | amd64+arm64 | 11,437 | 35MB | 400 |
So it seem there is likely a payload limit that is either a bug or intentional limit somewhere between 20 MB and 35 MB.
Questions
- Is there a documented payload size limit?
- Although less convenient, would splitting the SBOM into two files (e.g., one per platform) work around this limit?
- If this is an intentional limit, are there any plans to increase it or provide a clearer error message (e.g.,
413 Payload Too Large)?
Any help appreciated, ty!
