Construct a dependency scan JSON payload
mainTo audit dependencies, you must construct a JSON batch request object. The payload contains a requests array. Each request must use either a versionKey (if the exact version is known) or a packageKey (if the version is unknown or a range is used).
Input Requirements
system: The ecosystem name. Must be uppercase:NPM,PYPI,MAVEN,GO,CARGO,NUGET, orRUBYGEMS.name: The canonical name of the package (e.g.,org.apache.logging.log4j:log4j-corefor Maven, or normalized lowercase for PyPI/NuGet).version: The explicit version string.- DO NOT use version ranges (e.g.,
^1.0.0is invalid). - Only include this field if you know the exact version.
- DO NOT use version ranges (e.g.,
{
"requests": [
{
"versionKey": {
"system": "NPM",
"name": "express",
"version": "4.17.1"
}
},
{
"packageKey": {
"system": "PYPI",
"name": "requests"
}
}
]
}