-
Notifications
You must be signed in to change notification settings - Fork 2.5k
77 lines (65 loc) · 2.13 KB
/
fuzzing-ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: fuzzing
on:
push:
branches: [master, 'release/**']
paths-ignore:
- 'docs/**'
- '**/*.md'
pull_request:
branches: [master, 'release/**']
paths-ignore:
- 'docs/**'
- '**/*.md'
concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test_apisix:
name: run fuzzing
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Check out code
uses: actions/checkout@v3.2.0
with:
submodules: recursive
- name: Cache deps
uses: actions/cache@v3
env:
cache-name: cache-deps
with:
path: deps
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('rockspec/apisix-master-0.rockspec') }}
- name: Linux launch common services
run: |
project_compose_ci=ci/pod/docker-compose.common.yml make ci-env-up
- 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
sudo apt-get install -y git openresty curl openresty-openssl111-dev unzip make gcc libldap2-dev
./utils/linux-install-luarocks.sh
make deps
make init
make run
- name: run upstream
run: |
sudo openresty -c $PWD/t/fuzzing/upstream/nginx.conf
- name: install boofuzz
run: |
# Avoid "ERROR: flask has requirement click>=8.0, but you'll have click 7.0 which is incompatible"
sudo apt remove python3-click
pip install -r $PWD/t/fuzzing/requirements.txt
- name: run tests
run: |
python $PWD/t/fuzzing/simpleroute_test.py
python $PWD/t/fuzzing/serverless_route_test.py
python $PWD/t/fuzzing/vars_route_test.py
python $PWD/t/fuzzing/client_abort.py
python $PWD/t/fuzzing/simple_http.py
python $PWD/t/fuzzing/http_upstream.py