5GSEC / nimbus

Intent driven security automation framework
Apache License 2.0
25 stars 10 forks source link

feat: Add DiscoveredPolicy adapter #228

Open anurag-rajawat opened 4 months ago

anurag-rajawat commented 4 months ago

Description

Fixes #85

To test this PR locally

Describe the nimbuspolicy to know which policies are created.

  $ k describe np network-segmentation-for-ns
  Name:         network-segmentation-for-ns
  Namespace:    default
  Labels:       <none>
  Annotations:  <none>
  API Version:  intent.security.nimbus.com/v1alpha1
  Kind:         NimbusPolicy
  Metadata:
    Creation Timestamp:  2024-07-19T12:48:55Z
    Generation:          1
    Owner References:
      API Version:           intent.security.nimbus.com/v1alpha1
      Block Owner Deletion:  true
      Controller:            true
      Kind:                  SecurityIntentBinding
      Name:                  network-segmentation-for-ns
      UID:                   315e126d-b47a-446b-aa24-750757328185
    Resource Version:        115494
    UID:                     6e500f25-52d2-437f-a830-4e97ae9cba28
  Spec:
    Rules:
      Id:  netSegment
      Rule:
        Action:  Audit
    Selector:
      Match Labels:
        App:  httpd
  Status:
    Adapter Policies:
      NetworkPolicy/autopol-egress-2464079254
      KubeArmorPolicy/autopol-system-266430746
    Last Updated:                2024-07-19T12:48:55Z
    Number Of Adapter Policies:  2
    Status:                      Created
  Events:                        <none>

Does this PR introduce a breaking change? No.

Checklist

Additional information for reviewer

Mention if this PR is part of any design or a continuation of previous PRs

nandhued commented 1 month ago

Depends on https://github.com/accuknox/dev2/pull/160