Skip to content

Query AWS VPC security groups like SQL

License

Notifications You must be signed in to change notification settings

chris-x86-64/sgq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sgq

Query AWS VPC security groups like SQL.

Building

docker build \
    -t chrisx86/sgq \
    .

Sorry, it's not ready on docker.io (yet).

Prerequisites

  • Configure your AWS credentials on your host using awscli

    aws configure
    
  • All VPCs you wish to examine must have the Name tags.

  • (Recommended) You have Docker or an alternative like Podman ready.

  • (Alternative) You can execute python3 sgq.py without Docker as long as you have:

Usage

Download security group lists

docker run \
    --rm \
    -v $HOME/.aws:/root/.aws:Z,ro \
    -v $(pwd)/csvs:/var/lib/sgq:Z \
    chrisx86/sgq \
    refresh

Query downloaded security groups

docker run \
    --rm \
    -v $(pwd)/csvs:/var/lib/sgq:Z \
    chrisx86/sgq \
    query 'SELECT * FROM $vpc_name WHERE rules_grants_cidr_ip = "203.0.113.0/24"'

External dependencies

About

Query AWS VPC security groups like SQL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published