-
Notifications
You must be signed in to change notification settings - Fork 475
[Flashpoint] Import CCM Alerts as Incidents #4025
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Flashpoint] Import CCM Alerts as Incidents #4025
Conversation
connector's state is set with the same logic as in other methods for consistency
filter to fetch only fresh CCM alerts from Flashpoint
add specific last run datetimes for each type of import
+ move mermaid diagrams
from pydantic import AliasPath, BaseModel, ConfigDict, Field | ||
|
||
|
||
class FrozenBaseModel(BaseModel): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works fine but I think there is no need to freeze you model here. Feel free to correct me otherwise !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it was better to freeze Flashpoint's objects to avoid modifying the data returned by their API, WDYT?
): | ||
compromised_credential_sighting = CompromisedCredentialSighting.model_validate( | ||
# Typical Compromised Credential Sighting in response to /search endpoint call | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a duplication of your data sample
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not quite sure if I understood correctly your comment, but I pushed a commit where I re-use the data sample in test_converter_to_stix.py. Let me know if it's not the expected fix ^^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this work @Powlinett !
The implemented features are clear, and the refactoring you did makes the code more robust and easier to read/maintain. The additional improvements, including the unit tests, the refactoring of the connector states management, and the various explanatory comments you added are very welcome !
…ates do not split import start dates by data types
if an error occurs while fetching data, the whole data batch is skipped (same behavior as Alerts import)
Proposed changes
FLASHPOINT_IMPORT_CCM_ALERTS
andFLASHPOINT_FRESH_CCM_ALERTS_ONLY
env/config varsimport_start_date
or connector's state last importCompromisedCredentialSighting
model and its submodelscredential-sighting
from Flashpoint (aka CCM Alerts) since defined dateCompromisedCredentialSighting
tostix2.Incident
and its related SCOs/SDOslast_run
datetimes by type of imports in connector's stateRelated issues
Checklist