2021-02-11 14:11:47 +08:00
|
|
|
name: fuzzing
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2021-04-02 15:26:24 +08:00
|
|
|
paths-ignore:
|
|
|
|
- 'docs/**'
|
2021-02-11 14:11:47 +08:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
2021-04-02 15:26:24 +08:00
|
|
|
paths-ignore:
|
|
|
|
- 'docs/**'
|
2021-02-11 14:11:47 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
test_apisix:
|
|
|
|
name: run fuzzing
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
services:
|
|
|
|
etcd:
|
|
|
|
image: bitnami/etcd:3.4.0
|
|
|
|
ports:
|
|
|
|
- 2379:2379
|
|
|
|
- 2380:2380
|
|
|
|
env:
|
|
|
|
ALLOW_NONE_AUTHENTICATION: yes
|
|
|
|
ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Check out code
|
2021-05-12 19:00:14 +08:00
|
|
|
uses: actions/checkout@v2.3.4
|
2021-02-11 14:11:47 +08:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
2021-04-13 17:14:37 +08:00
|
|
|
- name: Cache deps
|
2021-05-28 18:04:33 +08:00
|
|
|
uses: actions/cache@v2.1.6
|
2021-04-13 17:14:37 +08:00
|
|
|
env:
|
|
|
|
cache-name: cache-deps
|
|
|
|
with:
|
|
|
|
path: deps
|
|
|
|
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('rockspec/apisix-master-0.rockspec') }}
|
|
|
|
|
2021-02-11 14:11:47 +08:00
|
|
|
- name: run apisix
|
|
|
|
run: |
|
|
|
|
wget -qO - https://openresty.org/package/pubkey.gpg | sudo apt-key add -
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get -y install software-properties-common
|
|
|
|
sudo add-apt-repository -y "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main"
|
|
|
|
sudo apt-get update
|
2021-02-20 20:28:21 +08:00
|
|
|
sudo apt-get install -y git openresty curl openresty-openssl111-dev unzip make gcc
|
2021-04-30 13:06:22 +08:00
|
|
|
sudo ./utils/linux-install-luarocks.sh
|
2021-02-11 14:11:47 +08:00
|
|
|
|
2021-05-10 21:23:03 +08:00
|
|
|
make deps
|
2021-02-11 14:11:47 +08:00
|
|
|
make init
|
|
|
|
make run
|
|
|
|
|
|
|
|
- name: run upstream
|
|
|
|
run: |
|
|
|
|
sudo openresty -c $PWD/t/fuzzing/upstream/nginx.conf
|
|
|
|
|
|
|
|
- name: install boofuzz
|
|
|
|
run: |
|
|
|
|
pip install typing boofuzz
|
|
|
|
|
2021-02-25 09:33:25 +08:00
|
|
|
- name: run simpleroute test
|
2021-02-11 14:11:47 +08:00
|
|
|
run: |
|
2021-02-25 09:33:25 +08:00
|
|
|
python $PWD/t/fuzzing/simpleroute_test.py
|
|
|
|
|
|
|
|
- name: run serverless route test
|
|
|
|
run: |
|
|
|
|
python $PWD/t/fuzzing/serverless_route_test.py
|
2021-02-11 14:11:47 +08:00
|
|
|
|
2021-03-01 10:02:15 +08:00
|
|
|
- name: run vars route test
|
2021-02-11 14:11:47 +08:00
|
|
|
run: |
|
2021-03-01 10:02:15 +08:00
|
|
|
python $PWD/t/fuzzing/vars_route_test.py
|