Skip to content

Commit a5f1a75

Browse files
committed
adding github actions
1 parent c1e8131 commit a5f1a75

File tree

90 files changed

+25059
-0
lines changed

Some content is hidden

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

90 files changed

+25059
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Build and Upload to Github artifacts
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
build-and-upload:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout repository
11+
uses: actions/checkout@v4
12+
- name: build docker
13+
run: |
14+
docker build -t dimssss/modsec:latest .
15+
- name: run modsec container in background
16+
run: |
17+
docker run --name modsec -d dimssss/modsec:latest /bin/bash -c sleep 60
18+
- name: Copy libs from modsec container
19+
# Use 'docker cp' to copy the file to the runner's workspace
20+
run: docker cp modsec:/wafie/build/libwafie.so .
21+
- name: Upload binary artifact
22+
uses: actions/upload-artifact@v4
23+
with:
24+
name: libwafie
25+
path: libwafie.so
26+
27+

Dockerfile

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
FROM envoyproxy/envoy:contrib-v1.34.1
2+
RUN apt -y update \
3+
&& apt install -y \
4+
apt-utils \
5+
autoconf \
6+
automake \
7+
build-essential \
8+
git \
9+
libcurl4-openssl-dev \
10+
libgeoip-dev \
11+
liblmdb-dev \
12+
libpcre2-dev \
13+
libtool \
14+
libxml2-dev \
15+
libyajl-dev \
16+
pkgconf \
17+
wget \
18+
zlib1g-dev \
19+
curl \
20+
gcc \
21+
g++ \
22+
gdb \
23+
clang \
24+
make \
25+
ninja-build \
26+
cmake \
27+
valgrind \
28+
locales-all \
29+
dos2unix \
30+
rsync \
31+
tar
32+
RUN apt clean \
33+
&& git clone \
34+
--depth 1 \
35+
-b v3/master \
36+
--single-branch https://github.com/owasp-modsecurity/ModSecurity
37+
RUN cd /ModSecurity \
38+
&& git submodule init \
39+
&& git submodule update \
40+
&& ./build.sh \
41+
&& ./configure \
42+
&& make \
43+
&& make install
44+
COPY config/ /config
45+
COPY include/ /wafie/include
46+
COPY src/ /wafie/src
47+
COPY CMakeLists.txt /wafie
48+
RUN cd /wafie \
49+
&& mkdir build \
50+
&& cd build \
51+
&& cmake ../ \
52+
&& cmake --build .
53+

0 commit comments

Comments
 (0)