Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
0xJeti opened this issue Jan 2, 2022 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@0xJeti
Copy link
Contributor

0xJeti commented Jan 2, 2022

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.)

@honoki
Copy link
Owner

honoki commented Jan 2, 2022

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 honoki added the enhancement New feature or request label Jan 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants