mirror of
https://github.com/kubescape/kubescape.git
synced 2026-04-15 06:58:11 +00:00
chore: clean up unused files
This commit is contained in:
@@ -1,339 +0,0 @@
|
||||
basePath: /
|
||||
consumes:
|
||||
- application/json
|
||||
definitions:
|
||||
NotificationPolicyKind:
|
||||
type: string
|
||||
x-go-package: github.com/armosec/opa-utils/httpserver/apis/v1
|
||||
PostScanRequest:
|
||||
description: A request to trigger a Kubescape scan
|
||||
properties:
|
||||
account:
|
||||
description: |-
|
||||
A Kubescape account ID to use for scanning.
|
||||
|
||||
Same as `kubescape scan --account`.
|
||||
example: d13791eb-19b1-4222-867b-9a7c1799cfac
|
||||
format: uuid4
|
||||
type: string
|
||||
x-go-name: Account
|
||||
failThreshold:
|
||||
description: |-
|
||||
Threshold for a failing score.
|
||||
|
||||
Scores higher that the provided value will be considered failing.
|
||||
example: 42
|
||||
format: float
|
||||
type: number
|
||||
x-go-name: FailThreshold
|
||||
format:
|
||||
default: json
|
||||
description: Format of the results. Same as `kubescape scan --format`
|
||||
example: json
|
||||
type: string
|
||||
x-go-name: Format
|
||||
hostScanner:
|
||||
description: |-
|
||||
Deploy the Kubescape K8s host-scanner
|
||||
|
||||
Deploys the Armo K8s Host Scanner DeamonSet in the scanned cluster (same as `kubescape scan --enable-host-scan`). Collects data from certain controls.
|
||||
example: true
|
||||
type: boolean
|
||||
x-go-name: HostScanner
|
||||
keepLocal:
|
||||
description: |-
|
||||
Do not submit results to Kubescape Cloud.
|
||||
|
||||
Same as `kubescape scan --keep-local`
|
||||
type: boolean
|
||||
x-go-name: KeepLocal
|
||||
targetNames:
|
||||
default: all
|
||||
description: |-
|
||||
Name of the scan targets.
|
||||
|
||||
For example, if you select `targetType: "framework"`, you can trigger a scan using the NSA and MITRE ATT&CK Framework by passing `targetNames: ["nsa, "mitre"]`.
|
||||
example:
|
||||
- nsa
|
||||
- mitre
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
x-go-name: TargetNames
|
||||
targetType:
|
||||
$ref: '#/definitions/NotificationPolicyKind'
|
||||
useCachedArtifacts:
|
||||
description: Use the cached artifacts instead of downloading (offline support)
|
||||
example: false
|
||||
type: boolean
|
||||
x-go-name: UseCachedArtifacts
|
||||
type: object
|
||||
x-go-package: github.com/armosec/opa-utils/httpserver/meta/v1
|
||||
Response:
|
||||
properties:
|
||||
id:
|
||||
description: ID of the scan
|
||||
example: d13791eb-19b1-4222-867b-9a7c1799cfac
|
||||
format: uuid4
|
||||
type: string
|
||||
x-go-name: ID
|
||||
response:
|
||||
description: The actual Response object
|
||||
example:
|
||||
some: other
|
||||
type: object
|
||||
x-go-name: Response
|
||||
type:
|
||||
description: |-
|
||||
Type of this response
|
||||
id IDScanResponseType Deprecated: will return busy/notBusy instead
|
||||
error ErrorScanResponseType A response contains an error message
|
||||
v1results ResultsV1ScanResponseType A response contains a v1 Results object
|
||||
busy BusyScanResponseType A response indicates that a server is busy with another request
|
||||
notBusy NotBusyScanResponseType A response indicates server is not busy with another request
|
||||
ready ReadyScanResponseType A response indicates that a server has successfully completed the request
|
||||
enum:
|
||||
- id
|
||||
- error
|
||||
- v1results
|
||||
- busy
|
||||
- notBusy
|
||||
- ready
|
||||
example: busy
|
||||
type: string
|
||||
x-go-enum-desc: |-
|
||||
id IDScanResponseType Deprecated: will return busy/notBusy instead
|
||||
error ErrorScanResponseType A response contains an error message
|
||||
v1results ResultsV1ScanResponseType A response contains a v1 Results object
|
||||
busy BusyScanResponseType A response indicates that a server is busy with another request
|
||||
notBusy NotBusyScanResponseType A response indicates server is not busy with another request
|
||||
ready ReadyScanResponseType A response indicates that a server has successfully completed the request
|
||||
x-go-name: Type
|
||||
type: object
|
||||
x-go-package: github.com/armosec/opa-utils/httpserver/meta/v1
|
||||
info:
|
||||
description: 'The Kubescape Microservice API allows clients to interact with a Kubescape
|
||||
instance running in a Kubernetes cluster: trigger scans, retrieve and delete their
|
||||
results, enable exporting metrics to Prometheus etc.'
|
||||
title: Kubescape Microservice
|
||||
version: 1.0.0
|
||||
paths:
|
||||
/livez:
|
||||
get:
|
||||
description: Returns the liveness status of the Kubescape microservice.
|
||||
operationId: getLiveness
|
||||
responses:
|
||||
"200":
|
||||
$ref: '#/responses/livenessProbeOK'
|
||||
summary: Returns Kubescape’s liveness status
|
||||
tags:
|
||||
- metrics
|
||||
/readyz:
|
||||
get:
|
||||
description: Returns the readiness status of the Kubescape microservice.
|
||||
operationId: getReadiness
|
||||
responses:
|
||||
"200":
|
||||
$ref: '#/responses/readinessProbeOK'
|
||||
summary: Returns Kubescape’s readiness status
|
||||
tags:
|
||||
- metrics
|
||||
/v1/metrics:
|
||||
get:
|
||||
description: Enables support for Prometheus metrics, runs a scan and returns
|
||||
its result in Prometheus metrics format.
|
||||
operationId: getMetrics
|
||||
responses:
|
||||
"200":
|
||||
$ref: '#/responses/enableMetricsResponse'
|
||||
summary: Returns current scan metrics in Prometheus format
|
||||
tags:
|
||||
- metrics
|
||||
/v1/results:
|
||||
delete:
|
||||
description: Deletes Kubescape scan results from storage.
|
||||
operationId: deleteScanResults
|
||||
parameters:
|
||||
- description: ID of the requested scan. If empty or not provided, defaults
|
||||
to the latest scan.
|
||||
in: query
|
||||
name: id
|
||||
type: string
|
||||
x-go-name: ScanID
|
||||
- default: false
|
||||
description: |-
|
||||
Keep the results in local storage after returning them.
|
||||
|
||||
By default, the Kubescape Microservice will delete scan results.
|
||||
in: query
|
||||
name: keep
|
||||
type: boolean
|
||||
x-go-name: KeepResults
|
||||
- default: false
|
||||
description: Whether to delete all results
|
||||
in: query
|
||||
name: all
|
||||
type: boolean
|
||||
x-go-name: AllResults
|
||||
responses:
|
||||
"200":
|
||||
$ref: '#/responses/scanResponse'
|
||||
"400":
|
||||
$ref: '#/responses/scanResponse'
|
||||
summary: Deletes results of a scan
|
||||
tags:
|
||||
- scanning
|
||||
get:
|
||||
description: Returns the results of Kubescape scans
|
||||
operationId: getScanResults
|
||||
parameters:
|
||||
- description: ID of the requested scan. If empty or not provided, defaults
|
||||
to the latest scan.
|
||||
in: query
|
||||
name: id
|
||||
type: string
|
||||
x-go-name: ScanID
|
||||
- default: false
|
||||
description: |-
|
||||
Keep the results in local storage after returning them.
|
||||
|
||||
By default, the Kubescape Microservice will delete scan results.
|
||||
in: query
|
||||
name: keep
|
||||
type: boolean
|
||||
x-go-name: KeepResults
|
||||
responses:
|
||||
"200":
|
||||
$ref: '#/responses/scanResponse'
|
||||
"204":
|
||||
$ref: '#/responses/scanResponse'
|
||||
"400":
|
||||
$ref: '#/responses/scanResponseError'
|
||||
summary: Returns results of a scan
|
||||
tags:
|
||||
- scanning
|
||||
/v1/scan:
|
||||
post:
|
||||
description: The server will return a scan ID and execute the scan.
|
||||
operationId: triggerScan
|
||||
parameters:
|
||||
- default: false
|
||||
description: Wait for scanning to complete (synchronous request)
|
||||
in: query
|
||||
name: wait
|
||||
type: boolean
|
||||
x-go-name: ReturnResults
|
||||
- default: false
|
||||
description: Do not delete results after returning (relevant only for synchronous
|
||||
requests)
|
||||
in: query
|
||||
name: keep
|
||||
type: boolean
|
||||
x-go-name: KeepResults
|
||||
- description: Scan parameters
|
||||
in: body
|
||||
name: Body
|
||||
schema:
|
||||
$ref: '#/definitions/PostScanRequest'
|
||||
responses:
|
||||
"200":
|
||||
$ref: '#/responses/scanResponse'
|
||||
"400":
|
||||
$ref: '#/responses/scanResponse'
|
||||
"500":
|
||||
$ref: '#/responses/scanResponse'
|
||||
summary: Triggers a Kubescape scan
|
||||
tags:
|
||||
- scanning
|
||||
/v1/status:
|
||||
get:
|
||||
description: |-
|
||||
Returns the current status of a scan with a given ID: whether it completed or not. Intended for asynchronous scanning, so you can check when a result is ready and fetch the results.
|
||||
|
||||
When a scan is in progress, the response's `type` will be `busy`. When a scan is complete, `type` is `notBusy`.
|
||||
operationId: getStatus
|
||||
parameters:
|
||||
- description: ID of the scan to check
|
||||
format: uuid4
|
||||
in: query
|
||||
name: scanID
|
||||
type: string
|
||||
x-go-name: ScanID
|
||||
responses:
|
||||
"200":
|
||||
$ref: '#/responses/scanResponse'
|
||||
summary: Returns a scan’s status
|
||||
tags:
|
||||
- scanning
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
enableMetricsResponse:
|
||||
description: Provided Prometheus metrics
|
||||
schema:
|
||||
type: string
|
||||
livenessProbeOK:
|
||||
description: Kubescape Microservice API is alive
|
||||
readinessProbeOK:
|
||||
description: Kubescape Microservice API is ready to serve requests
|
||||
scanResponse:
|
||||
description: A Scan Response object
|
||||
schema:
|
||||
$ref: '#/definitions/Response'
|
||||
scanResponseError:
|
||||
description: ""
|
||||
schema:
|
||||
allOf:
|
||||
- properties:
|
||||
id:
|
||||
description: ID of the scan
|
||||
example: d13791eb-19b1-4222-867b-9a7c1799cfac
|
||||
format: uuid4
|
||||
type: string
|
||||
x-go-name: ID
|
||||
response:
|
||||
description: The actual Response object
|
||||
example:
|
||||
some: other
|
||||
type: object
|
||||
x-go-name: Response
|
||||
type:
|
||||
description: |-
|
||||
Type of this response
|
||||
id IDScanResponseType Deprecated: will return busy/notBusy instead
|
||||
error ErrorScanResponseType A response contains an error message
|
||||
v1results ResultsV1ScanResponseType A response contains a v1 Results object
|
||||
busy BusyScanResponseType A response indicates that a server is busy with another request
|
||||
notBusy NotBusyScanResponseType A response indicates server is not busy with another request
|
||||
ready ReadyScanResponseType A response indicates that a server has successfully completed the request
|
||||
enum:
|
||||
- id
|
||||
- error
|
||||
- v1results
|
||||
- busy
|
||||
- notBusy
|
||||
- ready
|
||||
example: busy
|
||||
type: string
|
||||
x-go-enum-desc: |-
|
||||
id IDScanResponseType Deprecated: will return busy/notBusy instead
|
||||
error ErrorScanResponseType A response contains an error message
|
||||
v1results ResultsV1ScanResponseType A response contains a v1 Results object
|
||||
busy BusyScanResponseType A response indicates that a server is busy with another request
|
||||
notBusy NotBusyScanResponseType A response indicates server is not busy with another request
|
||||
ready ReadyScanResponseType A response indicates that a server has successfully completed the request
|
||||
x-go-name: Type
|
||||
type: object
|
||||
- properties:
|
||||
response:
|
||||
example: '"an error occurred"'
|
||||
type: object
|
||||
x-go-name: Resp
|
||||
type:
|
||||
example: error
|
||||
type: string
|
||||
x-go-name: Type
|
||||
type: object
|
||||
schemes:
|
||||
- http
|
||||
swagger: "2.0"
|
||||
Reference in New Issue
Block a user