-
Notifications
You must be signed in to change notification settings - Fork 4
/
openapi.yml
109 lines (109 loc) · 2.64 KB
/
openapi.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
swagger: "2.0"
info:
description: "This is an API to scan docker images for security vulnerabilities. The source code is available in [GitHub](https://github.com/abhisek/container-image-scanner-api)"
version: "1.0.0"
title: "Container Image Scanner API"
license:
name: "MIT"
url: "https://github.com/abhisek/container-image-scanner-api/blob/master/LICENSE"
host: "public-api-services.kubectl.in"
basePath: "/container-image-scanner-api/v1"
tags:
- name: "scan"
description: "A Scanner Job"
schemes:
- "https"
paths:
/scans:
post:
tags:
- "scan"
summary: "Submit new scan"
description: ""
operationId: "submitScan"
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- in: "body"
name: "body"
description: "Scan object that needs to be submitted for scan"
required: true
schema:
$ref: "#/definitions/ScanRequest"
responses:
405:
description: "Invalid input"
/scans/{scanId}:
get:
description: "Returns a single scan"
produces:
- "application/json"
parameters:
- name: "scanId"
in: "path"
description: "ID of scan to return"
required: true
type: "integer"
format: "int64"
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/ScanResponse"
400:
description: "Invalid ID supplied"
404:
description: "Scan not found"
/scans/{scanId}/status:
post:
tags:
- "scan"
summary: "Check scan status"
produces:
- "application/json"
parameters:
- name: "scanId"
in: "path"
description: "ID of scan"
required: true
type: "integer"
format: "int64"
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/ScanStatus"
definitions:
ScanResponse:
type: "object"
properties:
id:
type: "string"
vulnerabilities:
type: object
audit:
type: object
ScanStatus:
type: "object"
properties:
status:
type: "string"
enum:
- NEW
- IN-PROGRESS
- COMPLETED
- ERROR
ScanRequest:
type: "object"
properties:
image:
type: "string"
description: "The image to be scanned"
username:
type: "string"
description: "Registry authentication (username)"
password:
type: "string"
description: "Registry authentication (password)"