Skip to content

Commit 867a61f

Browse files
authored
Updated workflows and docs/packaging-naxsi.md (#166)
* Fix typo and updated instruction for Arch Linux * Updated reuse and jobs * Run CodeQL only when there is changes in the source code.
1 parent 7bc1141 commit 867a61f

File tree

8 files changed

+89
-67
lines changed

8 files changed

+89
-67
lines changed

.github/workflows/ci.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
container: ${{ matrix.container }}
3030
steps:
3131
- name: Checkout repository without submodule
32-
uses: actions/checkout@v3
32+
uses: actions/checkout@v4
3333
- name: Install system libinjection
3434
run: |
3535
sudo dnf -y install libinjection \
@@ -62,7 +62,7 @@ jobs:
6262
runs-on: ${{ matrix.os }}
6363
steps:
6464
- name: Checkout repository
65-
uses: actions/checkout@v3
65+
uses: actions/checkout@v4
6666
with:
6767
submodules: recursive
6868
persist-credentials: false
@@ -75,7 +75,7 @@ jobs:
7575
runs-on: ubuntu-latest
7676
steps:
7777
- name: Checkout repository
78-
uses: actions/checkout@v3
78+
uses: actions/checkout@v4
7979
with:
8080
submodules: recursive
8181
persist-credentials: false

.github/workflows/codeql-analysis.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@ name: "CodeQL"
22

33
on:
44
push:
5-
branches: [ "main" ]
5+
branches:
6+
- main
67
pull_request:
78
# The branches below must be a subset of the branches above
8-
branches: [ "main" ]
9+
branches:
10+
- main
11+
paths:
12+
- 'naxsi_src/**'
913
schedule:
1014
- cron: '42 17 * * 2'
1115

@@ -28,7 +32,7 @@ jobs:
2832

2933
steps:
3034
- name: Checkout repository
31-
uses: actions/checkout@v3
35+
uses: actions/checkout@v4
3236
with:
3337
submodules: recursive
3438
persist-credentials: false

.github/workflows/distros.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
name: "Release Tarball"
2727
steps:
2828
- name: Checkout repository
29-
uses: actions/checkout@v3
29+
uses: actions/checkout@v4
3030
with:
3131
submodules: recursive
3232
persist-credentials: false
@@ -56,7 +56,7 @@ jobs:
5656
name: "Release Zip"
5757
steps:
5858
- name: Checkout repository
59-
uses: actions/checkout@v3
59+
uses: actions/checkout@v4
6060
with:
6161
submodules: recursive
6262
persist-credentials: false
@@ -134,7 +134,7 @@ jobs:
134134

135135
steps:
136136
- name: Checkout repository
137-
uses: actions/checkout@v3
137+
uses: actions/checkout@v4
138138

139139
# APK package
140140
- name: Install required dependencies

.github/workflows/linter.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout repository
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020
- name: Check debug logs are disabled
2121
run: /bin/bash .scripts/ci-debug-check.sh
2222

2323
distro-ci-check:
2424
runs-on: ubuntu-latest
2525
steps:
2626
- name: Checkout repository
27-
uses: actions/checkout@v3
27+
uses: actions/checkout@v4
2828
with:
2929
submodules: recursive
3030
persist-credentials: false
@@ -35,9 +35,9 @@ jobs:
3535
runs-on: ubuntu-latest
3636
steps:
3737
- name: Checkout repository
38-
uses: actions/checkout@v3
38+
uses: actions/checkout@v4
3939
- name: Reuse Compliance Check
40-
uses: fsfe/reuse-action@v2
40+
uses: fsfe/reuse-action@v5
4141
with:
4242
args: --suppress-deprecation lint
4343

@@ -46,7 +46,7 @@ jobs:
4646
runs-on: ubuntu-latest
4747
steps:
4848
- name: Checkout repository
49-
uses: actions/checkout@v3
49+
uses: actions/checkout@v4
5050
- name: Install wget, software-properties-common, lsb-release (dependencies of LLVM install script)
5151
run: sudo apt --assume-yes install wget software-properties-common lsb-release
5252
- name: Install automatic LLVM 16
@@ -60,7 +60,7 @@ jobs:
6060
runs-on: ubuntu-latest
6161
steps:
6262
- name: Checkout repository
63-
uses: actions/checkout@v3
63+
uses: actions/checkout@v4
6464
- name: Install python3
6565
run: sudo apt --assume-yes install python3
6666
- name: Format check rules

.github/workflows/windows.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
shell: cmd
3232
steps:
3333
- name: Checkout repository
34-
uses: actions/checkout@v3
34+
uses: actions/checkout@v4
3535
with:
3636
submodules: recursive
3737
persist-credentials: false

.reuse/dep5

-41
This file was deleted.

REUSE.toml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
version = 1
2+
SPDX-PackageName = "Naxsi WAF"
3+
SPDX-PackageSupplier = "deroad <[email protected]>"
4+
SPDX-PackageDownloadLocation = "https://github.com/wargio/naxsi"
5+
6+
[[annotations]]
7+
path = ".github/**"
8+
precedence = "aggregate"
9+
SPDX-FileCopyrightText = "2022 deroad <[email protected]>"
10+
SPDX-License-Identifier = "LGPL-3.0-only"
11+
12+
[[annotations]]
13+
path = ".clang-format"
14+
precedence = "aggregate"
15+
SPDX-FileCopyrightText = "2022 deroad <[email protected]>"
16+
SPDX-License-Identifier = "LGPL-3.0-only"
17+
18+
[[annotations]]
19+
path = [".gitignore", ".gitmodules"]
20+
precedence = "aggregate"
21+
SPDX-FileCopyrightText = "2022 deroad <[email protected]>"
22+
SPDX-License-Identifier = "LGPL-3.0-only"
23+
24+
[[annotations]]
25+
path = "distros/**"
26+
precedence = "aggregate"
27+
SPDX-FileCopyrightText = "2022 deroad <[email protected]>"
28+
SPDX-License-Identifier = "LGPL-3.0-only"
29+
30+
[[annotations]]
31+
path = "naxsi_rules/**"
32+
precedence = "aggregate"
33+
SPDX-FileCopyrightText = "2022 deroad <[email protected]>"
34+
SPDX-License-Identifier = "LGPL-3.0-only"
35+
36+
[[annotations]]
37+
path = ["README.md", ".gitattributes", "logo.png"]
38+
precedence = "aggregate"
39+
SPDX-FileCopyrightText = "2019 nbs-system <[email protected]>"
40+
SPDX-License-Identifier = "GPL-3.0-or-later"
41+
42+
[[annotations]]
43+
path = "naxsi_rules/naxsi_core.rules"
44+
precedence = "aggregate"
45+
SPDX-FileCopyrightText = "2019 nbs-system <[email protected]>"
46+
SPDX-License-Identifier = "GPL-3.0-or-later"
47+
48+
[[annotations]]
49+
path = "unit-tests/**"
50+
precedence = "aggregate"
51+
SPDX-FileCopyrightText = ["2019 nbs-system <[email protected]> \\", "2022 deroad <[email protected]>"]
52+
SPDX-License-Identifier = "GPL-3.0-or-later"
53+
54+
[[annotations]]
55+
path = "docs/**.md"
56+
precedence = "aggregate"
57+
SPDX-FileCopyrightText = "2022 deroad <[email protected]>"
58+
SPDX-License-Identifier = "LGPL-3.0-only"
59+
60+
[[annotations]]
61+
path = "docs/old**"
62+
precedence = "aggregate"
63+
SPDX-FileCopyrightText = "2019 nbs-system <[email protected]>"
64+
SPDX-License-Identifier = "GPL-3.0-or-later"

docs/packaging-naxsi.md

+5-10
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,11 @@
22

33
This section describes how to build naxsi from source and package it for various distros.
44

5-
## Packaging for Ubuntu and Debian
5+
## Packaging for Ubuntu and Debian Linux.
66

77
> ℹ️ Info
88
>
9-
> Ubuntu Mantic uses **`libpcre2-dev`** instad of `libpcre3-dev`.
10-
11-
> ℹ️ Info
12-
>
13-
> Debian bookworm uses **`libpcre2-dev`** and requires also **`libperl-dev`**
9+
> Some Ubuntu & Debian releases, like *Mantic* and *Bookworm*, uses **`libpcre2-dev`** instead of `libpcre3-dev`.
1410
1511
```bash
1612
# first fetch all required dependencies
@@ -82,13 +78,12 @@ sed -i "s/@NAXSI_VERSION@/$NAXSI_VERSION/" "$DEB_PKG/control.install"
8278

8379
```bash
8480
# fetch the needed dependencies
85-
pacman -Syy --needed --noconfirm sudo base-devel git
81+
pacman -Syy --needed --noconfirm sudo wget base-devel git
8682

87-
# clone the repo with all submodules
88-
git clone --recurse-submodules https://github.com/wargio/naxsi.git
83+
# fetch PKGBUILD (you can also use tags) instead of the main branch
84+
wget https://raw.githubusercontent.com/wargio/naxsi/refs/heads/main/distros/arch/PKGBUILD
8985

9086
# build the package
91-
cd naxsi/distros/arch
9287
makepkg -s
9388
```
9489

0 commit comments

Comments
 (0)