Skip to content
This repository was archived by the owner on Feb 26, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ ADD Gemfile /sectools
ADD Gemfile.lock /sectools

# required for ssh-keyscan
RUN apk --update add openssh-client && apk --update add bash
RUN apk --update add openssh-client && apk --update add bash && \
rm -rf /var/cache/apk/*

RUN gem install ssh_scan bundler

Expand All @@ -17,7 +18,6 @@ RUN apk --update add --virtual build-dependencies ruby-dev build-base && \

COPY . /ssh_scan


HEALTHCHECK --interval=30s --timeout=5s --start-period=120s --retries=3 CMD curl --fail http://localhost:8080/status || exit 1

COPY src/ src/
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ source 'https://rubygems.org'

gem "sinatra"
gem "rest-client"
gem "ssh_scan"
gem "ssh_scan", :git => "https://github.com/secureCodeBox/ssh_scan.git"

gem "ruby-scanner-scaffolding", :git => "https://github.com/secureCodeBox/ruby-scanner-scaffolding.git", :tag => "v1.0.0"
17 changes: 11 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ GIT
specs:
ruby-scanner-scaffolding (1.0.0)

GIT
remote: https://github.com/secureCodeBox/ssh_scan.git
revision: 414332a84546afaf89485a1268e3824c70914616
specs:
ssh_scan (0.0.41)
bindata (= 2.4.3)
net-ssh (= 5.0.2)
netaddr (= 1.5.1)
sshkey

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -38,11 +48,6 @@ GEM
rack (~> 2.0)
rack-protection (= 2.0.5)
tilt (~> 2.0)
ssh_scan (0.0.40)
bindata (= 2.4.3)
net-ssh (= 5.0.2)
netaddr (= 1.5.1)
sshkey
sshkey (2.0.0)
tilt (2.0.9)
unf (0.1.4)
Expand All @@ -58,7 +63,7 @@ DEPENDENCIES
rest-client
ruby-scanner-scaffolding!
sinatra
ssh_scan
ssh_scan!

BUNDLED WITH
2.0.1
4 changes: 2 additions & 2 deletions src/main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
['PROCESS_TARGETS']
)

healthcheckClient = Healthcheck.new
healthcheckClient = Healthcheck.new

get '/status' do
status 500
if client.healthy?
status 200
end
end
content_type :json
healthcheckClient.check(client)
end
Expand Down
2 changes: 1 addition & 1 deletion src/ssh_scan.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
require_relative './ssh_result_transformer'

$logger = Logger.new(STDOUT)

$logger.level = if ENV.key? 'DEBUG' then Logger::DEBUG else Logger::INFO end

class SshScan
attr_reader :raw_results
Expand Down
1 change: 0 additions & 1 deletion src/ssh_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def work(job_id, targets)
if scan.errored
@errored = true
end
scan

{
findings: scan.results,
Expand Down