Skip to content
This repository was archived by the owner on Jan 24, 2022. It is now read-only.
This repository was archived by the owner on Jan 24, 2022. It is now read-only.

regression in v0.0.33 #432

@jumanjiman

Description

@jumanjiman

what

run

ssh_scan --target 67.205.145.156 --port 49154

expect

complete without failure

actual

v0.0.32 succeeds as expected

v0.0.33 fails with:

/app/lib/ssh_scan/scan_engine.rb:138:in `scan_target': undefined method `split' for nil:NilClass (NoMethodError)
	from /app/lib/ssh_scan/scan_engine.rb:191:in `block (2 levels) in scan'

Diff between v0.0.32 (good) and v0.0.33 (bad)

$ git log -p -U0 --no-merges 0.0.32..0.0.33
commit 3a70e66a5c0d8106cad47682f090bd1ac189032f (origin/bump_for_33)
Author: Jonathan Claudius <jclaudius@mozilla.com>
Date:   Tue Feb 13 10:55:44 2018 -0500

    Bump for 33

diff --git a/lib/ssh_scan/version.rb b/lib/ssh_scan/version.rb
index f10a875..ee5244f 100644
--- a/lib/ssh_scan/version.rb
+++ b/lib/ssh_scan/version.rb
@@ -2 +2 @@ module SSHScan
-  VERSION = '0.0.32'
+  VERSION = '0.0.33'

commit a07bebe12d72f5cca383a23d446d66802f7e335c
Author: Jinank Jain <jinank94@gmail.com>
Date:   Tue Feb 13 11:44:54 2018 +0100

    fixes #429: Add the missing port argument to ssh_keyscan

diff --git a/lib/ssh_scan/scan_engine.rb b/lib/ssh_scan/scan_engine.rb
index 1cdfb68..aadbc86 100644
--- a/lib/ssh_scan/scan_engine.rb
+++ b/lib/ssh_scan/scan_engine.rb
@@ -127 +127 @@ module SSHScan
-          stdin, stdout, stderr, wait_thr = Open3.popen3('ssh-keyscan', '-t', 'rsa,dsa', target)
+          stdin, stdout, stderr, wait_thr = Open3.popen3('ssh-keyscan', '-t', 'rsa,dsa', '-p', port.to_s, target)

reproducers

My git repo builds a docker image that contains ssh_scan at a specific version. The test harness runs ssh_scan against a live sshd with a few options.

Currently:

  • my master branch is at ssh_scan v0.0.32
  • my upgrade branch is at ssh_scan v0.0.33

reproduce in a local dev environment with these commands

git checkout <branch>
ci/build && ci/test

Or, you can look at the circleci console outputs:

success

https://github.com/jumanjihouse/docker-ssh-scan/tree/9376f7cc519bc324bcea964a7e4ec4a3b7e78cb5 with console output on circleci

failure

jumanjihouse/docker-ssh-scan#15 with console output on circleci

Related links

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions