---
# System prepended metadata

title: Reporter

---

# Reporter 

## aim
0. identify possible security gaps
1. recommend policies
2. keep performance impact in mind

## Based on container image
```
karmor report --image "homeassistant:latest" --yamldir "policies"
    ... yamldir will contain the set of recommended policies
```

```go
func handleImage(img string) error {
    // get the details of the image
    
    if isLinuxDistro() {
        // add set of rules
        // Add certificate policy
    }
    
    if isAlpineDistro() {
        // add set of policies
        // Add /sbin/
    }
}
```

1. Audit /sbin/ ... reason
2.     Block access to following folders recursively:
```
        /usr/share/ca-certificates
        /etc/ssl/
        recursive: true
```
Block process execution
```
/usr/sbin/update-ca-certificates
```

namespace
    deployment/workload
        Application
            1. Description: audit access to `/sbin/` 
               Reason: sbin contains maintainance tools .... (tooltip)
               ...
            2. 
  

## Based on k8s manifest
```
karmor report -f deployment.yaml
```
1. based on container images ... recommend polices
2. based on volume mount points ... 
3. k8s secrets ... audit k8s secrets

## Based on runtime behavior
```
karmor report -n namespace -l "app=wordpress"
```
1. based on container images ... recommend polices
2. based on volume mount points ... 
3. k8s secrets ... we see these bins accessing these k8s-secrets ... 
4. Processes -> 80% of bins never used ... 10% are risky .. audit policy recommended

## Based on kube-bench/trivy
<todo>future</todo>
1. mapping it to compliance, mitre TTPs
2. STIG hardening 


## Output 

markdown => html/pdf
html =

### design 

[How do we want to structure the final report?]

[common way to report an output]
Reporting API

[image scanner]
[k8s scanner]
[runtime scanner]
