AWS GuardDuty Detector and Publishing Destination Checker
This Python script allows you to list the enabled regions in an AWS account and check GuardDuty in each region to see if it is enabled. For enabled GuardDuty detectors, it retrieves the detector ID and the associated finding publishing destination, if it exists.
Features
- Lists all enabled regions in an AWS account
- Checks GuardDuty status in each enabled region
- Retrieves GuardDuty detector IDs
- Fetches finding publishing destinations for enabled detectors
Prerequisites
- Python 3.x
- AWS CLI configured with appropriate credentials
- boto3 library installed
Installation
From PyPi
pip install guardduty-detector-check
Or Install locally
-
Clone this repository:
git clone https://github.com/yourusername/aws-guardduty-checker.git -
Install in a virtual environment:
python3 -m venv .venv source .venv/bin/activate" pip install .
Usage
Run the script using the following command:
guardduty-detector-check [-p PROFILE]
Options:
-por--profile: Specify an AWS profile name (optional)
Example:
guardduty-detector-check -p my-aws-profile
The script will output a JSON-formatted list of enabled regions, their GuardDuty detector IDs (if enabled), and the associated publishing destinations (if configured).
Output
The script outputs a JSON-formatted list of dictionaries, where each dictionary represents a region and contains the following information:
- Region name
- GuardDuty detector ID (if enabled)
- Publishing destination details (if configured)
Example output:
[
{
"us-east-1": {
"abc123ABC123abc123ABC123abc123AB": [
{
"DestinationId": "abcABCdefDEFghiGHIjklJKLmnoMNO12",
"DestinationType": "S3",
"Status": "PUBLISHING"
}
]
}
},
{
"us-west-2": {}
}
]
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for guardduty-detector-check 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| guardduty_detector_check-0.1.0.tar.gz | 14.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| guardduty_detector_check-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.5 kB
Release files / guardduty_detector_check-0.1.0.tar.gz
| Download URL | guardduty_detector_check-0.1.0.tar.gz |
|---|---|
| Size | 14.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
98706ea348aaf98d00296f5337f70dc8bb5082bc5be91d800b58f8d2409ab59d
|
|
BLAKE2b-256 checksum How to use checksums |
a42fc3d7e72f9bf18a85a99952cc8bcedaecb6ea6f94b5e5d2237837e9e3d1b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / guardduty_detector_check-0.1.0-py3-none-any.whl
| Download URL | guardduty_detector_check-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4309974604e6dc110c1464312cbd792aee7f32bfd8fde6ccd994b109d2787d35
|
|
BLAKE2b-256 checksum How to use checksums |
48caa4fa94ba9132a0ca3cf80eeef12e3cf5b3b018514e0e69b9d14c3d97ed31
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Security for guardduty-detector-check 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.