Skip to content

Commit f25687e

Browse files
committed
Merge branch 'main' into add-outbound-blocking
2 parents 6a9a7df + 2b7dcc9 commit f25687e

89 files changed

Lines changed: 2963 additions & 1199 deletions

File tree

Some content is hidden

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

.github/workflows/benchmark.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,13 @@ jobs:
1515
- name: Start databases
1616
working-directory: ./sample-apps/databases
1717
run: docker compose up --build -d
18+
1819
- name: Set up Python 3.9
1920
uses: actions/setup-python@v5
2021
with:
2122
python-version: 3.9
23+
- name: Setup safe-chain
24+
run: curl -fsSL https://github.com/AikidoSec/safe-chain/releases/latest/download/install-safe-chain.sh | sh -s -- --ci
2225

2326
- name: Install dependencies
2427
run: |

.github/workflows/end2end.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ jobs:
5858
uses: actions/setup-python@v5
5959
with:
6060
python-version: ${{ matrix.python-version }}
61+
- name: Setup safe-chain
62+
run: curl -fsSL https://github.com/AikidoSec/safe-chain/releases/latest/download/install-safe-chain.sh | sh -s -- --ci
63+
6164
- name: Install dependencies
6265
run: |
6366
python -m pip install --upgrade pip

.github/workflows/lint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
uses: actions/setup-python@v5
1616
with:
1717
python-version: '3.13'
18+
- name: Setup safe-chain
19+
run: curl -fsSL https://github.com/AikidoSec/safe-chain/releases/latest/download/install-safe-chain.sh | sh -s -- --ci
1820

1921
- name: Install dependencies
2022
run: |

.github/workflows/publish.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ jobs:
1818
- name: Add local.aikido.io to /etc/hosts
1919
run: |
2020
sudo echo "127.0.0.1 local.aikido.io" | sudo tee -a /etc/hosts
21+
22+
- name: Setup safe-chain
23+
run: curl -fsSL https://github.com/AikidoSec/safe-chain/releases/latest/download/install-safe-chain.sh | sh -s -- --ci
24+
2125
- name: Installation
2226
run: make dev_install
2327
- name: Run Pylint

.github/workflows/qa-tests.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ jobs:
2727
uses: actions/setup-python@v5
2828
with:
2929
python-version: "3.13"
30-
30+
- name: Setup safe-chain
31+
run: curl -fsSL https://github.com/AikidoSec/safe-chain/releases/latest/download/install-safe-chain.sh | sh -s -- --ci
3132
- name: Install poetry
3233
run: pip install poetry
3334

@@ -45,9 +46,10 @@ jobs:
4546
cp firewall-python/.github/workflows/Dockerfile.qa zen-demo-python/Dockerfile
4647
4748
- name: Run Firewall QA Tests
48-
uses: AikidoSec/firewall-tester-action@v1.0.0
49+
uses: AikidoSec/firewall-tester-action@v1.0.4
4950
with:
5051
dockerfile_path: ./zen-demo-python/Dockerfile
5152
app_port: 8080
52-
sleep_before_test: 10
53-
skip_tests: test_bypassed_ip_for_geo_blocking,test_demo_apps_generic_tests,test_path_traversal,test_wave_attack
53+
sleep_before_test: 30
54+
config_update_delay: 100
55+
skip_tests: test_bypassed_ip_for_geo_blocking,test_demo_apps_generic_tests,test_path_traversal,test_outbound_domain_blocking,test_bypassed_ip,test_wave_attack,test_block_traffic_by_countries,test_user_rate_limiting_1_minute

.github/workflows/smoke-test-ffi.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ jobs:
3838
if: runner.os == 'Linux'
3939
run: sudo apt-get install libmysqlclient-dev
4040

41+
- name: Setup safe-chain (Unix)
42+
if: runner.os != 'Windows'
43+
run: curl -fsSL https://github.com/AikidoSec/safe-chain/releases/latest/download/install-safe-chain.sh | sh -s -- --ci
44+
- name: Setup safe-chain (Windows)
45+
if: runner.os == 'Windows'
46+
run: iex "& { $(iwr 'https://github.com/AikidoSec/safe-chain/releases/latest/download/install-safe-chain.ps1' -UseBasicParsing) } -ci"
47+
4148
- name: Install dependencies
4249
run: make install && cp -r .cache/binaries/* aikido_zen/libs
4350

.github/workflows/test-publish.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ jobs:
1919
- name: Add local.aikido.io to /etc/hosts
2020
run: |
2121
sudo echo "127.0.0.1 local.aikido.io" | sudo tee -a /etc/hosts
22+
23+
- name: Setup safe-chain
24+
run: curl -fsSL https://github.com/AikidoSec/safe-chain/releases/latest/download/install-safe-chain.sh | sh -s -- --ci
25+
2226
- name: Installation
2327
run: make dev_install
2428
- name: Run Pylint

.github/workflows/unit-test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,13 @@ jobs:
2727
run: |
2828
cd end2end/server && docker build -t mock_core .
2929
docker run --name mock_core -d -p 5050:5000 mock_core
30+
3031
- name: Set up Python ${{ matrix.python-version }}
3132
uses: actions/setup-python@v5
3233
with:
3334
python-version: ${{ matrix.python-version }}
35+
- name: Setup safe-chain
36+
run: curl -fsSL https://github.com/AikidoSec/safe-chain/releases/latest/download/install-safe-chain.sh | sh -s -- --ci
3437

3538
- name: Install dependencies
3639
run: |

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Zen will autonomously protect your Python applications from the inside against:
2222
* 🛡️ [Command injection attacks](https://www.aikido.dev/blog/command-injection-in-2024-unpacked)
2323
* 🛡️ [Path traversal attacks](https://www.aikido.dev/blog/path-traversal-in-2024-the-year-unpacked)
2424
* 🛡️ [Server-side request forgery (SSRF)](./docs/ssrf.md)
25+
* 🛡️ [Attack wave detection](https://help.aikido.dev/zen-firewall/zen-features/attack-wave-protection)
2526

2627
Zen operates autonomously on the same server as your Python app to:
2728

aikido_zen/background_process/commands/sync_data_test.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ def test_process_sync_data_initialization(setup_connection_manager):
9393
assert connection_manager.statistics.get_record()["requests"] == {
9494
"aborted": 0,
9595
"attacksDetected": {"blocked": 0, "total": 5},
96+
"attackWaves": {"total": 0, "blocked": 0},
9697
"total": 10,
9798
"rateLimited": 0,
9899
}
@@ -168,6 +169,7 @@ def test_process_sync_data_with_last_updated_at_below_zero(setup_connection_mana
168169
assert connection_manager.statistics.get_record()["requests"] == {
169170
"aborted": 0,
170171
"attacksDetected": {"blocked": 0, "total": 5},
172+
"attackWaves": {"total": 0, "blocked": 0},
171173
"total": 10,
172174
"rateLimited": 0,
173175
}
@@ -255,6 +257,7 @@ def test_process_sync_data_existing_route_and_hostnames(setup_connection_manager
255257
assert connection_manager.statistics.get_record()["requests"] == {
256258
"aborted": 0,
257259
"attacksDetected": {"blocked": 0, "total": 10},
260+
"attackWaves": {"total": 0, "blocked": 0},
258261
"total": 20,
259262
"rateLimited": 0,
260263
}

0 commit comments

Comments
 (0)