-
Notifications
You must be signed in to change notification settings - Fork 8
Ajinkya shield prevention #136
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
base: development
Are you sure you want to change the base?
Conversation
|
|
||
| # Check if SRT access is enabled | ||
| if 'AutoRenew' in response and response['AutoRenew'] == 'ENABLED': | ||
| print("SRT has access to the AWS account.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Secret: Secret Keyword
Click here for more details
| Then, configure your AWS credentials. You can configure your credentials either by setting the following environment variables: | ||
| ``` | ||
| AWS_ACCESS_KEY_ID = 'your_access_key' | ||
| AWS_SECRET_ACCESS_KEY = 'your_secret_key' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Secret: Secret Keyword
Click here for more details
|
|
||
| 4. **Check for non-archived findings**: Now, you can iterate over all the detectors and check if they have non-archived findings enabled. If the `FindingPublishingFrequency` attribute of a detector is set to `FIFTEEN_MINUTES`, `ONE_HOUR`, or `SIX_HOURS`, it means that the detector is configured to automatically archive findings after the specified time period. | ||
|
|
||
| ```python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Secret: Secret Keyword
Click here for more details
| # Create a session using your AWS credentials | ||
| session = boto3.Session( | ||
| aws_access_key_id='YOUR_ACCESS_KEY', | ||
| aws_secret_access_key='YOUR_SECRET_KEY', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Secret: Secret Keyword
Click here for more details
|
|
||
| ```python | ||
| regions = session.get_available_regions('macie2') | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Secret: Secret Keyword
Click here for more details
|
|
||
| session = boto3.Session( | ||
| aws_access_key_id='YOUR_ACCESS_KEY', | ||
| aws_secret_access_key='YOUR_SECRET_KEY', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Secret: Secret Keyword
Click here for more details
| print("Security Hub is enabled.") | ||
| except Exception as e: | ||
| print("Security Hub is not enabled:", str(e)) | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Secret: Secret Keyword
Click here for more details
|
|
||
| ``` | ||
| AWS_ACCESS_KEY_ID='your_access_key' | ||
| AWS_SECRET_ACCESS_KEY='your_secret_key' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Secret: Secret Keyword
Click here for more details
No description provided.