KubiScan icon indicating copy to clipboard operation
KubiScan copied to clipboard

Static Scan

Open redcatsec opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe.

some time's you as Pen-Tester or Read Team Member get access to Role Definition Yaml Files and would like to do a static scan on them.

Describe the solution you would like

implementing Static Scan without the use of the API Kubernetes Client implementing Parser for YAML File

Todo's

role.py : add parse method to create role object from a yaml file rule.py : add parse method to create role object from a yaml file subject : add parse method to create role object from a yaml file utils.py : add get_roles_by_kind_from_file(kind) that open file and parse all Yaml File and create objects from the data utils.py : add get_risky_role_by_kind_from_file(kind,roles) same as get_risky_role_by_kind but using get_roles_by_kind_from_file kubiscan.py : add args for the new feature

redcatsec avatar Mar 04 '22 09:03 redcatsec

Hi @aasyria,

Thank you for your suggestion, this is a great idea, like offline scan. I will need to see how we can do it because this is something that will require time.

Meanwhile, we have other tool called "kubernetes-rbac-audit" which work on offline roles, this is I think exactly what you need. Please see if this provides you a workaround for now.

g3rzi avatar Mar 06 '22 09:03 g3rzi

Hi @aasyria,

Thank you for your suggestion, this is a great idea, like offline scan. I will need to see how we can do it because this is something that will require time.

Meanwhile, we have other tool called "kubernetes-rbac-audit" which work on offline roles, this is I think exactly what you need. Please see if this provides you a workaround for now.

yes something like this . you can just try to merge both tools togther.

redcatsec avatar Mar 09 '22 09:03 redcatsec