MISP / MISP/PyMISP

Event creation and publishing with python program

Open
#826 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
491
Forks
290
Avg merge
2d 8h
Merged PRs (30d)
3

Description

I'm successfully creating events via python, but due to performance issues, I create the events with published=False and in a separate process, I change all the events to published=True. The problem is that the events are not published automatically.
Here's part of the code used:

for i in range(max_line):
    me = misp.get_event(uuid_list[i], pythonify=True)
    me.published = True
    misp.update_event(me, uuid_list[i])
    me.publish()

result:
Event #16418
...
Published YesN/A
#Attributes 1 (0 Objects)
First recorded change 2022-02-15 10:29:09
Last change 2022-02-15 10:29:10

In this scenario, the event is not being published/distributed to other instances.

Does anyone have any suggestions to fix this problem?

thanks

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported sequence with get_event, update_event, and publish using the example code in the issue. Trace how the client handles changing published and triggering publication, then verify that the event is distributed to other instances as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.