Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146585,9 +146585,6 @@ paths:
permissions:
- security_monitoring_findings_write
- appsec_vm_write
x-unstable: |-
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
/api/v2/security/findings/search:
post:
description: |-
Expand Down
1 change: 0 additions & 1 deletion examples/v2/security-monitoring/MuteSecurityFindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
)

configuration = Configuration()
configuration.unstable_operations["mute_security_findings"] = True
with ApiClient(configuration) as api_client:
api_instance = SecurityMonitoringApi(api_client)
response = api_instance.mute_security_findings(body=body)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
)

configuration = Configuration()
configuration.unstable_operations["mute_security_findings"] = True
with ApiClient(configuration) as api_client:
api_instance = SecurityMonitoringApi(api_client)
response = api_instance.mute_security_findings(body=body)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
)

configuration = Configuration()
configuration.unstable_operations["mute_security_findings"] = True
with ApiClient(configuration) as api_client:
api_instance = SecurityMonitoringApi(api_client)
response = api_instance.mute_security_findings(body=body)
Expand Down
1 change: 0 additions & 1 deletion src/datadog_api_client/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,6 @@ def __init__(
"v2.list_vulnerabilities": False,
"v2.list_vulnerable_assets": False,
"v2.mute_findings": False,
"v2.mute_security_findings": False,
"v2.run_historical_job": False,
"v2.search_security_monitoring_histsignals": False,
"v2.update_security_monitoring_dataset": False,
Expand Down
30 changes: 10 additions & 20 deletions tests/v2/features/security_monitoring.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2300,56 +2300,49 @@ Feature: Security Monitoring

@generated @skip @team:DataDog/k9-investigation
Scenario: Mute or unmute security findings returns "Accepted" response
Given operation "MuteSecurityFindings" enabled
And new "MuteSecurityFindings" request
Given new "MuteSecurityFindings" request
And body with value {"data": {"attributes": {"mute": {"description": "To be resolved later.", "expire_at": 1778721573794, "is_muted": true, "reason": "PENDING_FIX"}}, "id": "00000000-0000-0000-0000-000000000001", "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}}, "type": "mute"}}
When the request is sent
Then the response status is 202 Accepted

@generated @skip @team:DataDog/k9-investigation
Scenario: Mute or unmute security findings returns "Bad Request" response
Given operation "MuteSecurityFindings" enabled
And new "MuteSecurityFindings" request
Given new "MuteSecurityFindings" request
And body with value {"data": {"attributes": {"mute": {"description": "To be resolved later.", "expire_at": 1778721573794, "is_muted": true, "reason": "PENDING_FIX"}}, "id": "00000000-0000-0000-0000-000000000001", "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}}, "type": "mute"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/k9-investigation
Scenario: Mute or unmute security findings returns "Not Found" response
Given operation "MuteSecurityFindings" enabled
And new "MuteSecurityFindings" request
Given new "MuteSecurityFindings" request
And body with value {"data": {"attributes": {"mute": {"description": "To be resolved later.", "expire_at": 1778721573794, "is_muted": true, "reason": "PENDING_FIX"}}, "id": "00000000-0000-0000-0000-000000000001", "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}}, "type": "mute"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/k9-investigation
Scenario: Mute or unmute security findings returns "Unprocessable Entity" response
Given operation "MuteSecurityFindings" enabled
And new "MuteSecurityFindings" request
Given new "MuteSecurityFindings" request
And body with value {"data": {"attributes": {"mute": {"description": "To be resolved later.", "expire_at": 1778721573794, "is_muted": true, "reason": "PENDING_FIX"}}, "id": "00000000-0000-0000-0000-000000000001", "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}}, "type": "mute"}}
When the request is sent
Then the response status is 422 Unprocessable Entity

@team:DataDog/k9-investigation
Scenario: Mute security findings returns "Accepted" response
Given operation "MuteSecurityFindings" enabled
And new "MuteSecurityFindings" request
Given new "MuteSecurityFindings" request
And body with value {"data": {"attributes": {"mute": {"description": "To be resolved later.", "expire_at": 1778721573794, "is_muted": true, "reason": "RISK_ACCEPTED"}}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwMC0wYmd-MDE4NjcyMDJkMzE4MDE5ODY5MGE4ZmQ2MmFlMjg0Y2M=", "type": "findings"}]}}, "type": "mute"}}
When the request is sent
Then the response status is 202 Accepted

@team:DataDog/k9-investigation
Scenario: Mute security findings returns "Not Found" response
Given operation "MuteSecurityFindings" enabled
And new "MuteSecurityFindings" request
Given new "MuteSecurityFindings" request
And body with value {"data": {"attributes": {"mute": {"description": "To be resolved later.", "expire_at": 1778721573794, "is_muted": true, "reason": "RISK_ACCEPTED"}}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}}, "type": "mute"}}
When the request is sent
Then the response status is 404 Not Found

@team:DataDog/k9-investigation
Scenario: Mute security findings returns "Unprocessable Entity" response
Given operation "MuteSecurityFindings" enabled
And new "MuteSecurityFindings" request
Given new "MuteSecurityFindings" request
And body with value {"data": {"attributes": {"mute": {"description": "To be resolved later.", "expire_at": 1, "is_muted": true, "reason": "RISK_ACCEPTED"}}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}}, "type": "mute"}}
When the request is sent
Then the response status is 422 Unprocessable Entity
Expand Down Expand Up @@ -2573,24 +2566,21 @@ Feature: Security Monitoring

@team:DataDog/k9-investigation
Scenario: Unmute security findings returns "Accepted" response
Given operation "MuteSecurityFindings" enabled
And new "MuteSecurityFindings" request
Given new "MuteSecurityFindings" request
And body with value {"data": {"attributes": {"mute": {"description": "Resolved.", "is_muted": false, "reason": "NO_PENDING_FIX"}}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwMC0wYmd-MDE4NjcyMDJkMzE4MDE5ODY5MGE4ZmQ2MmFlMjg0Y2M=", "type": "findings"}]}}, "type": "mute"}}
When the request is sent
Then the response status is 202 Accepted

@team:DataDog/k9-investigation
Scenario: Unmute security findings returns "Not Found" response
Given operation "MuteSecurityFindings" enabled
And new "MuteSecurityFindings" request
Given new "MuteSecurityFindings" request
And body with value {"data": {"attributes": {"mute": {"description": "Resolved.", "is_muted": false, "reason": "NO_PENDING_FIX"}}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}}, "type": "mute"}}
When the request is sent
Then the response status is 404 Not Found

@team:DataDog/k9-investigation
Scenario: Unmute security findings returns "Unprocessable Entity" response
Given operation "MuteSecurityFindings" enabled
And new "MuteSecurityFindings" request
Given new "MuteSecurityFindings" request
And body with value {"data": {"attributes": {"mute": {"description": "Resolved.", "is_muted": false, "reason": "RISK_ACCEPTED"}}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}}, "type": "mute"}}
When the request is sent
Then the response status is 422 Unprocessable Entity
Expand Down