MISP / MISP/PyMISP

PyMISP.search does not allow searching for attributes with first_seen as None

Open
#1,131 4 comments 1 reaction 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 would like to search for attributes that do not have a set first_seen value (value set to None).

When using the PyMISP search functions as follows:
pymisp.search(controller='attributes', first_seen=None)

The returned results are all attributes. If any integer value is supplied that's not a period such as '24h', then all the attributes WITH a first_seen value are returned.

Is there a way to search for attributes ONLY with a first_seen value of None? Can this be implemented if not available now? Also if possible, the args first_seen and last_seen should be added to the documentation under the search function as they do work.

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 at the pymisp.search entry point for controller='attributes' and trace how first_seen=None is converted into the request. Reproduce the shown searches, then check the search function documentation for first_seen and last_seen. Done means the None filter returns only attributes without first_seen and both arguments are documented.

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
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.