Manager
psengine.collective_insights.collective_insights.CollectiveInsights
¶
Class for interacting with the Recorded Future Collective Insights API.
| PARAMETER | DESCRIPTION |
|---|---|
rf_token
|
Recorded Future API token.
TYPE:
|
Source code in psengine/collective_insights/collective_insights.py
submit
¶
submit(
insight: Insight | list[Insight],
debug: bool = True,
organization_ids: list | None = None,
) -> InsightsIn
Submit a detection or insight to the Recorded Future Collective Insights API.
| PARAMETER | DESCRIPTION |
|---|---|
insight
|
A detection or list of detections to submit. |
debug
|
Whether the submission should appear in the SecOPS dashboard.
TYPE:
|
organization_ids
|
List of organization IDs.
TYPE:
|
Endpoint
collective-insights/detections
| RAISES | DESCRIPTION |
|---|---|
CollectiveInsightsError
|
If connection error occurs. |
ValidationError
|
If any supplied parameter is of incorrect type. |
| RETURNS | DESCRIPTION |
|---|---|
InsightsIn
|
Response from the Recorded Future API. |
Source code in psengine/collective_insights/collective_insights.py
create
¶
create(
ioc_value: str,
ioc_type: str,
timestamp: str,
detection_type: str,
detection_sub_type: str | None = None,
detection_id: str | None = None,
detection_name: str | None = None,
ioc_field: str | None = None,
ioc_source_type: str | None = None,
incident_id: str | None = None,
incident_name: str | None = None,
incident_type: str | None = None,
mitre_codes: list[str] | str | None = None,
malwares: list[str] | str | None = None,
**kwargs,
) -> Insight
Create a new Insight object.
| PARAMETER | DESCRIPTION |
|---|---|
ioc_value
|
The value of the IOC.
TYPE:
|
ioc_type
|
The type of the IOC.
TYPE:
|
timestamp
|
The timestamp associated with the detection as ISO 8601.
TYPE:
|
detection_type
|
The type of the detection.
TYPE:
|
detection_sub_type
|
The subtype of the detection.
TYPE:
|
detection_id
|
The ID of the detection.
TYPE:
|
detection_name
|
The name of the detection.
TYPE:
|
ioc_field
|
The field in which the IOC was detected.
TYPE:
|
ioc_source_type
|
The source type of the IOC.
TYPE:
|
incident_id
|
The ID of the incident.
TYPE:
|
incident_name
|
The name of the incident.
TYPE:
|
incident_type
|
The type of the incident.
TYPE:
|
mitre_codes
|
MITRE ATT&CK technique or tactic codes.
TYPE:
|
malwares
|
Associated malware family or names.
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
ValidationError
|
If any supplied parameter is of incorrect type. |
| RETURNS | DESCRIPTION |
|---|---|
Insight
|
The created Insight object. |
Source code in psengine/collective_insights/collective_insights.py
search
¶
search(
indicator_type: list[str]
| str
| Presence
| None = None,
detection_type: list[str]
| str
| Presence
| None = None,
submission_method: list[str]
| str
| Presence
| None = None,
organizations: list[str] | str | None = None,
detection_rule_id: list[str]
| str
| Presence
| None = None,
detection_time_from: str | datetime | None = None,
detection_time_to: str | datetime | None = None,
malware_id: list[str] | str | Presence | None = None,
mitre_code_id: list[str] | str | Presence | None = None,
threat_actor_id: list[str]
| str
| Presence
| None = None,
atop_use_case: list[str] | str | Presence | None = None,
atop_profile_id: list[str]
| str
| Presence
| None = None,
atop_job_id: list[str] | str | Presence | None = None,
integration_type_id: list[str]
| str
| Presence
| None = None,
indicator_risk_score: dict
| Literal['present', 'absent']
| None = None,
max_results: int = Field(ge=1, default=DEFAULT_LIMIT),
page_size: int = Field(
ge=1, le=SEARCH_MAX_LIMIT, default=SEARCH_PAGE_SIZE
),
) -> list[SearchEntry]
Search enriched Collective Insights events.
| PARAMETER | DESCRIPTION |
|---|---|
indicator_type
|
IOC type filter (
TYPE:
|
detection_type
|
Detection method filter (
TYPE:
|
submission_method
|
Submission method filter (
TYPE:
|
organizations
|
Filter by organization IDs (uhash).
TYPE:
|
detection_rule_id
|
Filter by associated detection rule IDs.
TYPE:
|
detection_time_from
|
Start of the detection time range (inclusive).
TYPE:
|
detection_time_to
|
End of the detection time range (inclusive).
TYPE:
|
malware_id
|
Filter by associated malware entity IDs.
TYPE:
|
mitre_code_id
|
Filter by associated MITRE ATT&CK IDs (prefixed with
TYPE:
|
threat_actor_id
|
Filter by associated threat actor entity IDs.
TYPE:
|
atop_use_case
|
Filter by Autonomous Threat Operations use case (
TYPE:
|
atop_profile_id
|
Filter by Autonomous Threat Operations profile ID.
TYPE:
|
atop_job_id
|
Filter by Autonomous Threat Operations job ID.
TYPE:
|
integration_type_id
|
Filter by integration type entity IDs.
TYPE:
|
indicator_risk_score
|
Filter by indicator risk score at detection time. Pass
TYPE:
|
max_results
|
Maximum number of events to return.
TYPE:
|
page_size
|
Number of events per page (max 1000).
TYPE:
|
Endpoint
collective-insights/search
| RAISES | DESCRIPTION |
|---|---|
CollectiveInsightsSearchError
|
If connection error occurs. |
ValidationError
|
If any supplied parameter is of incorrect type. |
| RETURNS | DESCRIPTION |
|---|---|
list[SearchEntry]
|
Enriched events matching the search criteria. |
Source code in psengine/collective_insights/collective_insights.py
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 | |