Security audit script

merge-requests/8/head
Bob Mottram 2020-07-08 15:28:08 +01:00
parent 22ca09caef
commit 6fbba92427
6 changed files with 21 additions and 8 deletions

View File

@ -22,7 +22,7 @@ On Arch/Parabola:
sudo pacman -S tor python-pip python-pysocks python-pycryptodome \
imagemagick python-pillow python-requests \
perl-image-exiftool python-numpy python-dateutil \
certbot flake8
certbot flake8 bandit
sudo pip3 install pyLD pyqrcode pypng
```
@ -37,7 +37,8 @@ sudo apt install -y \
python3-idna python3-requests \
python3-pyld python3-django-timezone-field \
libimage-exiftool-perl python3-flake8 \
python3-pyqrcode python3-png certbot nginx
python3-pyqrcode python3-png python3-bandit \
certbot nginx
```
## Installation
@ -196,6 +197,16 @@ Static analysis can be run with:
./static_analysis
```
## Running a security audit
To run a security audit:
``` bash
./security_audit
```
Note that not all of the issues identified will necessarily be relevant to this project.
## Installing on Onion or i2p domains
If you don't have access to the clearnet, or prefer not to use it, then it's possible to run an Epicyon instance easily from your laptop. There are scripts within the ```deploy``` directory which can be used to install an instance on a Debian or Arch/Parabola operating system. With some modification of package names they could be also used with other distros.

View File

@ -64,7 +64,7 @@ if [ -f /usr/bin/pacman ]; then
imagemagick python-pillow python-requests \
perl-image-exiftool python-numpy python-dateutil \
certbot flake8 git i2pd wget qrencode \
proxychains midori
proxychains midori bandit
pip3 install pyLD pyqrcode pypng
else
apt-get update
@ -75,7 +75,7 @@ else
libimage-exiftool-perl python3-flake8 python3-pyld \
python3-django-timezone-field nginx git i2pd wget \
python3-pyqrcode qrencode python3-png \
proxychains midori
proxychains midori python3-bandit
fi
if [ ! -d /etc/i2pd ]; then

View File

@ -38,7 +38,7 @@ if [ -f /usr/bin/pacman ]; then
pacman -S --noconfirm tor python-pip python-pysocks python-pycryptodome \
imagemagick python-pillow python-requests \
perl-image-exiftool python-numpy python-dateutil \
certbot flake8 git qrencode
certbot flake8 git qrencode bandit
pip3 install pyLD pyqrcode pypng
else
apt-get update
@ -48,7 +48,7 @@ else
python3-setuptools python3-socks python3-idna \
libimage-exiftool-perl python3-flake8 python3-pyld \
python3-django-timezone-field tor nginx git qrencode \
python3-pyqrcode python3-png
python3-pyqrcode python3-png python3-bandit
fi
echo 'Cloning the epicyon repo'

View File

@ -4,7 +4,7 @@ You will need python version 3.7 or later.
On a Debian based system:
sudo apt install -y tor python3-socks imagemagick python3-numpy python3-setuptools python3-crypto python3-pycryptodome python3-dateutil python3-pil.imagetk python3-idna python3-requests python3-flake8 python3-pyld python3-django-timezone-field python3-pyqrcode python3-png libimage-exiftool-perl certbot nginx
sudo apt install -y tor python3-socks imagemagick python3-numpy python3-setuptools python3-crypto python3-pycryptodome python3-dateutil python3-pil.imagetk python3-idna python3-requests python3-flake8 python3-pyld python3-django-timezone-field python3-pyqrcode python3-png python3-bandit libimage-exiftool-perl certbot nginx
The following instructions install Epicyon to the /opt directory. It's not essential that it be installed there, and it could be in any other preferred directory.

2
security_audit 100755
View File

@ -0,0 +1,2 @@
#!/bin/bash
bandit *.py -x tests.py

View File

@ -1264,7 +1264,7 @@
<p class="intro">You will need python version 3.7 or later.</p>
<p class="intro">On a Debian based system:</p>
<div class="shell">
<p>sudo apt install -y tor python3-socks imagemagick python3-numpy python3-setuptools python3-crypto python3-pycryptodome python3-dateutil python3-pil.imagetk python3-idna python3-requests python3-flake8 python3-pyld python3-django-timezone-field python3-pyqrcode python3-png libimage-exiftool-perl certbot nginx</p>
<p>sudo apt install -y tor python3-socks imagemagick python3-numpy python3-setuptools python3-crypto python3-pycryptodome python3-dateutil python3-pil.imagetk python3-idna python3-requests python3-flake8 python3-pyld python3-django-timezone-field python3-pyqrcode python3-png python3-bandit libimage-exiftool-perl certbot nginx</p>
</div>
<p class="intro">