Skip to content

Commit ef7be7d

Browse files
committed
Merge remote-tracking branch 'trailofbits/algo/master' into 196-simple-webapp-config
2 parents 02b92e2 + 3f3138f commit ef7be7d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+1418
-452
lines changed

.github/workflows/main.yml

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
name: Main
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-18.04
8+
steps:
9+
- uses: actions/checkout@v1
10+
- uses: actions/setup-python@v1
11+
with:
12+
python-version: '3.7'
13+
14+
- name: Install dependencies
15+
run: |
16+
sudo apt update -y
17+
python -m pip install --upgrade pip
18+
pip install -r requirements.txt
19+
sudo snap install shellcheck
20+
pip install ansible-lint
21+
22+
- name: Checks and linters
23+
run: |
24+
/snap/bin/shellcheck algo install.sh
25+
ansible-playbook main.yml --syntax-check
26+
ansible-lint -v *.yml roles/{local,cloud-*}/*/*.yml
27+
28+
scripted-deploy:
29+
runs-on: ubuntu-16.04
30+
strategy:
31+
matrix:
32+
UBUNTU_VERSION: ["18.04", "19.10"]
33+
steps:
34+
- uses: actions/checkout@v1
35+
- uses: actions/setup-python@v1
36+
with:
37+
python-version: '3.7'
38+
39+
- name: Install dependencies
40+
run: |
41+
sudo apt update -y
42+
sudo add-apt-repository -yu ppa:wireguard/wireguard
43+
sudo apt install -y \
44+
python3-pip \
45+
lxd \
46+
expect-dev \
47+
debootstrap \
48+
tree \
49+
bridge-utils \
50+
dnsutils \
51+
build-essential \
52+
libssl-dev \
53+
libffi-dev \
54+
python3-dev \
55+
linux-headers-$(uname -r) \
56+
wireguard \
57+
libxml2-utils \
58+
crudini \
59+
fping \
60+
strongswan \
61+
libstrongswan-standard-plugins \
62+
resolvconf
63+
64+
python3 -m pip install --upgrade pip
65+
python3 -m pip install -r requirements.txt
66+
67+
- name: Provision
68+
env:
69+
DEPLOY: cloud-init
70+
UBUNTU_VERSION: ${{ matrix.UBUNTU_VERSION }}
71+
REPOSITORY: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name || github.repository }}
72+
BRANCH: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref }}
73+
run: |
74+
ssh-keygen -f ~/.ssh/id_rsa -t rsa -N ''
75+
# sed -i "s/^reduce_mtu:\s0$/reduce_mtu: 80/" config.cfg
76+
sudo -E ./tests/pre-deploy.sh
77+
78+
- name: Deployment
79+
run: |
80+
until sudo lxc exec algo -- test -f /var/log/cloud-init-output.log; do echo 'Log file not found, Sleep for 3 seconds'; sleep 3; done
81+
( sudo lxc exec algo -- tail -f /var/log/cloud-init-output.log & )
82+
until sudo lxc exec algo -- test -f /var/lib/cloud/data/result.json; do
83+
echo 'Cloud init is not finished. Sleep for 30 seconds';
84+
sleep 30;
85+
done
86+
sudo lxc exec algo -- test -f /opt/algo/configs/localhost/.config.yml
87+
sudo lxc exec algo -- tar zcf /root/algo-configs.tar -C /opt/algo/configs/ .
88+
sudo lxc file pull algo/root/algo-configs.tar ./
89+
sudo tar -C ./configs -zxf algo-configs.tar
90+
91+
- name: Tests
92+
run: |
93+
set -x
94+
sudo -E bash -x ./tests/wireguard-client.sh
95+
sudo env "PATH=$PATH" ./tests/ipsec-client.sh
96+
97+
local-deploy:
98+
runs-on: ubuntu-16.04
99+
strategy:
100+
matrix:
101+
UBUNTU_VERSION: ["18.04", "19.10"]
102+
steps:
103+
- uses: actions/checkout@v1
104+
- uses: actions/setup-python@v1
105+
with:
106+
python-version: '3.7'
107+
108+
- name: Install dependencies
109+
run: |
110+
set -x
111+
sudo add-apt-repository -yu ppa:wireguard/wireguard
112+
sudo add-apt-repository -yu ppa:ubuntu-lxc/stable
113+
sudo apt update -y
114+
sudo apt install -y \
115+
python3-pip \
116+
lxd \
117+
expect-dev \
118+
debootstrap \
119+
tree \
120+
bridge-utils \
121+
dnsutils \
122+
build-essential \
123+
libssl-dev \
124+
libffi-dev \
125+
python3-dev \
126+
linux-headers-$(uname -r) \
127+
wireguard \
128+
libxml2-utils \
129+
crudini \
130+
fping \
131+
strongswan \
132+
libstrongswan-standard-plugins \
133+
resolvconf
134+
135+
python3 -m pip install --upgrade pip
136+
python3 -m pip install -r requirements.txt
137+
138+
- name: Provision
139+
env:
140+
DEPLOY: docker
141+
UBUNTU_VERSION: ${{ matrix.UBUNTU_VERSION }}
142+
REPOSITORY: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name || github.repository }}
143+
BRANCH: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref }}
144+
run: |
145+
ssh-keygen -f ~/.ssh/id_rsa -t rsa -N ''
146+
sed -i "s/^reduce_mtu:\s0$/reduce_mtu: 80/" config.cfg
147+
sudo -E ./tests/pre-deploy.sh
148+
149+
- name: Deployment
150+
env:
151+
DEPLOY: docker
152+
UBUNTU_VERSION: ${{ matrix.UBUNTU_VERSION }}
153+
run: |
154+
docker build -t local/algo .
155+
./tests/local-deploy.sh
156+
./tests/update-users.sh
157+
158+
- name: Tests
159+
run: |
160+
set -x
161+
sudo bash -x ./tests/wireguard-client.sh
162+
sudo env "PATH=$PATH" bash -x ./tests/ipsec-client.sh
163+
sudo bash -x ./tests/ssh-tunnel.sh

.travis.yml

Lines changed: 0 additions & 123 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,30 @@
11
## 1.2 [(Unreleased)](https://github.com/trailofbits/algo/tree/HEAD)
22

3+
### Added
34
- New provider CloudStack added [\#1420](https://github.com/trailofbits/algo/pull/1420)
5+
- Support for Ubuntu 19.10 [\#1630](https://github.com/trailofbits/algo/pull/1630)
6+
- Allow WireGuard to listen on port 53 [\#1594](https://github.com/trailofbits/algo/pull/1594)
7+
- Introducing Makefile [\#1553](https://github.com/trailofbits/algo/pull/1553)
8+
- Option to unblock SMB and Netbios [\#1558](https://github.com/trailofbits/algo/pull/1558)
9+
- Allow OnDemand to be toggled later [\#1557](https://github.com/trailofbits/algo/pull/1557)
10+
- New provider Hetzner added [\#1549](https://github.com/trailofbits/algo/pull/1549)
11+
- Alternative Ingress IP [\#1605](https://github.com/trailofbits/algo/pull/1605)
12+
13+
### Fixes
14+
- WSL private SSH key permissions [\#1584](https://github.com/trailofbits/algo/pull/1584)
15+
- Scaleway instance creating issue [\#1549](https://github.com/trailofbits/algo/pull/1549)
16+
17+
### Changed
18+
- SSH changes [\#1636](https://github.com/trailofbits/algo/pull/1636)
19+
- Default port is set to `4160` and can be changed in the config
20+
- SSH user for every cloud provider is `algo`
21+
- EC2: enable EBS encryption by default [\#1556](https://github.com/trailofbits/algo/pull/1556)
22+
- Upgrades [\#1549](https://github.com/trailofbits/algo/pull/1549)
23+
- Python 3
24+
- Ansible 2.8
25+
26+
### Breaking changes
27+
- Python virtual environment moved to .env [\#1549](https://github.com/trailofbits/algo/pull/1549)
428

529

630
## 1.1 [(Jul 31, 2019)](https://github.com/trailofbits/algo/releases/tag/v1.1)

0 commit comments

Comments
 (0)