Skip to main content

GuardDuty Detector and Publishing Destination Checker

Project description

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

  1. Clone this repository:

    git clone https://github.com/yourusername/aws-guardduty-checker.git
    
  2. 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:

  • -p or --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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

guardduty_detector_check-0.1.0.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

guardduty_detector_check-0.1.0-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file guardduty_detector_check-0.1.0.tar.gz.

File metadata

  • Download URL: guardduty_detector_check-0.1.0.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for guardduty_detector_check-0.1.0.tar.gz
Algorithm Hash digest
SHA256 98706ea348aaf98d00296f5337f70dc8bb5082bc5be91d800b58f8d2409ab59d
MD5 efd0b6d99eabb78857a9ea7fd96e018d
BLAKE2b-256 a42fc3d7e72f9bf18a85a99952cc8bcedaecb6ea6f94b5e5d2237837e9e3d1b6

See more details on using hashes here.

File details

Details for the file guardduty_detector_check-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for guardduty_detector_check-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4309974604e6dc110c1464312cbd792aee7f32bfd8fde6ccd994b109d2787d35
MD5 51c292b4b4a4d1da6730b583e810c6a6
BLAKE2b-256 48caa4fa94ba9132a0ca3cf80eeef12e3cf5b3b018514e0e69b9d14c3d97ed31

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page