aws_security_viz 0.2.1.pre.alpha.pre.376 → 0.2.1.pre.alpha.pre.379

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
  SHA256:
3
- metadata.gz: 6bb54e677979f783753ba4fd9b3edb568bc7dfebd941cffbe292ddb6fa996580
4
- data.tar.gz: 3410e353079b7650cfcc909c431b4526320fe1749692795a9f7c60ee1efe35e1
3
+ metadata.gz: a4fceb4ddd9fa38b99e043c81577263e90a53fda18b8c81be2b3f151e9ff0481
4
+ data.tar.gz: cc59f3fbee5d2e01b8e9d97735e3dffe86cf87a96e246341d8e6ec5824b58190
5
5
  SHA512:
6
- metadata.gz: 3a0033f321f0fb0d4ba7abaf1e05b7540e28bb876a2e5c85c40b667ae0cd47040a4e72fdfebaf6542897362d3f7c06288f2b5889af8b778249e5a76de1af234e
7
- data.tar.gz: a13d5f3b71dd1e6fa4dbfaa941c5387f7f8dd8b42baf5b7272f328618a58003a8921c3e89eab59bfac8fe6b3422821f880deab27d326598071f38a13ffd6a965
6
+ metadata.gz: 218b7412bb348df10048794c55a244635434f7b2946858b6e0e9a3f15aac50a20923c0ecc3971d4214c4314add48a5c75250f094e06db228c83b065b778888d6
7
+ data.tar.gz: bac464a2e6084170ed1d7e97549de41abe2a07d846e8f262f7f5494f54ee592eb7b16ec9e1936afb1f0ce222e0dddc8ba634a51ac136e68b72b22765a8962c77
@@ -3,7 +3,14 @@ All notable changes to this project will be documented in this file.
3
3
  This project adheres to [Semantic Versioning](http://semver.org/).
4
4
 
5
5
  ## [Unreleased]
6
+ ### Added
7
+ - Provide a webserver using a --serve PORT which provides a link to the navigator view
8
+
9
+ ### Changed
10
+ - Bumped InteractiveGraph to v0.3.2
6
11
 
12
+ ### Fixed
13
+ - Empty InfoPanel in navigator view now shows vpc, security group name.
7
14
 
8
15
  ## [0.2.0] - 2019-01-24
9
16
  ### Added
@@ -2,6 +2,7 @@
2
2
 
3
3
  require 'aws_security_viz'
4
4
  require 'optimist'
5
+ require 'webrick'
5
6
 
6
7
  opts = Optimist::options do
7
8
  opt :access_key, 'AWS access key', :default => ENV['AWS_ACCESS_KEY'] || ENV['AWS_ACCESS_KEY_ID'], :type => :string
@@ -16,6 +17,7 @@ opts = Optimist::options do
16
17
  opt :renderer, "Renderer (#{Renderer.all.join('|')})", :default => 'graphviz'
17
18
  opt :source_filter, 'Source filter', :default => nil, :type => :string
18
19
  opt :target_filter, 'Target filter', :default => nil, :type => :string
20
+ opt :serve, 'Serve a HTTP serve', :default => nil, :type => :integer
19
21
  end
20
22
 
21
23
  cmd = ARGV.shift
@@ -28,6 +30,10 @@ end
28
30
  config = AwsConfig.load(opts[:config]).merge(obfuscate: ENV['OBFUSCATE'], debug: ENV['DEBUG'])
29
31
  begin
30
32
  VisualizeAws.new(config, opts).unleash(opts[:filename])
33
+ if opts[:serve]
34
+ puts "Navigate to http://localhost:#{opts[:serve]}/navigator.html##{opts[:filename]}"
35
+ WEBrick::HTTPServer.new({Port: opts[:serve], DocumentRoot: '.'}).start
36
+ end
31
37
  rescue Exception => e
32
38
  puts "[ERROR] #{e.message}"
33
39
  raise e if config.debug?
@@ -12,7 +12,8 @@ module Renderer
12
12
 
13
13
  def add_node(name, opts)
14
14
  vpc = opts[:vpc_id] || 'default'
15
- @nodes << {id: name, label: name, categories: [vpc]}
15
+ info = "<b>Security group</b>: #{name}, <br/><b>VPC:</b> #{vpc}"
16
+ @nodes << {id: name, label: name, categories: [vpc], info: info}
16
17
  @categories.add(vpc)
17
18
  end
18
19
 
@@ -1 +1 @@
1
- {"categories": {"default":"default"}, "data": {"nodes":[{"id":"app", "label":"app", "categories":["default"]}, {"id":"8.8.8.8/32", "label":"8.8.8.8/32", "categories":["default"]}, {"id":"amazon-elb-sg", "label":"amazon-elb-sg", "categories":["default"]}, {"id":"*", "label":"*", "categories":["default"]}, {"id":"db", "label":"db", "categories":["default"]}], "edges":[{"id":"app-db", "from":"app", "to":"db", "label":"5984/tcp"}, {"id":"8.8.8.8/32-app", "from":"8.8.8.8/32", "to":"app", "label":"80/tcp"}, {"id":"amazon-elb-sg-app", "from":"amazon-elb-sg", "to":"app", "label":"80/tcp"}, {"id":"*-app", "from":"*", "to":"app", "label":"22/tcp"}]}}
1
+ {"data":{"nodes":[{"id":"app","label":"app","categories":["default"],"info":"<b>Security group</b>: app, <br/><b>VPC:</b> default"},{"id":"8.8.8.8/32","label":"8.8.8.8/32","categories":["default"],"info":"<b>Security group</b>: 8.8.8.8/32, <br/><b>VPC:</b> default"},{"id":"amazon-elb-sg","label":"amazon-elb-sg","categories":["default"],"info":"<b>Security group</b>: amazon-elb-sg, <br/><b>VPC:</b> default"},{"id":"*","label":"*","categories":["default"],"info":"<b>Security group</b>: *, <br/><b>VPC:</b> default"},{"id":"db","label":"db","categories":["default"],"info":"<b>Security group</b>: db, <br/><b>VPC:</b> default"}],"edges":[{"id":"app-db","from":"app","to":"db","label":"5984/tcp"},{"id":"8.8.8.8/32-app","from":"8.8.8.8/32","to":"app","label":"80/tcp"},{"id":"amazon-elb-sg-app","from":"amazon-elb-sg","to":"app","label":"80/tcp"},{"id":"*-app","from":"*","to":"app","label":"22/tcp"}]},"categories":{"default":"default"}}
@@ -23,9 +23,16 @@ describe VisualizeAws do
23
23
  let(:expected_file) { File.join(File.dirname(__FILE__), 'dummy.dot') }
24
24
  let(:temp_file) { Tempfile.new(%w(aws .dot)) }
25
25
 
26
+ def without_pos(data)
27
+ return data
28
+ .gsub(/pos=\"[a-z,0-9\.\s]*\"/, '')
29
+ .gsub(/\s{2,}/, ' ') # trim spaces
30
+ .gsub(/\t/, ' ') # remove tabs
31
+ end
32
+
26
33
  it 'should parse json input', :integration => true do
27
34
  VisualizeAws.new(config, opts).unleash(temp_file.path)
28
- expect(expected_content).to eq(actual_content)
35
+ expect(without_pos(expected_content)).to eq(without_pos(actual_content))
29
36
  end
30
37
 
31
38
  it 'should parse json input with stubbed out graphviz' do
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.2.1.pre.alpha.pre.376
4
+ version: 0.2.1.pre.alpha.pre.379
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anay Nayak
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-06-14 00:00:00.000000000 Z
11
+ date: 2020-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler