Commit Graph

200 Commits

Author SHA1 Message Date
Bader Boland
56bba70ef3 Add ability to exclude individual tests 2020-01-24 08:53:34 -05:00
Robert Brennan
bcc1cc5384 remove unused code 2020-01-14 14:50:35 +00:00
Robert Brennan
5ef97ae896 fix lint errors 2020-01-14 14:50:35 +00:00
Robert Brennan
dfa34e1880 explicitly handle schema validation errors 2020-01-14 14:50:35 +00:00
Robert Brennan
542694841a change resolveCheck signature 2020-01-14 14:50:35 +00:00
Robert Brennan
e6a44c6ff8 formatting change 2020-01-14 14:50:35 +00:00
Robert Brennan
7637108234 refactor ValidateContainers 2020-01-14 14:50:34 +00:00
Robert Brennan
23bf4c81b0 refactor ValidatePod, add NakedPod type 2020-01-14 14:50:34 +00:00
Robert Brennan
090700f641 minor tweaks 2020-01-14 14:50:34 +00:00
Robert Brennan
e129ba6971 fix dashboard after output change 2020-01-14 14:50:34 +00:00
Robert Brennan
51cd3523fc messages -> results 2020-01-14 14:50:34 +00:00
Robert Brennan
83a7448c99 add namespaces to controllers 2020-01-14 14:50:34 +00:00
Robert Brennan
d228acfe71 add object meta to controller interface 2020-01-14 14:50:34 +00:00
Robert Brennan
49c540e993 type -> kind 2020-01-14 14:50:34 +00:00
Robert Brennan
9f7caabef4 change message type to boolean 2020-01-14 14:50:34 +00:00
Robert Brennan
2770be643f Refactor validation 2020-01-14 14:50:34 +00:00
Robert Brennan
917e630697 move some tests 2020-01-02 20:49:51 +00:00
Robert Brennan
68166559c5 expand docs 2020-01-02 20:21:46 +00:00
Robert Brennan
fee55ba7f8 fix lint errors 2020-01-02 20:17:56 +00:00
Robert Brennan
57ff1d5c06 remove messages 2020-01-02 20:07:55 +00:00
Robert Brennan
f8d5ce70cf support schemas that use json strings 2020-01-02 18:59:11 +00:00
Robert Brennan
5f060801ef remove unused config structs 2020-01-02 17:58:22 +00:00
Robert Brennan
04da47d83e change input config to simplify things 2020-01-02 17:55:21 +00:00
Robert Brennan
5efa416ea9 implement custom checks, implement resource ranges as custom check 2020-01-02 17:55:21 +00:00
Robert Brennan
7b0fe81d01 implement capabilities checks in JSON schema 2020-01-02 17:55:21 +00:00
Robert Brennan
7cc0be4188 remove unused function 2019-12-23 21:16:59 +00:00
Robert Brennan
b0035158d2 fix lint errors 2019-12-23 20:57:48 +00:00
Robert Brennan
f7dccc079b move more security checks to jsonschema 2019-12-23 20:32:38 +00:00
Robert Brennan
ad3a8e6748 move runAsRootAllowed over to jsonschema 2019-12-23 20:32:38 +00:00
Robert Brennan
3fa627a2cd move networking checks over to json schema 2019-12-23 20:32:38 +00:00
Robert Brennan
30b49c4d7b implement image checks using json schema 2019-12-23 20:32:38 +00:00
Robert Brennan
f2c5752718 migrate health checks to schemas 2019-12-23 20:32:38 +00:00
Robert Brennan
d0dc7f4b0e simplify GetSupportedControllerFromString 2019-12-23 20:32:38 +00:00
Robert Brennan
3304285b4e move rest of pod checks over to schema 2019-12-23 20:32:38 +00:00
Robert Brennan
d80d326f7c swap out host_network for a schema-based check 2019-12-23 20:32:38 +00:00
Robert Brennan
0d86096f09 remove extensionsv1beta1 reference to support 1.16 (#229) 2019-12-06 11:03:38 -05:00
Robert Brennan
67ab987f7e Add support for annotation-based exemptions (#227)
* add controllers_to_scan to example config-full

* add support for annotation-based exemptions

* fix lint errors

* add docs
2019-12-06 08:29:30 -05:00
Robert Brennan
98b47e0aeb Fix resource success messages (#223)
* add success messages when resources are set

* add tests
2019-11-13 14:07:32 -05:00
Robert Brennan
4eeabb2c7f pass RunAsNonRoot if RunAsUser > 0 (#219) 2019-11-11 13:21:32 -05:00
MAKOSCAFEE
fc7c913122 update exemption rules and check controller name prefix 2019-11-07 19:16:06 +02:00
Robert Brennan
22ab851681 skip health checks for jobs, cronjobs, and initContainers (#216) 2019-11-06 13:31:17 -05:00
Robert Brennan
2b15f11d57 Add exemptions to config (#204)
* first pass at adding exemptions

* Update config.yaml

* make config_test more reliable

* add flag to disallow exemptions in dashboard

* add disallow-exemptions flag to CLI

* add comments

* fix exemptions flag

* fix alert on dashboard

* minor style changes
2019-10-23 17:14:03 -04:00
Adam Shannon
150b812371 pkg/dashboard: setup basePath as a path prefix in routing (#201) 2019-10-02 12:17:59 -04:00
Robert Brennan
434b1f604f Create capabilitiesAdded and capabilitiesDropped IDs (#207)
* ensure check IDs are unique

* create capabilitiesAdded and capabilitiesDropped check IDs
2019-10-02 08:51:47 -04:00
Robert Brennan
c91a85a08a add IDs to each check (#197) 2019-09-11 14:07:08 -04:00
Will Ledingham
b8422a93b7 Wl/stored audits (#188)
* added ability to run dashboard from a stored audit result file.

* added ability to run dashboard from a stored audit result file.

* more changes

* debugging

* de

* all working as anticipated locally

* .

* updated way of decoding YAML/JSON files.

* remmoved unneded code

* renamed fn names, moved logic around and cleaned up main.go

* deleted output files from weird places.

* deleted test file
2019-08-14 17:20:19 -04:00
Will Ledingham
467ab945cd Wl/webhook test (#182)
* Added testing for webhook using KIND

* fixed branching error

* added tests to CircleCI

* added tests to CircleCI

* attempt to stop failing circleci test

* moved location of testing for webhook in CircleCI

* debugging

* more debugging

* .

* .

* added download of webhook to test

* ..

* ...

* corrected sleep comand

* .

* .

* code working now, clean up

* testing smaller sleep times

* increased sleep time

* responded to comments on github

* .

* debug

* more edits

* debugging second test failing.

* debugging

* tests doing opposite of what they should be debugging.

* debugging

* .

* .

* fixing error in installation of webhook.

* .

* timeout increase

* trying to install webhook

* .

* .

* webhook still not i installing properly

* ..

* ..

* add log message

* ..

* changed order of test_k8s, removed set -e

* ..

* namespace polaris

* .

* .......

* intial testing for new strategy.

* intial testing for new strategy.

* .

* ...

* final edits, working now

* fixed files, cleaned up logs, added more detail to webhook starting documentation.

* ?

* added test files for other controller types, adding testing for them in webhook_test.sh

* increased sleep time

* testing

* finally added tests for jobs

* changed while loop condition to include webhook.

* .

* lskdfsjkl

* sd

* lskfjlskj

* .

* final

* added timeout test for dashboard to try to aleviate error

* .

* .

* install the dashboard

* ...

* initial test for new kube_dashboard_test

* initial test for new kube_dashboard_test

* ?

* deleting unused code

* final change for dashboard test

* final
2019-08-09 16:00:55 -04:00
Nick Huanca
75f70352ba Additional Pod Controller Scans (#166)
**Changes**

- Refactored the way controllers work to be an interface
- Added configurable controllers to include in scans
- Added daemonsets, jobs and cronjobs in scans
- Added `ReplicationController` type controllers to the supported list
- Adjusted logic for failed YAML parsing to bubble up errors
- Added better logic for calculating summaries on cluster wide results
- Relocated responsibilities for counting types into validators vs spreading it around more packages
- Fixed bug where cronjob parsing was using wrong KIND
- Added fixtures for mocking new controller types
- Added example yamls to test scanning files
- Added functions to NamespacedResult(s) to reduce code complexity deep set iterations
- Refactored how results get added to namespacedresults so adding more later is easier
- Minor signature changes for interface implementing structs for controllers
2019-07-31 15:56:27 -06:00
Will Ledingham
fae7a9fc17 Merge branch 'master' into wl/config-URL 2019-07-30 17:02:02 -04:00
Will Ledingham
79b0a00d5c more edits 2019-07-30 16:59:11 -04:00