Auto Sigma Manager
psengine.malware_intel.auto_sigma_mgr.AutoSigmaMgr
¶
Manages requests for Recorded Future Malware Intelligence API Auto Sigma feature.
| PARAMETER | DESCRIPTION |
|---|---|
rf_token
|
Recorded Future API token.
TYPE:
|
Source code in psengine/malware_intel/auto_sigma_mgr.py
create_rule_job
¶
create_rule_job(
name: str,
query: str,
start_date: str,
end_date: str | None = None,
) -> AutoSigmaJobCreateOut
Create a new Auto Sigma rule generation job.
| PARAMETER | DESCRIPTION |
|---|---|
name
|
The name of the Auto Sigma job.
TYPE:
|
query
|
The query used to select files to build rules for.
TYPE:
|
start_date
|
The earliest date to include in the query.
TYPE:
|
end_date
|
The latest date to include in the query.
TYPE:
|
Endpoint
/malware-intelligence/v1/auto-sigma/jobs
| RAISES | DESCRIPTION |
|---|---|
ValidationError
|
If any supplied parameter is of incorrect type. |
AutoSigmaJobCreationError
|
If API error occurs. |
| RETURNS | DESCRIPTION |
|---|---|
AutoSigmaJobCreateOut
|
Job creation confirmation containing the job ID. |
Source code in psengine/malware_intel/auto_sigma_mgr.py
fetch_rule_jobs
¶
fetch_rule_jobs(
limit: int | None = DEFAULT_LIMIT,
) -> AutoSigmaJobsOut
Fetch all Auto Sigma rule generation jobs created by the user.
| PARAMETER | DESCRIPTION |
|---|---|
limit
|
Maximum number of jobs to return.
TYPE:
|
Endpoint
/malware-intelligence/v1/auto-sigma/get_jobs
| RAISES | DESCRIPTION |
|---|---|
ValidationError
|
If any supplied parameter is of incorrect type. |
AutoSigmaFetchJobsError
|
If API error occurs. |
| RETURNS | DESCRIPTION |
|---|---|
AutoSigmaJobsOut
|
The list of Auto Sigma rule generation jobs created by the user. |
Source code in psengine/malware_intel/auto_sigma_mgr.py
fetch_rule_job_result
¶
fetch_rule_job_result(
job_id: str, wait_until_finished: bool = False
) -> AutoSigmaJobOut
Fetch the result of a specific Auto Sigma rule generation job.
A newly created job typically moves through CREATED and then RUNNING while
Sigma rules and patterns are being generated.
| PARAMETER | DESCRIPTION |
|---|---|
job_id
|
The job ID to fetch.
TYPE:
|
wait_until_finished
|
When true, keep polling until the job status is FINISHED.
TYPE:
|
The terminal statuses are
FAILED: generation failed.FINISHED: generation succeeded.
Endpoint
/malware-intelligence/v1/auto-sigma/jobs/{job_id}
| RAISES | DESCRIPTION |
|---|---|
ValidationError
|
If any supplied parameter is of incorrect type. |
AutoSigmaFetchJobError
|
If API error occurs or if polling times out / job fails. |
| RETURNS | DESCRIPTION |
|---|---|
AutoSigmaJobOut
|
The details of the requested Sigma rule job. |
Source code in psengine/malware_intel/auto_sigma_mgr.py
edit_rule_str
¶
edit_rule_str(
job_id: str,
rule_id: str,
yaml_str: str | None = None,
status: str | None = None,
) -> AutoSigmaJobEditOut
Edit an existing Auto Sigma rule within a job by modifying its YAML rule string.
| PARAMETER | DESCRIPTION |
|---|---|
job_id
|
The job ID to which the Auto Sigma rule belongs.
TYPE:
|
rule_id
|
The Auto Sigma rule ID to change.
TYPE:
|
yaml_str
|
New Sigma rule YAML to apply.
TYPE:
|
status
|
New Sigma rule status to apply. Supported values: - True Positive, - False Positive, - Benign Behavior, - No Root Cause, - Needs Tuning, - New.
TYPE:
|
Endpoint
/malware-intelligence/v1/auto-sigma/jobs/{job_id}/{rule_id}
| RAISES | DESCRIPTION |
|---|---|
ValidationError
|
If any supplied parameter is of incorrect type. |
AutoSigmaJobEditError
|
If API error occurs. |
| RETURNS | DESCRIPTION |
|---|---|
AutoSigmaJobEditOut
|
Edit confirmation |
Source code in psengine/malware_intel/auto_sigma_mgr.py
delete_rule_job
¶
delete_rule_job(job_id: str) -> AutoSigmaJobDeleteOut
Delete a created Auto Sigma job and its generated Sigma rules.
| PARAMETER | DESCRIPTION |
|---|---|
job_id
|
The job ID to delete.
TYPE:
|
Endpoint
/malware-intelligence/v1/auto-sigma/jobs/{job_id}
| RAISES | DESCRIPTION |
|---|---|
ValidationError
|
If any supplied parameter is of incorrect type. |
AutoSigmaJobDeletionError
|
If API error occurs. |
| RETURNS | DESCRIPTION |
|---|---|
AutoSigmaJobDeleteOut
|
A confirmation of deletion. |
Source code in psengine/malware_intel/auto_sigma_mgr.py
retry_failed_rule_job
¶
retry_failed_rule_job(job_id: str) -> AutoSigmaJobRetryOut
Retry a failed Auto Sigma rule generation job.
| PARAMETER | DESCRIPTION |
|---|---|
job_id
|
The job ID to retry.
TYPE:
|
Endpoint
/malware-intelligence/v1/auto-sigma/jobs/{job_id}/retry
| RAISES | DESCRIPTION |
|---|---|
ValidationError
|
If any supplied parameter is of incorrect type. |
AutoSigmaJobRetryError
|
If API error occurs. |
| RETURNS | DESCRIPTION |
|---|---|
AutoSigmaJobRetryOut
|
A confirmation of retry. |