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
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ ADD Gemfile.lock /sectools
RUN apk --update add openssh-client && apk --update add bash && \
rm -rf /var/cache/apk/*

RUN gem install ssh_scan bundler
RUN gem install bundler

RUN apk --update add --virtual build-dependencies ruby-dev build-base && \
apk --update add git && \
RUN apk --update add --virtual build-dependencies ruby-dev build-base git && \
bundle install && \
apk del build-dependencies && \
rm -rf /var/cache/apk/*
Expand Down Expand Up @@ -43,6 +42,8 @@ ENV SCB_COMMIT_ID ${COMMIT_ID}
ENV SCB_REPOSITORY_URL ${REPOSITORY_URL}
ENV SCB_BRANCH ${BRANCH}

ENV SSH_SCAN_VERSION "0.0.42"

LABEL org.opencontainers.image.title="secureCodeBox scanner-webserver-ssh" \
org.opencontainers.image.description="SSH_Scan integration for secureCodeBox" \
org.opencontainers.image.authors="iteratec GmbH" \
Expand Down
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ source 'https://rubygems.org'
gem "sinatra", '2.0.8.1'
gem "rest-client", '2.1.0'
gem "ssh_scan", '0.0.42'
gem "thin"

gem "ruby-scanner-scaffolding", :git => "https://github.com/secureCodeBox/ruby-scanner-scaffolding.git", :tag => "v1.0.0"
gem "ruby-scanner-scaffolding", :git => "https://github.com/secureCodeBox/ruby-scanner-scaffolding.git", :tag => "v1.1.1"
12 changes: 10 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
GIT
remote: https://github.com/secureCodeBox/ruby-scanner-scaffolding.git
revision: fff6c92edffb1f55bde432156ffd60c38c034e49
tag: v1.0.0
revision: d9dab7bd9588f5000ac45cbfb4cf7b1f2cc049b5
tag: v1.1.1
specs:
ruby-scanner-scaffolding (1.0.0)

GEM
remote: https://rubygems.org/
specs:
bindata (2.4.3)
daemons (1.3.1)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
eventmachine (1.2.7)
eventmachine (1.2.7-x64-mingw32)
ffi (1.12.1-x64-mingw32)
http-accept (1.7.0)
http-cookie (1.0.3)
Expand Down Expand Up @@ -49,6 +52,10 @@ GEM
netaddr (= 1.5.1)
sshkey
sshkey (2.0.0)
thin (1.7.2)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
rack (>= 1, < 3)
tilt (2.0.10)
unf (0.1.4)
unf_ext
Expand All @@ -63,6 +70,7 @@ DEPENDENCIES
ruby-scanner-scaffolding!
sinatra (= 2.0.8.1)
ssh_scan (= 0.0.42)
thin

BUNDLED WITH
2.1.4
2 changes: 2 additions & 0 deletions src/main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
set :port, 8_080
set :bind, '0.0.0.0'
set :environment, :production
set :server, 'thin'
disable :logging, :static, :show_exceptions

client =
SshWorker.new(
Expand Down
8 changes: 8 additions & 0 deletions src/ssh_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,12 @@ def work(job_id, targets)
scannerType: 'ssh'
}
end

def version
if ENV.key? 'SSH_SCAN_VERSION'
ENV["SSH_SCAN_VERSION"]
else
"unkown"
end
end
end