Skip to content
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

AWS GuardDuty UDI Connector #1525

Conversation

SharmilaMS-Hcl
Copy link
Contributor

  1. Added files for AWS GuardDuty UDI Connector module
  2. Added the following files related to PR Framework Changes for Handling Nested List of Dictionaries #1516 to avoid CI failures.
    1. json_to_stix_translator.py
    2. gcp chronicle Read me, to-stix and unit test case files
    3. Reaqta unit test case file.
  3. Updated stix_shifter.py file for handling serialization failure of datetime.datetime object.

1. Added files for AWS GuardDuty UDI Connector module
2. Added the following files related to PR opencybersecurityalliance#1516  to avoid CI failures.
   1. json_to_stix_translator.py
   2. gcp chronicle Read me, to-stix and unit test case files
   3.  Reaqta unit test case file.
3.  Updated stix_shifter.py file for handling serialization failure of datetime.datetime object.
@codecov
Copy link

codecov bot commented Jul 11, 2023

Codecov Report

Patch coverage: 93.42% and project coverage change: +0.22 🎉

Comparison is base (60c24b2) 85.32% compared to head (c324de0) 85.55%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1525      +/-   ##
===========================================
+ Coverage    85.32%   85.55%   +0.22%     
===========================================
  Files          672      682      +10     
  Lines        54088    55564    +1476     
===========================================
+ Hits         46152    47536    +1384     
- Misses        7936     8028      +92     
Impacted Files Coverage Δ
...es/aws_guardduty/stix_transmission/boto3_client.py 25.00% <25.00%> (ø)
...les/aws_guardduty/stix_translation/transformers.py 66.66% <66.66%> (ø)
...es/aws_guardduty/stix_transmission/error_mapper.py 85.00% <85.00%> (ø)
...ws_guardduty/stix_translation/query_constructor.py 91.31% <91.31%> (ø)
...dules/aws_guardduty/stix_transmission/connector.py 92.57% <92.57%> (ø)
...ix_translation/test_aws_guardduty_stix_to_query.py 99.53% <99.53%> (ø)
stix_shifter_modules/aws_guardduty/entry_point.py 100.00% <100.00%> (ø)
...aws_guardduty/stix_translation/query_translator.py 100.00% <100.00%> (ø)
...tix_translation/test_aws_guardduty_json_to_stix.py 100.00% <100.00%> (ø)
...duty/tests/stix_transmission/test_aws_guardduty.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

},
"detector_ids": {
"label": "Detector Ids",
"description": "Detector id of the GuardDuty"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Description needs to be more clear. According to this comment #1516 (comment)

You may have to show an example of how to specify the ids.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the description of the detector id with an example.

Updated file with detailed description for Detector Ids
},
"AccountId": [
{
"key": "x-aws.account_id",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all the x-aws mappings can go under x-aws-resource

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically, x-aws-resource has been used to map the affected resources in the finding. Since account id and region are related to AWS cloud subscription and common to all findings, these fields are mapped under separate object x-aws. Kindly let us know, your comments in this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think its unnecessary to create x-aws object just for accounts. Account information are basically related to aws resources so I think x-aws-resource should be the right object unless there are multiple account ids mapped.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the mappings as suggested.

SharmilaMS-Hcl and others added 3 commits July 14, 2023 20:08
1. Removed Cybox attribute from the to-stix file.
2. Updated supported Stix mappings.
Updated the mapping files, unit test cases, read me and supported stix files by modifying account id and region related details to x-aws-resource.
@mdazam1942 mdazam1942 merged commit f78ef71 into opencybersecurityalliance:develop Jul 19, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants