Closed yassine-ouaamou closed 3 months ago
FYI @Megafredo & @helene-nguyen
I don't think this problem is specifically linked to the Hygiene connector because :
I think the problem could occur with any enrichment connector and particularly when the user create an indicator with a date valid_until <= valid_from. It should not be possible to manually create an indicator with a valid_until <= valid_from date.
@richard-julien : any opinions ?
Dont know. The code is like this
validPeriod: validFrom.isSameOrBefore(validUntil)
So seems to be correct. Curious to see the exact bundle sent for absorption.
I have the impression that some indicators have no "valid from" at all. A customer sent us the export of one of his indicators that had raised this error and there was no "valid from" field at all. indicator_export.json
Maybe, in addition to the fact that the Hygiene connector shouldn't be affected by this, we're having a problem with the with the "valid from" date filling?
NB: if we modify the "valid_from" date manually, this time it's found in the STIX export
@romain-filigran @Lhorus6
It's not a connector issue and this result is the expected result if valid_until
and valid_from
are exactly the same because the valid_from
is deleted:
After some investigations, does it make sense if an indicator has the same value for both valid_until
and valid_from
?
Or do we really want to delete valid_from
as we need valid_from
for this validPeriod: validFrom.isSameOrBefore(validUntil)
@richard-julien ?
This PR may solved the issue:
Additionally to the changes, if we add 1sec for valid_until
in the case that the both value are the same may solve the issue too?
Description
When enriching an observable having already an indicator with Valid from equal to Valid until, we get an error
Environment
Demo (6.1.4)
Reproducible Steps
For the domain name, use one of these that doesn't exist on the platform: https://github.com/MISP/misp-warninglists/blob/main/lists/alexa/list.json
Steps to create the smallest reproducible scenario:
Create a new domain name indicator
Go to the corresponding observable
Launch a Hygiene enrichment
Expected Output
Enriched successfuly
Actual Output
Additional information
Screenshots (optional)