Scan
Scan repository
post/scan/repository
Request
- Base URL/v1 (relative, and the document was published on a file host, not at the API’s origin)
- Authnone declared. Required headers: X-Auth-Token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
X-Auth-Tokenstring required
Request body
Example request
{
"request": {
"metadata": {
"source": "github",
"user": "user",
"job": "scan",
"workspace": "/local",
"function": "monitor",
"region": "West"
},
"registry": "https://registry.hub.docker.com/",
"username": "myusername",
"password": "mypassword",
"repository": "alpine",
"tag": "latest",
"base_image": "alpine"
}
}Response
Success
Example response
{
"report": {
"image_id": "d572b7ee3511b21a2b78b8915bc03c5786ad01949704c1418624224c4cae2c5f",
"registry": "https://registry.hub.docker.com/",
"repository": "alpine",
"tag": "latest",
"digest": "bd8ffa77cf1c910b7a90935ca4828472e1c3e303e7cd5260f13d1e09995f173a",
"size": 1,
"base_os": "ubuntu:16.04",
"cvedb_version": "1.00",
"cvedb_create_time": "2018-06-20T19:00:53Z",
"layers": [
{
"vulnerabilities": [
{
"name": "CVE-2015-8356",
"score": 7.2,
"severity": "High",
"description": "The setup_env function in group.c in sshd in OpenSSH allows local users to gain privileges.",
"package_name": "openssh",
"package_version": "7.2_p2-r0",
"fixed_version": "1:7.2p2-3",
"link": "https://security-tracker.debian.org/tracker/CVE-2015-8356",
"score_v3": 7.3,
"published_timestamp": 1516561260,
"last_modified_timestamp": 1516561253,
"in_base_image": true
}
],
"size": 1
}
],
"vulnerabilities": [
{
"name": "CVE-2015-8356",
"score": 7.2,
"severity": "High",
"description": "The setup_env function in group.c in sshd in OpenSSH allows local users to gain privileges.",
"package_name": "openssh",
"package_version": "7.2_p2-r0",
"fixed_version": "1:7.2p2-3",
"link": "https://security-tracker.debian.org/tracker/CVE-2015-8356",
"score_v3": 7.3,
"published_timestamp": 1516561260,
"last_modified_timestamp": 1516561253,
"in_base_image": true
}
],
"modules": [
{
"name": "scanner",
"version": "1.011",
"source": "github"
}
],
"labels": {
"value": "label_value"
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.