bbrf-client icon indicating copy to clipboard operation
bbrf-client copied to clipboard

Alerts are not sent when exactly the same message was sent before

Open 0xJeti opened this issue 4 years ago • 1 comments

Hi @honoki,

Spamming with issues :)

I'm not sure if this was your intention but when two alerts are sent via bbrf alert with the same message e.g.

bbrf alert test
bbrf alert test

only first message will be stored in CouchDB. Second attempt results in CouchDB returning error: b'[{"id":"test","error":"conflict","reason":"Document update conflict."}]\n'

That's because document _id is set to message value that is not always unique.

Will it break something when alert _id will be auto-generated? (UUIDv4, timestamp etc.)

0xJeti avatar Jan 02 '22 19:01 0xJeti

It was a deliberate design choice to use the alert strings as the unique identifier, so as to avoid adding duplicate findings when a tool is triggering the same findings more than once. However, I'm not convinced that it was a good choice :)

I'll leave this issue open to invite some thoughts about the matter; maybe it is worth changing this to work with CouchDB's auto-generated ids instead as you suggest.

honoki avatar Jan 02 '22 20:01 honoki