PyMISP
PyMISP copied to clipboard
Adding a local tag to an event updates its last change timestamp
PyMISP Version 2.4.155.1
Issue
I was trying to add a local tag to an event using misp.update_event
call and it also updated the last change
timestamp.
Expected outcome:
- Changes to any local tags should not update the
last change
timestamp
It looks like the server rejects the request if timestamp is not updated :(.
Have set the __force_timestamps = True
and resubmit the request and received,
Event could not be saved. Event in the request not newer than the local copy.
Do we have plans to implement an update_event_tag
method that hits the MISP /events/addTag
endpoint?
@Rafiot I would like to push a fix for this. Can you please add me as a contributor to the project?
You can always do a pull request if you want to contribute to the project.
Have you tried this method: https://github.com/MISP/PyMISP/blob/main/pymisp/api.py#L3443 ? It should do all you need and can be used of attributes or events.
I'll play with it to make sure the timestamp isn't updated but if it is, it is a bug we'll fix.
Yep, confirmed, you can use the tag
method and if you pass local=True
it won't update the timestamp.
I just tested it too. It is working. Couldn't find that endpoint documented in https://www.misp-project.org/openapi
Let's add @righel in the loop for that last point.
@Rafiot When I try to push a branch remote: Permission to MISP/PyMISP.git denied to dragsu.
yes, you need to make a fork, push to your own repository and then make a pull request