Add Robot test for running kube-hunter
[validation.git] / tests / k8s / kube-hunter / kube-hunter.robot
1 ##############################################################################
2 # Copyright (c) 2020 AT&T Intellectual Property.                             #
3 # Copyright (c) 2020 Nokia.                                                  #
4 #                                                                            #
5 # Licensed under the Apache License, Version 2.0 (the "License");            #
6 # you maynot use this file except in compliance with the License.            #
7 #                                                                            #
8 # You may obtain a copy of the License at                                    #
9 #       http://www.apache.org/licenses/LICENSE-2.0                           #
10 #                                                                            #
11 # Unless required by applicable law or agreed to in writing, software        #
12 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT  #
13 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.           #
14 # See the License for the specific language governing permissions and        #
15 # limitations under the License.                                             #
16 ##############################################################################
17
18
19 *** Settings ***
20 Documentation     Hunt for security weaknesses in Kubernetes cluster
21 Resource          kube-hunter.resource
22
23
24 *** Test Cases ***
25 Cluster Remote Scanning
26     Run Cluster Scan
27     Should Discover No Vulnerabilities
28
29 Node Remote Scanning
30     Run Node Scan
31     Should Discover No Vulnerabilities
32
33 Inside-a-Pod Scanning
34     [Setup]  Run Keywords  Onboard Image
35     ...                    Prepare Job Manifest
36     Run Scan Within Pod
37     Should Discover No Vulnerabilities
38     [Teardown]  Run Keywords  Delete Scan Job
39     ...                       Close All Connections