Skip to content

Commit 21b6b53

Browse files
committed
AIKIDO_BLOCKING -> AIKIDO_BLOCK
1 parent 1396ebc commit 21b6b53

File tree

24 files changed

+47
-47
lines changed

24 files changed

+47
-47
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Here's how:
7979

8080
By default, Zen will only detect and report attacks to Aikido.
8181

82-
To block requests, set the `AIKIDO_BLOCKING` environment variable to `true`.
82+
To block requests, set the `AIKIDO_BLOCK` environment variable to `true`.
8383

8484
See [Reporting to Aikido](#reporting-to-your-aikido-security-dashboard) to learn how to send events to Aikido.
8585

aikido_zen/helpers/check_env_for_blocking.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77

88
def check_env_for_blocking():
99
"""
10-
Checks the environment variable "AIKIDO_BLOCKING"
10+
Checks the environment variable "AIKIDO_BLOCK"
1111
"""
1212
# Set log level
13-
aikido_blocking_env = os.getenv("AIKIDO_BLOCKING")
13+
aikido_blocking_env = os.getenv("AIKIDO_BLOCK")
1414
if aikido_blocking_env is not None:
1515
return aikido_blocking_env.lower() in ["true", "1"]
1616
return False

aikido_zen/sinks/tests/requests_test.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,49 +54,49 @@ def set_context_and_lifecycle(url):
5454
def test_srrf_test(monkeypatch):
5555
reset_comms()
5656
set_context_and_lifecycle(SSRF_TEST)
57-
monkeypatch.setenv("AIKIDO_BLOCKING", "1")
57+
monkeypatch.setenv("AIKIDO_BLOCK", "1")
5858

5959
with pytest.raises(AikidoSSRF):
6060
requests.get(SSRF_TEST)
6161

6262

6363
def test_srrf_test_twice(monkeypatch):
6464
set_context_and_lifecycle(SSRF_TEST_TWICE)
65-
monkeypatch.setenv("AIKIDO_BLOCKING", "1")
65+
monkeypatch.setenv("AIKIDO_BLOCK", "1")
6666
with pytest.raises(AikidoSSRF):
6767
requests.get(SSRF_TEST_TWICE)
6868

6969

7070
def test_srrf_test_domain(monkeypatch):
7171
set_context_and_lifecycle(SSRF_TEST_DOMAIN)
72-
monkeypatch.setenv("AIKIDO_BLOCKING", "1")
72+
monkeypatch.setenv("AIKIDO_BLOCK", "1")
7373
with pytest.raises(AikidoSSRF):
7474
requests.get(SSRF_TEST_DOMAIN)
7575

7676

7777
def test_srrf_test_domain_twice(monkeypatch):
7878
set_context_and_lifecycle(SSRF_TEST_DOMAIN_TWICE)
79-
monkeypatch.setenv("AIKIDO_BLOCKING", "1")
79+
monkeypatch.setenv("AIKIDO_BLOCK", "1")
8080
with pytest.raises(AikidoSSRF):
8181
requests.get(SSRF_TEST_DOMAIN_TWICE)
8282

8383

8484
def test_cross_domain(monkeypatch):
8585
set_context_and_lifecycle(CROSS_DOMAIN_TEST)
86-
monkeypatch.setenv("AIKIDO_BLOCKING", "1")
86+
monkeypatch.setenv("AIKIDO_BLOCK", "1")
8787
with pytest.raises(AikidoSSRF):
8888
requests.get(CROSS_DOMAIN_TEST)
8989

9090

9191
def test_cross_domain_test_domain_twice(monkeypatch):
9292
set_context_and_lifecycle(CROSS_DOMAIN_TEST_DOMAIN_TWICE)
93-
monkeypatch.setenv("AIKIDO_BLOCKING", "1")
93+
monkeypatch.setenv("AIKIDO_BLOCK", "1")
9494
with pytest.raises(AikidoSSRF):
9595
requests.get(CROSS_DOMAIN_TEST_DOMAIN_TWICE)
9696

9797

9898
def test_no_raises_if_diff_url(monkeypatch):
9999
set_context_and_lifecycle(CROSS_DOMAIN_TEST_DOMAIN_TWICE)
100-
monkeypatch.setenv("AIKIDO_BLOCKING", "1")
100+
monkeypatch.setenv("AIKIDO_BLOCK", "1")
101101
with pytest.raises(requests.exceptions.ConnectionError):
102102
requests.get(SSRF_TEST_DOMAIN_TWICE)

aikido_zen/sinks/tests/urrlib3_test.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def test_srrf_test(monkeypatch):
5555
http = urllib3.PoolManager()
5656
reset_comms()
5757
set_context_and_lifecycle(SSRF_TEST)
58-
monkeypatch.setenv("AIKIDO_BLOCKING", "1")
58+
monkeypatch.setenv("AIKIDO_BLOCK", "1")
5959

6060
with pytest.raises(AikidoSSRF):
6161
http.request("GET", SSRF_TEST)
@@ -64,46 +64,46 @@ def test_srrf_test(monkeypatch):
6464
def test_srrf_test_twice(monkeypatch):
6565
http = urllib3.PoolManager()
6666
set_context_and_lifecycle(SSRF_TEST_TWICE)
67-
monkeypatch.setenv("AIKIDO_BLOCKING", "1")
67+
monkeypatch.setenv("AIKIDO_BLOCK", "1")
6868
with pytest.raises(AikidoSSRF):
6969
http.request("GET", SSRF_TEST_TWICE)
7070

7171

7272
def test_srrf_test_domain(monkeypatch):
7373
http = urllib3.PoolManager()
7474
set_context_and_lifecycle(SSRF_TEST_DOMAIN)
75-
monkeypatch.setenv("AIKIDO_BLOCKING", "1")
75+
monkeypatch.setenv("AIKIDO_BLOCK", "1")
7676
with pytest.raises(AikidoSSRF):
7777
http.request("GET", SSRF_TEST_DOMAIN)
7878

7979

8080
def test_srrf_test_domain_twice(monkeypatch):
8181
http = urllib3.PoolManager()
8282
set_context_and_lifecycle(SSRF_TEST_DOMAIN_TWICE)
83-
monkeypatch.setenv("AIKIDO_BLOCKING", "1")
83+
monkeypatch.setenv("AIKIDO_BLOCK", "1")
8484
with pytest.raises(AikidoSSRF):
8585
http.request("GET", SSRF_TEST_DOMAIN_TWICE)
8686

8787

8888
def test_cross_domain(monkeypatch):
8989
http = urllib3.PoolManager()
9090
set_context_and_lifecycle(CROSS_DOMAIN_TEST)
91-
monkeypatch.setenv("AIKIDO_BLOCKING", "1")
91+
monkeypatch.setenv("AIKIDO_BLOCK", "1")
9292
with pytest.raises(AikidoSSRF):
9393
http.request("GET", CROSS_DOMAIN_TEST)
9494

9595

9696
def test_cross_domain_test_domain_twice(monkeypatch):
9797
http = urllib3.PoolManager()
9898
set_context_and_lifecycle(CROSS_DOMAIN_TEST_DOMAIN_TWICE)
99-
monkeypatch.setenv("AIKIDO_BLOCKING", "1")
99+
monkeypatch.setenv("AIKIDO_BLOCK", "1")
100100
with pytest.raises(AikidoSSRF):
101101
http.request("GET", CROSS_DOMAIN_TEST_DOMAIN_TWICE)
102102

103103

104104
def test_no_raises_if_diff_url(monkeypatch):
105105
http = urllib3.PoolManager()
106106
set_context_and_lifecycle(CROSS_DOMAIN_TEST_DOMAIN_TWICE)
107-
monkeypatch.setenv("AIKIDO_BLOCKING", "1")
107+
monkeypatch.setenv("AIKIDO_BLOCK", "1")
108108
with pytest.raises(urllib3.exceptions.MaxRetryError):
109109
http.request("GET", SSRF_TEST_DOMAIN_TWICE)

aikido_zen/vulnerabilities/init_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def test_lifecycle_cache_bypassed_ip(caplog, get_context):
9191
def test_sql_injection(caplog, get_context, monkeypatch):
9292
get_context.set_as_current_context()
9393
cache = ThreadCache()
94-
monkeypatch.setenv("AIKIDO_BLOCKING", "1")
94+
monkeypatch.setenv("AIKIDO_BLOCK", "1")
9595
with pytest.raises(AikidoSQLInjection):
9696
run_vulnerability_scan(
9797
kind="sql_injection",
@@ -103,7 +103,7 @@ def test_sql_injection(caplog, get_context, monkeypatch):
103103
def test_sql_injection_with_route_params(caplog, get_context, monkeypatch):
104104
get_context.set_as_current_context()
105105
cache = ThreadCache()
106-
monkeypatch.setenv("AIKIDO_BLOCKING", "1")
106+
monkeypatch.setenv("AIKIDO_BLOCK", "1")
107107
with pytest.raises(AikidoSQLInjection):
108108
run_vulnerability_scan(
109109
kind="sql_injection",
@@ -116,7 +116,7 @@ def test_sql_injection_with_comms(caplog, get_context, monkeypatch):
116116
get_context.set_as_current_context()
117117
cache = ThreadCache()
118118
cache.last_renewal = 9999999999999999999999
119-
monkeypatch.setenv("AIKIDO_BLOCKING", "1")
119+
monkeypatch.setenv("AIKIDO_BLOCK", "1")
120120
with patch("aikido_zen.background_process.comms.get_comms") as mock_get_comms:
121121
# Create a mock comms object
122122
mock_comms = MagicMock()
@@ -139,7 +139,7 @@ def test_sql_injection_with_comms(caplog, get_context, monkeypatch):
139139

140140
def test_ssrf_with_comms_hostnames_add(caplog, get_context, monkeypatch):
141141
get_context.set_as_current_context()
142-
monkeypatch.setenv("AIKIDO_BLOCKING", "1")
142+
monkeypatch.setenv("AIKIDO_BLOCK", "1")
143143
with patch("aikido_zen.background_process.comms.get_comms") as mock_get_comms:
144144
# Create a mock comms object
145145
mock_comms = MagicMock()

docs/django.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ If you're using gunicorn, please check our docs on that first : [Click Here](./g
2626

2727
By default, the firewall will run in non-blocking mode. When it detects an attack, the attack will be reported to Aikido and continue executing the call.
2828

29-
You can enable blocking mode by setting the environment variable `AIKIDO_BLOCKING` to `true`:
29+
You can enable blocking mode by setting the environment variable `AIKIDO_BLOCK` to `true`:
3030

3131
```sh
32-
AIKIDO_BLOCKING=true
32+
AIKIDO_BLOCK=true
3333
```
3434

3535
It's recommended to enable this on your staging environment for a considerable amount of time before enabling it on your production environment (e.g. one week).

docs/fastapi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ AIKIDO_TOKEN="AIK_RUNTIME_YOUR_TOKEN_HERE"
2222

2323
By default, the firewall will run in non-blocking mode. When it detects an attack, the attack will be reported to Aikido and continue executing the call.
2424

25-
You can enable blocking mode by setting the environment variable `AIKIDO_BLOCKING` to `true`:
25+
You can enable blocking mode by setting the environment variable `AIKIDO_BLOCK` to `true`:
2626

2727
```sh
28-
AIKIDO_BLOCKING=true
28+
AIKIDO_BLOCK=true
2929
```
3030

3131
It's recommended to enable this on your staging environment for a considerable amount of time before enabling it on your production environment (e.g. one week).

docs/flask.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ If you're using gunicorn, please check our docs on that first : [Click Here](./g
2525

2626
By default, the firewall will run in non-blocking mode. When it detects an attack, the attack will be reported to Aikido and continue executing the call.
2727

28-
You can enable blocking mode by setting the environment variable `AIKIDO_BLOCKING` to `true`:
28+
You can enable blocking mode by setting the environment variable `AIKIDO_BLOCK` to `true`:
2929

3030
```sh
31-
AIKIDO_BLOCKING=true
31+
AIKIDO_BLOCK=true
3232
```
3333

3434
It's recommended to enable this on your staging environment for a considerable amount of time before enabling it on your production environment (e.g. one week).

docs/gunicorn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ AIKIDO_TOKEN="AIK_RUNTIME_YOUR_TOKEN_HERE"
2626
```
2727

2828
- Enabling extra debugging (optional): ```AIKIDO_DEBUG=1```
29-
- Enabling blocking using an env variable (optional): ```AIKIDO_BLOCKING=1```
29+
- Enabling blocking using an env variable (optional): ```AIKIDO_BLOCK=1```

docs/quart.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ Since this removes all other middleware.
4141

4242
By default, the firewall will run in non-blocking mode. When it detects an attack, the attack will be reported to Aikido and continue executing the call.
4343

44-
You can enable blocking mode by setting the environment variable `AIKIDO_BLOCKING` to `true`:
44+
You can enable blocking mode by setting the environment variable `AIKIDO_BLOCK` to `true`:
4545

4646
```sh
47-
AIKIDO_BLOCKING=true
47+
AIKIDO_BLOCK=true
4848
```
4949

5050
It's recommended to enable this on your staging environment for a considerable amount of time before enabling it on your production environment (e.g. one week).

0 commit comments

Comments
 (0)