anaynayak/aws-security-viz

[ERROR] undefined method `<<' for {:overlap=>false, :splines=>true, :sep=>1, :concentrate=>true, :rankdir=>"LR"}:Hash

SoloWinf opened this issue · 3 comments

Unable to generate Graphviz export.

It says,

[ERROR] undefined method `<<' for {:overlap=>false, :splines=>true, :sep=>1, :concentrate=>true, :rankdir=>"LR"}:Hash
Did you mean?  <
/usr/local/rvm/gems/ruby-3.0.0/gems/graphviz-1.2.1/lib/graphviz/node.rb:36:in `initialize': undefined method `<<' for {:overlap=>false, :splines=>true, :sep=>1, :concentrate=>true, :rankdir=>"LR"}:Hash (NoMethodError)
Did you mean?  <

here's my environment

(venv) -bash-4.2# DEBUG=true OBFUSCATE=true aws_security_viz -f SG.svg node: 2d220a7477906cb08e73481b2713c747857880accf9db1056b574036b5708def, opts: {:vpc_id=>"vpc-0d335e14eb5b7bc1f", :group_id=>"sg-05c6c211733fbfbab"} edge: 2d220a7477906cb08e73481b2713c747857880accf9db1056b574036b5708def -> 2d220a7477906cb08e73481b2713c747857880accf9db1056b574036b5708def edge: 50e27ae9faaa0bd32f78d353e263b2afc8456a854aa251c32506eea69d80a551 -> 2d220a7477906cb08e73481b2713c747857880accf9db1056b574036b5708def edge: 37a8eec1ce19687d132fe29051dca629d164e2c4958ba141d5f4133a33f0688f -> 2d220a7477906cb08e73481b2713c747857880accf9db1056b574036b5708def edge: 2d220a7477906cb08e73481b2713c747857880accf9db1056b574036b5708def -> b42e18366abaf7d25debe1765391f2a4b1f3a16708045d2e6642a14fc4c93144 node: 009bdfaa34f3d43c2a83a32c18de70d1793a5ae587601fb5537ebd6b4b611f5b, opts: {:vpc_id=>"vpc-0d335e14eb5b7bc1f", :group_id=>"sg-067705ee76f229cf4"} edge: b42e18366abaf7d25debe1765391f2a4b1f3a16708045d2e6642a14fc4c93144 -> 009bdfaa34f3d43c2a83a32c18de70d1793a5ae587601fb5537ebd6b4b611f5b edge: 009bdfaa34f3d43c2a83a32c18de70d1793a5ae587601fb5537ebd6b4b611f5b -> b42e18366abaf7d25debe1765391f2a4b1f3a16708045d2e6642a14fc4c93144 node: 50e27ae9faaa0bd32f78d353e263b2afc8456a854aa251c32506eea69d80a551, opts: {:vpc_id=>"vpc-0d335e14eb5b7bc1f", :group_id=>"sg-06a6e6f025a977622"} edge: 2d220a7477906cb08e73481b2713c747857880accf9db1056b574036b5708def -> 50e27ae9faaa0bd32f78d353e263b2afc8456a854aa251c32506eea69d80a551 edge: 50e27ae9faaa0bd32f78d353e263b2afc8456a854aa251c32506eea69d80a551 -> 50e27ae9faaa0bd32f78d353e263b2afc8456a854aa251c32506eea69d80a551 edge: 37a8eec1ce19687d132fe29051dca629d164e2c4958ba141d5f4133a33f0688f -> 50e27ae9faaa0bd32f78d353e263b2afc8456a854aa251c32506eea69d80a551 edge: 50e27ae9faaa0bd32f78d353e263b2afc8456a854aa251c32506eea69d80a551 -> b42e18366abaf7d25debe1765391f2a4b1f3a16708045d2e6642a14fc4c93144 node: b2bdb4abc23383fe83dde4b5423623d2280eb1bef59c5ec0152da66228344432, opts: {:vpc_id=>"vpc-0d335e14eb5b7bc1f", :group_id=>"sg-088f818d22bd9a482"} edge: e35f66cb3a3ad0ef6beb3aa96554d35fda8d006f38633acb9c735baae4855a05 -> b2bdb4abc23383fe83dde4b5423623d2280eb1bef59c5ec0152da66228344432 edge: 37a8eec1ce19687d132fe29051dca629d164e2c4958ba141d5f4133a33f0688f -> b2bdb4abc23383fe83dde4b5423623d2280eb1bef59c5ec0152da66228344432 edge: b42e18366abaf7d25debe1765391f2a4b1f3a16708045d2e6642a14fc4c93144 -> b2bdb4abc23383fe83dde4b5423623d2280eb1bef59c5ec0152da66228344432 edge: b2bdb4abc23383fe83dde4b5423623d2280eb1bef59c5ec0152da66228344432 -> b42e18366abaf7d25debe1765391f2a4b1f3a16708045d2e6642a14fc4c93144 node: 48aae2845a947e1956545a5863aac9378e2a083455bc64b4518ef76e39557a2e, opts: {:vpc_id=>"vpc-0d335e14eb5b7bc1f", :group_id=>"sg-09497210db363e84c"} edge: b42e18366abaf7d25debe1765391f2a4b1f3a16708045d2e6642a14fc4c93144 -> 48aae2845a947e1956545a5863aac9378e2a083455bc64b4518ef76e39557a2e edge: 48aae2845a947e1956545a5863aac9378e2a083455bc64b4518ef76e39557a2e -> b42e18366abaf7d25debe1765391f2a4b1f3a16708045d2e6642a14fc4c93144 node: 37a8eec1ce19687d132fe29051dca629d164e2c4958ba141d5f4133a33f0688f, opts: {:vpc_id=>"vpc-0d335e14eb5b7bc1f", :group_id=>"sg-09976588585749d6e"} edge: 2d220a7477906cb08e73481b2713c747857880accf9db1056b574036b5708def -> 37a8eec1ce19687d132fe29051dca629d164e2c4958ba141d5f4133a33f0688f edge: 50e27ae9faaa0bd32f78d353e263b2afc8456a854aa251c32506eea69d80a551 -> 37a8eec1ce19687d132fe29051dca629d164e2c4958ba141d5f4133a33f0688f edge: 37a8eec1ce19687d132fe29051dca629d164e2c4958ba141d5f4133a33f0688f -> 37a8eec1ce19687d132fe29051dca629d164e2c4958ba141d5f4133a33f0688f edge: 37a8eec1ce19687d132fe29051dca629d164e2c4958ba141d5f4133a33f0688f -> b42e18366abaf7d25debe1765391f2a4b1f3a16708045d2e6642a14fc4c93144 node: 37a8eec1ce19687d132fe29051dca629d164e2c4958ba141d5f4133a33f0688f, opts: {:vpc_id=>"vpc-612a9b1b", :group_id=>"sg-7e11733c"} edge: 37a8eec1ce19687d132fe29051dca629d164e2c4958ba141d5f4133a33f0688f -> 37a8eec1ce19687d132fe29051dca629d164e2c4958ba141d5f4133a33f0688f edge: 37a8eec1ce19687d132fe29051dca629d164e2c4958ba141d5f4133a33f0688f -> b42e18366abaf7d25debe1765391f2a4b1f3a16708045d2e6642a14fc4c93144 [ERROR] undefined method <<' for {:overlap=>false, :splines=>true, :sep=>1, :concentrate=>true, :rankdir=>"LR"}:Hash
Did you mean? <
/usr/local/rvm/gems/ruby-3.0.0/gems/graphviz-1.2.1/lib/graphviz/node.rb:36:in initialize': undefined method <<' for {:overlap=>false, :splines=>true, :sep=>1, :concentrate=>true, :rankdir=>"LR"}:Hash (NoMethodError)
Did you mean? <
from /usr/local/rvm/gems/ruby-3.0.0/gems/graphviz-1.2.1/lib/graphviz/graph.rb:30:in initialize' from /usr/local/rvm/gems/ruby-3.0.0/gems/aws_security_viz-0.2.2/lib/renderer/graphviz.rb:6:in new'
from /usr/local/rvm/gems/ruby-3.0.0/gems/aws_security_viz-0.2.2/lib/renderer/graphviz.rb:6:in initialize' from /usr/local/rvm/gems/ruby-3.0.0/gems/aws_security_viz-0.2.2/lib/renderer/all.rb:7:in new'
from /usr/local/rvm/gems/ruby-3.0.0/gems/aws_security_viz-0.2.2/lib/renderer/all.rb:7:in pick' from /usr/local/rvm/gems/ruby-3.0.0/gems/aws_security_viz-0.2.2/lib/aws_security_viz.rb:23:in unleash'
from /usr/local/rvm/gems/ruby-3.0.0/gems/aws_security_viz-0.2.2/exe/aws_security_viz:34:in <top (required)>' from /usr/local/rvm/gems/ruby-3.0.0/bin/aws_security_viz:23:in load'
from /usr/local/rvm/gems/ruby-3.0.0/bin/aws_security_viz:23:in <main>' from /usr/local/rvm/gems/ruby-3.0.0/bin/ruby_executable_hooks:22:in eval'
from /usr/local/rvm/gems/ruby-3.0.0/bin/ruby_executable_hooks:22:in `

'

aws_security_viz v0.2.2
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-linux]

NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"
Amazon Linux release 2 (Karoo)

(venv) -bash-4.2# yum list | grep graphviz
graphviz.x86_64 2.30.1-21.amzn2.0.1 @amzn2-core
graphviz.i686 2.30.1-21.amzn2.0.1 amzn2-core
graphviz-devel.x86_64 2.30.1-21.amzn2.0.1 amzn2-core
graphviz-doc.x86_64 2.30.1-21.amzn2.0.1 amzn2-core
graphviz-gd.x86_64 2.30.1-21.amzn2.0.1 amzn2-core
graphviz-graphs.x86_64 2.30.1-21.amzn2.0.1 amzn2-core
graphviz-guile.x86_64 2.30.1-21.amzn2.0.1 amzn2-core
graphviz-java.x86_64 2.30.1-21.amzn2.0.1 amzn2-core
graphviz-lua.x86_64 2.30.1-21.amzn2.0.1 amzn2-core
graphviz-ocaml.x86_64 2.30.1-21.amzn2.0.1 amzn2-core
graphviz-perl.x86_64 2.30.1-21.amzn2.0.1 amzn2-core
graphviz-php.x86_64 2.30.1-21.amzn2.0.1 amzn2-core
graphviz-python.x86_64 2.30.1-21.amzn2.0.1 amzn2-core
graphviz-ruby.x86_64 2.30.1-21.amzn2.0.1 amzn2-core
graphviz-tcl.x86_64 2.30.1-21.amzn2.0.1 amzn2-core
(venv) -bash-4.2#
`

Thanks for reporting this @SoloWinf . I'll look into this.

This is now fixed in latest master and is available as a pre build on rubygems . Will create a release a bit later

Pushed a new release v.0.2.3