aws_security_viz 0.1.5.pre.alpha.pre.85 → 0.1.5.pre.alpha.pre.87

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ce3944479fedab03f84bc00c2f8472b6bd85fafe
4
- data.tar.gz: 4aa74f4735b239bba3d857bce5bda582686d6c2e
3
+ metadata.gz: 974122235ec3037bdcdb110926d303a543f39e1d
4
+ data.tar.gz: 586b684c7dcb19d5c3ff7e85bfe05d05df8531f4
5
5
  SHA512:
6
- metadata.gz: f4967e6294adb2871335356ff1ea794ee8689227a270a4d2a32cd16cfa0ec34c9a31e7b617553ff3acfdee3e553cd1cbc4167bb54524323860079fc1ec2fcdcb
7
- data.tar.gz: e5bbbd61e5c3cb0b1b19cae26a330a68833c9778dae8d096dd6f85ced678143ff93fb485452834054927a8b98628f69c0e904c72f0298bb098dfb69a110566ad
6
+ metadata.gz: 41d3356c232f3d8ce66cde360b2fb0088e9f6c654fb8ee328a26ece8d50d0ecd082afee13d9dfb3f4935ff795991be5bcb52d5dcddcba9d118475ec20b909728
7
+ data.tar.gz: 0453267a79009d5b5f083ac2c878ddf7988905091fc1c928498262b0527994f6803bb538c3c64e4077869e16bdd9ab114b283c9e5d92ce19830e692b6f62417c
data/exe/aws_security_viz CHANGED
@@ -7,6 +7,7 @@ opts = Trollop::options do
7
7
  opt :access_key, 'AWS access key', :default => ENV['AWS_ACCESS_KEY'] || ENV['AWS_ACCESS_KEY_ID'], :type => :string
8
8
  opt :secret_key, 'AWS secret key', :default => ENV['AWS_SECRET_KEY'] || ENV['AWS_SECRET_ACCESS_KEY'], :type => :string
9
9
  opt :region, 'AWS region to query', :default => 'us-east-1', :type => :string
10
+ opt :vpc_id, 'AWS VPC id to show', :type => :string
10
11
  opt :source_file, 'JSON source file containing security groups', :type => :string
11
12
  opt :filename, 'Output file name', :type => :string, :default => 'aws-security-viz.png'
12
13
  opt :config, 'Config file (opts.yml)', :type => :string, :default => 'opts.yml'
data/lib/provider/ec2.rb CHANGED
@@ -3,6 +3,7 @@ require 'fog/aws'
3
3
  class Ec2Provider
4
4
 
5
5
  def initialize(options)
6
+ @options = options
6
7
  conn_opts = {
7
8
  region: options[:region]
8
9
  }
@@ -14,7 +15,9 @@ class Ec2Provider
14
15
  end
15
16
 
16
17
  def security_groups
17
- @compute.security_groups.collect { |sg|
18
+ @compute.security_groups.reject { |sg|
19
+ @options[:vpc_id] && sg.vpc_id != @options[:vpc_id]
20
+ }.collect { |sg|
18
21
  Ec2::SecurityGroup.new(sg)
19
22
  }
20
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws_security_viz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5.pre.alpha.pre.85
4
+ version: 0.1.5.pre.alpha.pre.87
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anay Nayak
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-07-10 00:00:00.000000000 Z
11
+ date: 2017-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -259,7 +259,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
259
259
  version: 1.3.1
260
260
  requirements: []
261
261
  rubyforge_project:
262
- rubygems_version: 2.4.5
262
+ rubygems_version: 2.6.13
263
263
  signing_key:
264
264
  specification_version: 4
265
265
  summary: Visualize your aws security groups