MISP / MISP/PyMISP

Attribute export not show Decay

Open
#879 3 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

Hello guys, i want to disable the ids flag if the Decay Score is 0, but i have a problem with my code.

When i try to include decay score in rest client on misp, i have the value:

"includeDecayScore": "true"

image

With this python code when i try to print "result", the output hasn,t the decay score.

result = misp.search('attributes', to_ids=1, includeDecayScore="True", pythonify=True)
print (result)
if 'Attribute' in result:
for attribute in result['Attribute']:
attribute_uuid = attribute['uuid']
event_id = attribute['event_id']
if int(attribute['score']) == 0:
misp.update_attribute( { 'uuid': attribute_uuid, 'to_ids': 0})

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 Python misp.search('attributes', to_ids=1, includeDecayScore="True", pythonify=True) request and inspect the returned result structure. Determine whether the REST response includes the decay score and define the expected attribute export behavior before adding a regression test or change.

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.