This repository has been archived on 2025-05-02. You can view files and clone it. You cannot open issues or pull requests or push a commit.
2024-09-18 18:06:22 +00:00
2024-09-18 17:55:12 +00:00
2024-09-18 17:54:23 +00:00
2024-09-18 18:06:22 +00:00

route53-compare

AWS Route53 Asset Inventory Script

This Bash script helps you identify which assets in your AWS Route53 hosted zones are also tracked in JupiterOne. It does this by:

  1. Fetching all your Route53 hosted zones.

  2. Retrieving DNS records (A and CNAME) from each zone.

  3. Reaching out to JupiterOne's API to check if an asset exists with the DNS record's value.

  4. Printing out the results, indicating if the asset was found in JupiterOne or not.

Prerequisites

  • AWS CLI: You need to have the AWS CLI installed and configured with the necessary credentials.

  • JupiterOne API Key: You'll need an API key from JupiterOne to access their GraphQL API.

Setup

Create a .env file: In the same directory as the script, create a file named .env with the following content: Replace the placeholders with your actual AWS profile name, JupiterOne API key, and JupiterOne account ID.

AWS_PROFILE=your_aws_profile_name
J1_API_KEY=your_jupiterone_api_key
J1_ACCOUNT=your_jupiterone_account\id

Usage

  1. Make the script executable:
chmod +x dangle.sh
  1. Run the script:
./dangle.sh
    or
bash dangle.sh

The script will output the DNS records and whether or not a corresponding asset was found in JupiterOne.

To-Do

  • Error Handling: The script includes basic error handling for the .env file. We should make it more robust at error handling for AWS CLI and JupiterOne API calls.

  • Additional Record Types: Currently the script only handles A and CNAME records. We should extend it to support other record types like MX, TXT, etc.

  • JupiterOne Query: The JupiterOne query is currently VERY simple. We might want to refine it.

Description
No description provided
Readme 30 KiB
Languages
Shell 100%