Skip to content

Commit

Permalink
Merge branch 'master' into kevinzou/readme_updates
Browse files Browse the repository at this point in the history
  • Loading branch information
nkzou authored Mar 28, 2024
2 parents ab8837f + 2b9c33b commit d187f28
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-03-27 22:12:41.503072",
"spec_repo_commit": "85625198"
"regenerated": "2024-03-28 14:36:52.852799",
"spec_repo_commit": "a462e143"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-03-27 22:12:41.520431",
"spec_repo_commit": "85625198"
"regenerated": "2024-03-28 14:36:52.870334",
"spec_repo_commit": "a462e143"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ async fn main() {
CloudWorkloadSecurityAgentRuleCreateData::new(
CloudWorkloadSecurityAgentRuleCreateAttributes::new(
r#"exec.file.name == "sh""#.to_string(),
"my_agent_rule".to_string(),
"examplecloudworkloadsecurity".to_string(),
)
.description("My Agent rule".to_string())
.enabled(true),
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-03-08T14:19:01.846Z
2024-03-28T13:57:47.808Z
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"request": {
"body": {
"string": "{\"data\":{\"attributes\":{\"description\":\"My Agent rule\",\"enabled\":true,\"expression\":\"exec.file.name == sh\",\"name\":\"my_agent_rule\"},\"type\":\"agent_rule\"}}",
"string": "{\"data\":{\"attributes\":{\"description\":\"My Agent rule\",\"enabled\":true,\"expression\":\"exec.file.name == sh\",\"name\":\"testcreateacsmthreatsagentrulereturnsbadrequestresponse1711634267\"},\"type\":\"agent_rule\"}}",
"encoding": null
},
"headers": {
Expand All @@ -19,7 +19,7 @@
},
"response": {
"body": {
"string": "{\"errors\":[\"input_validation_error(Field 'expression' is invalid: rule `my_agent_rule` error: rule compilation error: field `sh` not found)\"]}",
"string": "{\"errors\":[\"input_validation_error(Field 'expression' is invalid: rule `testcreateacsmthreatsagentrulereturnsbadrequestresponse1711634267` error: rule compilation error: field `sh` not found)\"]}",
"encoding": null
},
"headers": {
Expand All @@ -32,7 +32,7 @@
"message": "Bad Request"
}
},
"recorded_at": "Fri, 08 Mar 2024 14:19:01 GMT"
"recorded_at": "Thu, 28 Mar 2024 13:57:47 GMT"
}
],
"recorded_with": "VCR 6.0.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-03-08T14:19:02.357Z
2024-03-28T13:57:48.169Z
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"request": {
"body": {
"string": "{\"data\":{\"attributes\":{\"description\":\"My Agent rule\",\"enabled\":true,\"expression\":\"exec.file.name == \\\"sh\\\"\",\"name\":\"my_agent_rule\"},\"type\":\"agent_rule\"}}",
"string": "{\"data\":{\"attributes\":{\"description\":\"My Agent rule\",\"enabled\":true,\"expression\":\"exec.file.name == \\\"sh\\\"\",\"name\":\"testcreateacsmthreatsagentrulereturnsokresponse1711634268\"},\"type\":\"agent_rule\"}}",
"encoding": null
},
"headers": {
Expand All @@ -19,7 +19,7 @@
},
"response": {
"body": {
"string": "{\"data\":{\"id\":\"zer-ow9-d4q\",\"type\":\"agent_rule\",\"attributes\":{\"category\":\"Process Activity\",\"creationDate\":1709907542607,\"creator\":{\"name\":\"Malo Le Goff\",\"handle\":\"[email protected]\"},\"defaultRule\":false,\"description\":\"My Agent rule\",\"enabled\":true,\"expression\":\"exec.file.name == \\\"sh\\\"\",\"filters\":[\"os == \\\"linux\\\"\"],\"name\":\"my_agent_rule\",\"updateDate\":1709907542607,\"updater\":{\"name\":\"Malo Le Goff\",\"handle\":\"[email protected]\"}}}}",
"string": "{\"data\":{\"id\":\"kll-o34-int\",\"type\":\"agent_rule\",\"attributes\":{\"category\":\"Process Activity\",\"creationDate\":1711634268228,\"creator\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"defaultRule\":false,\"description\":\"My Agent rule\",\"enabled\":true,\"expression\":\"exec.file.name == \\\"sh\\\"\",\"filters\":[\"os == \\\"linux\\\"\"],\"name\":\"testcreateacsmthreatsagentrulereturnsokresponse1711634268\",\"updateDate\":1711634268228,\"updater\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}",
"encoding": null
},
"headers": {
Expand All @@ -32,7 +32,7 @@
"message": "OK"
}
},
"recorded_at": "Fri, 08 Mar 2024 14:19:02 GMT"
"recorded_at": "Thu, 28 Mar 2024 13:57:48 GMT"
},
{
"request": {
Expand All @@ -43,7 +43,7 @@
]
},
"method": "delete",
"uri": "https://api.datadoghq.com/api/v2/remote_config/products/cws/agent_rules/zer-ow9-d4q"
"uri": "https://api.datadoghq.com/api/v2/remote_config/products/cws/agent_rules/kll-o34-int"
},
"response": {
"body": {
Expand All @@ -60,7 +60,7 @@
"message": "No Content"
}
},
"recorded_at": "Fri, 08 Mar 2024 14:19:02 GMT"
"recorded_at": "Thu, 28 Mar 2024 13:57:48 GMT"
}
],
"recorded_with": "VCR 6.0.0"
Expand Down
4 changes: 2 additions & 2 deletions tests/scenarios/features/v2/cloud_workload_security.feature
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Feature: Cloud Workload Security
@team:DataDog/k9-cloud-security-platform @team:DataDog/k9-cws-backend
Scenario: Create a CSM Threats Agent rule returns "Bad Request" response
Given new "CreateCSMThreatsAgentRule" request
And body with value {"data": {"attributes": {"description": "My Agent rule", "enabled": true, "expression": "exec.file.name == sh", "name": "my_agent_rule"}, "type": "agent_rule"}}
And body with value {"data": {"attributes": {"description": "My Agent rule", "enabled": true, "expression": "exec.file.name == sh", "name": "{{ unique_lower_alnum }}"}, "type": "agent_rule"}}
When the request is sent
Then the response status is 400 Bad Request

Expand All @@ -27,7 +27,7 @@ Feature: Cloud Workload Security
@team:DataDog/k9-cloud-security-platform @team:DataDog/k9-cws-backend
Scenario: Create a CSM Threats Agent rule returns "OK" response
Given new "CreateCSMThreatsAgentRule" request
And body with value {"data": {"attributes": {"description": "My Agent rule", "enabled": true, "expression": "exec.file.name == \"sh\"", "name": "my_agent_rule"}, "type": "agent_rule"}}
And body with value {"data": {"attributes": {"description": "My Agent rule", "enabled": true, "expression": "exec.file.name == \"sh\"", "name": "{{ unique_lower_alnum }}"}, "type": "agent_rule"}}
When the request is sent
Then the response status is 200 OK

Expand Down

0 comments on commit d187f28

Please sign in to comment.