sentry icon indicating copy to clipboard operation
sentry copied to clipboard

Improve source module to have more robust text parsing

Open jasonrichardsmith opened this issue 7 years ago • 2 comments

Do you wish to add functionality to an existing sentry module? Make more robust options for text matching strategies for source module.

jasonrichardsmith avatar Aug 30 '18 07:08 jasonrichardsmith

We wrote this plugin for Docker itself, before ValidatingWebhooks were a thing.

We simply went with regex blacklists and whitelists, and an example config looks like this:

{
  "whitelist": [
    "^alpine:",
    "^docker\\.elastic\\.co/beats/filebeat:",
    "^gcr\\.io/google_containers",
    "^mysql:",
    "^nginx:",
    "^php:",
    "^apache:",
    "^quay\\.io/calico/cni",
    "^quay\\.io/calico/node",
    "^quay\\.io/coreos/flannel"
  ],
  "blacklist": [
    "^docker:"
  ],
  "defaultAllow": false
}

Anybody in this space can deal with regex and it is powerful enough.

towolf avatar Sep 09 '18 14:09 towolf

@towolf thanks for your input, I am still weighing the options. Your solution is probably the strongest contender.

jasonrichardsmith avatar Sep 14 '18 06:09 jasonrichardsmith