jfrog / kubexray

JFrog KubeXray scanner on Kubernetes
Apache License 2.0
25 stars 9 forks source link

Add support for SNS #24

Closed gbvanrenswoude closed 5 years ago

gbvanrenswoude commented 5 years ago

We'd like to automate actions based on the scan results. Being able to push to SNS would be very useful.

ankushchadha commented 5 years ago

Thanks @gbvanrenswoude for filing feature requests. Can you give a few examples?

kubexray currently sends notifications only to slack.

gbvanrenswoude commented 5 years ago

Hey @ankushchadha, thanks for the reply,

Instead of sending it to Slack we'd like to be able to send it to SNS. The message can be the same (more or less) but in JSON, detailing some stuff like

{
  "Pod": "some-pod-from-app1",
  "Namespace": "app1",
  "Action": "Ignored",
  "Reason": "Major security issue",
  "Affected components": "artifactory.company.com:443/app1image:master"
}

Maybe there can be some optional config in the xray_config.yaml like the sns details and optional AWS access keys. We probably prefer to use KIAM annotations but whatever works.

For coding maybe https://docs.aws.amazon.com/sdk-for-go/api/service/sns/#SNS.Publish ?

Let me know if I misinterpreted your question!