Fix: setup vulsrepo
This commit is contained in:
		@@ -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
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user