Skip to content

Commit

Permalink
Merge pull request #162 from tjinjin/fix_vulsrepo_setup
Browse files Browse the repository at this point in the history
Fix: setup vulsrepo
  • Loading branch information
kotakanbe authored Aug 30, 2016
2 parents 2721dc0 + c545e90 commit 1c203b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions setup/docker/dockerfile/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/* \
&& cd /var/www/html/ \
&& git clone https://github.com/usiusi360/vulsrepo \
&& mkdir /var/www/html/vulsrepo/results \
&& cp /var/www/html/vulsrepo/dist/cgi/vulsrepo.conf.sample /etc/apache2/conf-enabled/vulsrepo.conf \
&& a2enmod cgid

#Home
WORKDIR /opt/vuls
EXPOSE 80 443
ENTRYPOINT service apache2 start && tail -f /dev/null


7 changes: 4 additions & 3 deletions setup/docker/dockerfile/scripts/scan_for_vulsrepo.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash
VULS_ROOT=/opt/vuls
VULS_CONF=${VULS_ROOT}/conf
NGINX_VULSREPO_ROOT=/usr/share/nginx/html/vulsrepo
APACHE_VULSREPO_ROOT=/var/www/html/vulsrepo
cd $VULS_ROOT
vuls scan -report-json --cve-dictionary-dbpath=${VULS_ROOT}/cve.sqlite3 -config=${VULS_CONF}/config.toml
ln -sf ${VULS_ROOT}/results ${NGINX_VULSREPO_ROOT}/results
vuls scan -report-json --cve-dictionary-dbpath=${VULS_ROOT}/cve.sqlite3 -config=${VULS_CONF}/config.toml
rm ${APACHE_VULSREPO_ROOT}/results/*
cp ${VULS_ROOT}/results/current/* ${APACHE_VULSREPO_ROOT}/results

0 comments on commit 1c203b4

Please sign in to comment.