From ba5ad50412a63b3ddbad1bd681f64c5a6a1dd29c Mon Sep 17 00:00:00 2001 From: BitterPanda63 Date: Tue, 28 Jan 2025 10:05:52 +0100 Subject: [PATCH] Rename AIKIDO_BLOCKING, AIKIDO_BLOCK --- .../agent_api/helpers/env/BlockingEnv.java | 2 +- .../test/java/collectors/FileCollectorTest.java | 12 ++++++------ .../java/collectors/HostnameCollectorTest.java | 2 +- .../test/java/collectors/URLCollectorTest.java | 8 ++++---- .../test/java/helpers/ShouldBlockHelperTest.java | 4 ++-- .../test/java/vulnerabilities/ScannerTest.java | 10 +++++----- .../test/java/wrappers/ApacheHttpClientTest.java | 8 ++++---- .../test/java/wrappers/FileReaderWriterTest.java | 4 ++-- .../src/test/java/wrappers/FileWrapperTest.java | 2 +- .../wrappers/HttpURLConnectionRedirectTest.java | 12 ++++++------ .../src/test/java/wrappers/InetAddressTest.java | 10 +++++----- .../src/test/java/wrappers/MSSQLWrapperTest.java | 16 ++++++++-------- .../test/java/wrappers/MariadbWrapperTest.java | 16 ++++++++-------- .../test/java/wrappers/MysqlCJWrapperTest.java | 16 ++++++++-------- agent_api/src/test/java/wrappers/OkHttpTest.java | 8 ++++---- .../src/test/java/wrappers/PathWrapperTest.java | 10 +++++----- .../src/test/java/wrappers/PathsWrapperTest.java | 4 ++-- .../test/java/wrappers/PostgresWrapperTest.java | 16 ++++++++-------- .../src/test/java/wrappers/RestTemplateTest.java | 8 ++++---- .../src/test/java/wrappers/RuntimeExecTest.java | 4 ++-- .../test/java/wrappers/URLConnectionTest.java | 10 +++++----- sample-apps/JavalinPostgres/Makefile | 4 ++-- sample-apps/KtorPostgresNetty/Makefile | 2 +- sample-apps/SpringBootMSSQL/Makefile | 2 +- sample-apps/SpringBootMySQL/Makefile | 2 +- sample-apps/SpringBootPostgres/Makefile | 4 ++-- sample-apps/SpringMVCPostgresGroovy/Makefile | 2 +- sample-apps/SpringMVCPostgresKotlin/Makefile | 2 +- sample-apps/SpringWebfluxSampleApp/Makefile | 2 +- 29 files changed, 101 insertions(+), 101 deletions(-) diff --git a/agent_api/src/main/java/dev/aikido/agent_api/helpers/env/BlockingEnv.java b/agent_api/src/main/java/dev/aikido/agent_api/helpers/env/BlockingEnv.java index fbb3fc61..7f844422 100644 --- a/agent_api/src/main/java/dev/aikido/agent_api/helpers/env/BlockingEnv.java +++ b/agent_api/src/main/java/dev/aikido/agent_api/helpers/env/BlockingEnv.java @@ -1,7 +1,7 @@ package dev.aikido.agent_api.helpers.env; public class BlockingEnv extends BooleanEnv { - private static final String environmentName = "AIKIDO_BLOCKING"; + private static final String environmentName = "AIKIDO_BLOCK"; private static final boolean defaultValue = false; public BlockingEnv() { diff --git a/agent_api/src/test/java/collectors/FileCollectorTest.java b/agent_api/src/test/java/collectors/FileCollectorTest.java index 665bdf50..94a7cb17 100644 --- a/agent_api/src/test/java/collectors/FileCollectorTest.java +++ b/agent_api/src/test/java/collectors/FileCollectorTest.java @@ -30,7 +30,7 @@ public void setup() { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testStrings() { isPathTraversalAttack("/etc/home/../../test.txt.js"); @@ -42,7 +42,7 @@ public void testStrings() { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testPaths() { isPathTraversalAttack(filePath1); @@ -53,7 +53,7 @@ public void testPaths() { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testStringArrays() { isPathTraversalAttack(new String[]{"/etc/home/../../test.txt.js"}); @@ -65,7 +65,7 @@ public void testStringArrays() { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testFileURIs() throws URISyntaxException { isPathTraversalAttack(new URI("file:///etc/home/../../test.txt.js")); @@ -79,7 +79,7 @@ public void testFileURIs() throws URISyntaxException { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testNotRecognizedObjects() throws MalformedURLException { isNotPathTraversalAttack(true); @@ -104,7 +104,7 @@ public void isNotPathTraversalAttack(Object filePath) { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testMaxRecursion() { isPathTraversalAttack(new Object[]{new Object[]{"/etc/home/../../test.txt.js"}}); // Depth of 1 diff --git a/agent_api/src/test/java/collectors/HostnameCollectorTest.java b/agent_api/src/test/java/collectors/HostnameCollectorTest.java index 0bbf6479..c6890859 100644 --- a/agent_api/src/test/java/collectors/HostnameCollectorTest.java +++ b/agent_api/src/test/java/collectors/HostnameCollectorTest.java @@ -89,7 +89,7 @@ public SampleContextObject() { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "1") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "1") @Test public void testHostnameSameWithContextAsAttack() { ThreadCacheObject myThreadCache = mock(ThreadCacheObject.class); diff --git a/agent_api/src/test/java/collectors/URLCollectorTest.java b/agent_api/src/test/java/collectors/URLCollectorTest.java index dda1f208..925b8261 100644 --- a/agent_api/src/test/java/collectors/URLCollectorTest.java +++ b/agent_api/src/test/java/collectors/URLCollectorTest.java @@ -33,7 +33,7 @@ private void setContextAndLifecycle(String url) { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testNewUrlConnectionWithPort() throws IOException { setContextAndLifecycle(""); @@ -46,7 +46,7 @@ public void testNewUrlConnectionWithPort() throws IOException { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testNewUrlConnectionWithHttp() throws IOException { setContextAndLifecycle(""); @@ -58,7 +58,7 @@ public void testNewUrlConnectionWithHttp() throws IOException { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testNewUrlConnectionHttps() throws IOException { setContextAndLifecycle(""); @@ -70,7 +70,7 @@ public void testNewUrlConnectionHttps() throws IOException { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testNewUrlConnectionFaultyProtocol() throws IOException { setContextAndLifecycle(""); diff --git a/agent_api/src/test/java/helpers/ShouldBlockHelperTest.java b/agent_api/src/test/java/helpers/ShouldBlockHelperTest.java index 67d7aa8d..7bfee358 100644 --- a/agent_api/src/test/java/helpers/ShouldBlockHelperTest.java +++ b/agent_api/src/test/java/helpers/ShouldBlockHelperTest.java @@ -11,14 +11,14 @@ public class ShouldBlockHelperTest { @Test @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") public void testWithInvalidAikidoTokenTrue() { assertTrue(ShouldBlockHelper.shouldBlock()); } @Test @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "false") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "false") public void testWithInvalidAikidoTokenFalse() { assertFalse(ShouldBlockHelper.shouldBlock()); } diff --git a/agent_api/src/test/java/vulnerabilities/ScannerTest.java b/agent_api/src/test/java/vulnerabilities/ScannerTest.java index f95403ca..26593051 100644 --- a/agent_api/src/test/java/vulnerabilities/ScannerTest.java +++ b/agent_api/src/test/java/vulnerabilities/ScannerTest.java @@ -81,7 +81,7 @@ void testScanForGivenVulnerability_ContextIsNull() { // Disable IPC : @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "improper-access-token") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test void testScanSafeSQLCode() { // Safe : @@ -98,7 +98,7 @@ void testScanSafeSQLCode() { // Disable IPC : @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "improper-access-token") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test void testBypassedIPs() { // Thread cache does not force any protection off : @@ -131,7 +131,7 @@ void testBypassedIPs() { // Disable IPC : @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "improper-access-token") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test void testForceProtectionOff() { // Thread cache does not force any protection off : @@ -156,7 +156,7 @@ void testForceProtectionOff() { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "improper-access-token") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test void testDoesNotRunWithContextNull() { Context.set(null); @@ -166,7 +166,7 @@ void testDoesNotRunWithContextNull() { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "improper-access-token") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test void TestStillThrowsWithThreadCacheUndefined() { ThreadCache.set(null); diff --git a/agent_api/src/test/java/wrappers/ApacheHttpClientTest.java b/agent_api/src/test/java/wrappers/ApacheHttpClientTest.java index a9d26956..971efae3 100644 --- a/agent_api/src/test/java/wrappers/ApacheHttpClientTest.java +++ b/agent_api/src/test/java/wrappers/ApacheHttpClientTest.java @@ -39,7 +39,7 @@ private void setContextAndLifecycle(String url) { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testSSRFLocalhostValid() throws Exception { setContextAndLifecycle("http://localhost:5000"); @@ -67,7 +67,7 @@ public void testSSRFLocalhostValid() throws Exception { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testSSRFWithoutPort() throws Exception { setContextAndLifecycle("http://localhost:80"); @@ -78,7 +78,7 @@ public void testSSRFWithoutPort() throws Exception { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testSSRFWithoutPortAndWithoutContext() throws Exception { setContextAndLifecycle("http://localhost:80"); @@ -89,7 +89,7 @@ public void testSSRFWithoutPortAndWithoutContext() throws Exception { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testSSRFWithoutPortAndWithoutThreadCache() throws Exception { setContextAndLifecycle("http://localhost:80"); diff --git a/agent_api/src/test/java/wrappers/FileReaderWriterTest.java b/agent_api/src/test/java/wrappers/FileReaderWriterTest.java index 79d81a20..07fabbdb 100644 --- a/agent_api/src/test/java/wrappers/FileReaderWriterTest.java +++ b/agent_api/src/test/java/wrappers/FileReaderWriterTest.java @@ -34,7 +34,7 @@ private void setContextAndLifecycle(String url) { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testFileReader() throws Exception { setContextAndLifecycle("../file.txt"); @@ -57,7 +57,7 @@ public void testFileReader() throws Exception { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testFileWriter() throws Exception { setContextAndLifecycle("../file.txt"); diff --git a/agent_api/src/test/java/wrappers/FileWrapperTest.java b/agent_api/src/test/java/wrappers/FileWrapperTest.java index 920a9832..c71183b9 100644 --- a/agent_api/src/test/java/wrappers/FileWrapperTest.java +++ b/agent_api/src/test/java/wrappers/FileWrapperTest.java @@ -33,7 +33,7 @@ private void setContextAndLifecycle(String url) { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testPathTraversalString() throws Exception { setContextAndLifecycle("../file.txt"); diff --git a/agent_api/src/test/java/wrappers/HttpURLConnectionRedirectTest.java b/agent_api/src/test/java/wrappers/HttpURLConnectionRedirectTest.java index dcdaf97b..69ec15aa 100644 --- a/agent_api/src/test/java/wrappers/HttpURLConnectionRedirectTest.java +++ b/agent_api/src/test/java/wrappers/HttpURLConnectionRedirectTest.java @@ -40,7 +40,7 @@ private void setContextAndLifecycle(String url) { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testSrrfTest() { setContextAndLifecycle(SSRF_TEST); @@ -60,7 +60,7 @@ public void testSrrfTest() { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testSrrfTestTwice() { setContextAndLifecycle(SSRF_TEST_TWICE); @@ -79,7 +79,7 @@ public void testSrrfTestTwice() { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testSrrfTestDomain() { setContextAndLifecycle(SSRF_TEST_DOMAIN); @@ -98,7 +98,7 @@ public void testSrrfTestDomain() { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testSrrfTestDomainTwice() { setContextAndLifecycle(SSRF_TEST_DOMAIN_TWICE); @@ -117,7 +117,7 @@ public void testSrrfTestDomainTwice() { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testSsrfCrossDomain() { setContextAndLifecycle(CROSS_DOMAIN_TEST); @@ -136,7 +136,7 @@ public void testSsrfCrossDomain() { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testSsrfCrossDomainTwice() { setContextAndLifecycle(CROSS_DOMAIN_TEST_DOMAIN_TWICE); diff --git a/agent_api/src/test/java/wrappers/InetAddressTest.java b/agent_api/src/test/java/wrappers/InetAddressTest.java index 59057892..d40a5217 100644 --- a/agent_api/src/test/java/wrappers/InetAddressTest.java +++ b/agent_api/src/test/java/wrappers/InetAddressTest.java @@ -37,7 +37,7 @@ private void setContextAndLifecycle(String url) { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testSSRFLocalhostValid() throws Exception { setContextAndLifecycle("http://localhost:5000"); @@ -67,7 +67,7 @@ public void testSSRFLocalhostValid() throws Exception { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testSSRFWithoutPort() throws Exception { setContextAndLifecycle("http://localhost:80"); @@ -78,7 +78,7 @@ public void testSSRFWithoutPort() throws Exception { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testSSRFWithoutPortAndWithoutContext() throws Exception { setContextAndLifecycle("http://localhost:80"); @@ -89,7 +89,7 @@ public void testSSRFWithoutPortAndWithoutContext() throws Exception { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testSSRFWithoutPortAndWithoutThreadCache() throws Exception { setContextAndLifecycle("http://localhost:80"); @@ -100,7 +100,7 @@ public void testSSRFWithoutPortAndWithoutThreadCache() throws Exception { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testSSRFWithHttpClient() { setContextAndLifecycle("http://localhost:5000/"); diff --git a/agent_api/src/test/java/wrappers/MSSQLWrapperTest.java b/agent_api/src/test/java/wrappers/MSSQLWrapperTest.java index 5dc5ebda..5ce19190 100644 --- a/agent_api/src/test/java/wrappers/MSSQLWrapperTest.java +++ b/agent_api/src/test/java/wrappers/MSSQLWrapperTest.java @@ -52,7 +52,7 @@ public void tearDown() throws SQLException { @Test @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") public void testSelectSqlWithPrepareStatement() throws SQLException { ThreadCache.set(null); @@ -71,7 +71,7 @@ public void testSelectSqlWithPrepareStatement() throws SQLException { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testSelectSqlSafeWithPrepareStatement() throws SQLException { ThreadCache.set(null); @@ -92,7 +92,7 @@ public void testSelectSqlSafeWithPrepareStatement() throws SQLException { @Test @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") public void testSelectSqlWithPreparedStatementWithoutExecute() throws SQLException { ThreadCache.set(null); @@ -110,7 +110,7 @@ public void testSelectSqlWithPreparedStatementWithoutExecute() throws SQLExcepti @Test @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") public void testExecute() throws SQLException { Statement stmt = connection.createStatement(); Context.set(new EmptySampleContextObject("SELECT * FROM notpets;")); @@ -130,7 +130,7 @@ public void testExecute() throws SQLException { @Test @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") public void testAddBatch() throws SQLException { Statement stmt = connection.createStatement(); Context.set(new EmptySampleContextObject("Fluffy")); @@ -152,7 +152,7 @@ public void testAddBatch() throws SQLException { @Test @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") public void testExecuteLargeUpdate() throws SQLException { Statement stmt = connection.createStatement(); Context.set(new EmptySampleContextObject("Buddy")); @@ -172,7 +172,7 @@ public void testExecuteLargeUpdate() throws SQLException { @Test @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") public void testExecuteQuery() throws SQLException { Statement stmt = connection.createStatement(); Context.set(new EmptySampleContextObject("* FROM pets")); @@ -191,7 +191,7 @@ public void testExecuteQuery() throws SQLException { @Test @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") public void testExecuteUpdate() throws SQLException { Statement stmt = connection.createStatement(); Context.set(new EmptySampleContextObject("UPDATE")); diff --git a/agent_api/src/test/java/wrappers/MariadbWrapperTest.java b/agent_api/src/test/java/wrappers/MariadbWrapperTest.java index ef074cb1..a46ed4c1 100644 --- a/agent_api/src/test/java/wrappers/MariadbWrapperTest.java +++ b/agent_api/src/test/java/wrappers/MariadbWrapperTest.java @@ -45,7 +45,7 @@ public void tearDown() throws SQLException { @Test @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") public void testSelectSqlWithPrepareStatement() throws SQLException { ThreadCache.set(null); @@ -64,7 +64,7 @@ public void testSelectSqlWithPrepareStatement() throws SQLException { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testSelectSqlSafeWithPrepareStatement() throws SQLException { ThreadCache.set(null); @@ -85,7 +85,7 @@ public void testSelectSqlSafeWithPrepareStatement() throws SQLException { @Test @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") public void testSelectSqlWithPreparedStatementWithoutExecute() throws SQLException { ThreadCache.set(null); @@ -103,7 +103,7 @@ public void testSelectSqlWithPreparedStatementWithoutExecute() throws SQLExcepti @Test @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") public void testExecute() throws SQLException { Statement stmt = connection.createStatement(); Context.set(new EmptySampleContextObject("SELECT * FROM notpets;")); @@ -123,7 +123,7 @@ public void testExecute() throws SQLException { @Test @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") public void testAddBatch() throws SQLException { Statement stmt = connection.createStatement(); Context.set(new EmptySampleContextObject("Fluffy")); @@ -145,7 +145,7 @@ public void testAddBatch() throws SQLException { @Test @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") public void testExecuteLargeUpdate() throws SQLException { Statement stmt = connection.createStatement(); Context.set(new EmptySampleContextObject("Buddy")); @@ -165,7 +165,7 @@ public void testExecuteLargeUpdate() throws SQLException { @Test @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") public void testExecuteQuery() throws SQLException { Statement stmt = connection.createStatement(); Context.set(new EmptySampleContextObject("* FROM pets")); @@ -184,7 +184,7 @@ public void testExecuteQuery() throws SQLException { @Test @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") public void testExecuteUpdate() throws SQLException { Statement stmt = connection.createStatement(); Context.set(new EmptySampleContextObject("UPDATE")); diff --git a/agent_api/src/test/java/wrappers/MysqlCJWrapperTest.java b/agent_api/src/test/java/wrappers/MysqlCJWrapperTest.java index 653d23c8..b7019916 100644 --- a/agent_api/src/test/java/wrappers/MysqlCJWrapperTest.java +++ b/agent_api/src/test/java/wrappers/MysqlCJWrapperTest.java @@ -42,7 +42,7 @@ public void tearDown() throws SQLException { @Test @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") public void testSelectSqlWithPrepareStatement() throws SQLException { ThreadCache.set(null); @@ -61,7 +61,7 @@ public void testSelectSqlWithPrepareStatement() throws SQLException { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testSelectSqlSafeWithPrepareStatement() throws SQLException { ThreadCache.set(null); @@ -82,7 +82,7 @@ public void testSelectSqlSafeWithPrepareStatement() throws SQLException { @Test @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") public void testSelectSqlWithPreparedStatementWithoutExecute() throws SQLException { ThreadCache.set(null); @@ -100,7 +100,7 @@ public void testSelectSqlWithPreparedStatementWithoutExecute() throws SQLExcepti @Test @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") public void testExecute() throws SQLException { Statement stmt = connection.createStatement(); Context.set(new EmptySampleContextObject("SELECT * FROM notpets;")); @@ -120,7 +120,7 @@ public void testExecute() throws SQLException { @Test @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") public void testAddBatch() throws SQLException { Statement stmt = connection.createStatement(); Context.set(new EmptySampleContextObject("Fluffy")); @@ -142,7 +142,7 @@ public void testAddBatch() throws SQLException { @Test @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") public void testExecuteLargeUpdate() throws SQLException { Statement stmt = connection.createStatement(); Context.set(new EmptySampleContextObject("Buddy")); @@ -162,7 +162,7 @@ public void testExecuteLargeUpdate() throws SQLException { @Test @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") public void testExecuteQuery() throws SQLException { Statement stmt = connection.createStatement(); Context.set(new EmptySampleContextObject("* FROM pets")); @@ -181,7 +181,7 @@ public void testExecuteQuery() throws SQLException { @Test @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") public void testExecuteUpdate() throws SQLException { Statement stmt = connection.createStatement(); Context.set(new EmptySampleContextObject("UPDATE")); diff --git a/agent_api/src/test/java/wrappers/OkHttpTest.java b/agent_api/src/test/java/wrappers/OkHttpTest.java index 908e6eb7..9bf7c60e 100644 --- a/agent_api/src/test/java/wrappers/OkHttpTest.java +++ b/agent_api/src/test/java/wrappers/OkHttpTest.java @@ -39,7 +39,7 @@ private void setContextAndLifecycle(String url) { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testSSRFLocalhostValid() throws Exception { setContextAndLifecycle("http://localhost:5000"); @@ -67,7 +67,7 @@ public void testSSRFLocalhostValid() throws Exception { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testSSRFWithoutPort() throws Exception { setContextAndLifecycle("http://localhost:80"); @@ -78,7 +78,7 @@ public void testSSRFWithoutPort() throws Exception { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testSSRFWithoutPortAndWithoutContext() throws Exception { setContextAndLifecycle("http://localhost:80"); @@ -89,7 +89,7 @@ public void testSSRFWithoutPortAndWithoutContext() throws Exception { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testSSRFWithoutPortAndWithoutThreadCache() throws Exception { setContextAndLifecycle("http://localhost:80"); diff --git a/agent_api/src/test/java/wrappers/PathWrapperTest.java b/agent_api/src/test/java/wrappers/PathWrapperTest.java index 5004ef52..bad2b428 100644 --- a/agent_api/src/test/java/wrappers/PathWrapperTest.java +++ b/agent_api/src/test/java/wrappers/PathWrapperTest.java @@ -30,7 +30,7 @@ private void setContextAndLifecycle(String url) { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testPathTraversalInResolve() throws Exception { setContextAndLifecycle("../opt/"); @@ -45,7 +45,7 @@ public void testPathTraversalInResolve() throws Exception { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testPathTraversalInResolveWithPath() throws Exception { Path maliciousPath = Paths.get("/../opt/test.txt"); @@ -63,7 +63,7 @@ public void testPathTraversalInResolveWithPath() throws Exception { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testPathTraversalInResolveSibling() throws Exception { setContextAndLifecycle("../opt/"); @@ -78,7 +78,7 @@ public void testPathTraversalInResolveSibling() throws Exception { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testPathTraversalInResolveSiblingWithPath() throws Exception { Path basePath = Paths.get("/var/"); @@ -96,7 +96,7 @@ public void testPathTraversalInResolveSiblingWithPath() throws Exception { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testPathTraversalInRelativize() throws Exception { Path basePath = Paths.get("/var/opt/"); diff --git a/agent_api/src/test/java/wrappers/PathsWrapperTest.java b/agent_api/src/test/java/wrappers/PathsWrapperTest.java index 26f9226a..2c838aa1 100644 --- a/agent_api/src/test/java/wrappers/PathsWrapperTest.java +++ b/agent_api/src/test/java/wrappers/PathsWrapperTest.java @@ -29,7 +29,7 @@ private void setContextAndLifecycle(String url) { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testPathTraversalWithSinglePath() throws Exception { setContextAndLifecycle("../opt/"); @@ -43,7 +43,7 @@ public void testPathTraversalWithSinglePath() throws Exception { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testPathTraversalWithMultiplePaths() throws Exception { setContextAndLifecycle("../opt/"); diff --git a/agent_api/src/test/java/wrappers/PostgresWrapperTest.java b/agent_api/src/test/java/wrappers/PostgresWrapperTest.java index ef1d04b3..46c3bd69 100644 --- a/agent_api/src/test/java/wrappers/PostgresWrapperTest.java +++ b/agent_api/src/test/java/wrappers/PostgresWrapperTest.java @@ -41,7 +41,7 @@ public void tearDown() throws SQLException { @Test @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") public void testSelectSqlWithPrepareStatement() throws SQLException { ThreadCache.set(null); @@ -60,7 +60,7 @@ public void testSelectSqlWithPrepareStatement() throws SQLException { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testSelectSqlSafeWithPrepareStatement() throws SQLException { ThreadCache.set(null); @@ -81,7 +81,7 @@ public void testSelectSqlSafeWithPrepareStatement() throws SQLException { @Test @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") public void testSelectSqlWithPreparedStatementWithoutExecute() throws SQLException { ThreadCache.set(null); @@ -99,7 +99,7 @@ public void testSelectSqlWithPreparedStatementWithoutExecute() throws SQLExcepti @Test @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") public void testExecute() throws SQLException { Statement stmt = connection.createStatement(); Context.set(new EmptySampleContextObject("SELECT * FROM notpets;")); @@ -119,7 +119,7 @@ public void testExecute() throws SQLException { @Test @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") public void testAddBatch() throws SQLException { Statement stmt = connection.createStatement(); Context.set(new EmptySampleContextObject("Fluffy")); @@ -141,7 +141,7 @@ public void testAddBatch() throws SQLException { @Test @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") public void testExecuteLargeUpdate() throws SQLException { Statement stmt = connection.createStatement(); Context.set(new EmptySampleContextObject("Buddy")); @@ -161,7 +161,7 @@ public void testExecuteLargeUpdate() throws SQLException { @Test @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") public void testExecuteQuery() throws SQLException { Statement stmt = connection.createStatement(); Context.set(new EmptySampleContextObject("* FROM pets")); @@ -180,7 +180,7 @@ public void testExecuteQuery() throws SQLException { @Test @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") public void testExecuteUpdate() throws SQLException { Statement stmt = connection.createStatement(); Context.set(new EmptySampleContextObject("SELECT * FROM notpets;")); diff --git a/agent_api/src/test/java/wrappers/RestTemplateTest.java b/agent_api/src/test/java/wrappers/RestTemplateTest.java index 3421b442..34966779 100644 --- a/agent_api/src/test/java/wrappers/RestTemplateTest.java +++ b/agent_api/src/test/java/wrappers/RestTemplateTest.java @@ -33,7 +33,7 @@ private void setContextAndLifecycle(String url) { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testSSRFLocalhostValid() throws Exception { setContextAndLifecycle("http://localhost:5000"); @@ -61,7 +61,7 @@ public void testSSRFLocalhostValid() throws Exception { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testSSRFWithoutPort() throws Exception { setContextAndLifecycle("http://localhost:80"); @@ -72,7 +72,7 @@ public void testSSRFWithoutPort() throws Exception { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testSSRFWithoutPortAndWithoutContext() throws Exception { setContextAndLifecycle("http://localhost:80"); @@ -83,7 +83,7 @@ public void testSSRFWithoutPortAndWithoutContext() throws Exception { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testSSRFWithoutPortAndWithoutThreadCache() throws Exception { setContextAndLifecycle("http://localhost:80"); diff --git a/agent_api/src/test/java/wrappers/RuntimeExecTest.java b/agent_api/src/test/java/wrappers/RuntimeExecTest.java index b2c4cf1e..39a9332c 100644 --- a/agent_api/src/test/java/wrappers/RuntimeExecTest.java +++ b/agent_api/src/test/java/wrappers/RuntimeExecTest.java @@ -27,7 +27,7 @@ private void setContextAndLifecycle(String url) { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testShellInjection() { setContextAndLifecycle(" -la"); @@ -54,7 +54,7 @@ public void testShellInjection() { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token-2") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testOnlyScansStrings() { setContextAndLifecycle("whoami"); diff --git a/agent_api/src/test/java/wrappers/URLConnectionTest.java b/agent_api/src/test/java/wrappers/URLConnectionTest.java index 8f395191..b3b0df5b 100644 --- a/agent_api/src/test/java/wrappers/URLConnectionTest.java +++ b/agent_api/src/test/java/wrappers/URLConnectionTest.java @@ -34,7 +34,7 @@ private void setContextAndLifecycle(String url) { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testNewUrlConnectionWithPort() throws IOException { setContextAndLifecycle(""); @@ -47,7 +47,7 @@ public void testNewUrlConnectionWithPort() throws IOException { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testNewUrlConnectionWithHttp() throws IOException { setContextAndLifecycle(""); @@ -60,7 +60,7 @@ public void testNewUrlConnectionWithHttp() throws IOException { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testNewUrlConnectionWithHttpAsHttp() throws IOException { HttpURLConnection urlConnection = (HttpURLConnection) new URL("http://app.local.aikido.io").openConnection(); @@ -71,7 +71,7 @@ public void testNewUrlConnectionWithHttpAsHttp() throws IOException { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testNewUrlConnectionHttps() throws IOException { setContextAndLifecycle(""); @@ -84,7 +84,7 @@ public void testNewUrlConnectionHttps() throws IOException { } @SetEnvironmentVariable(key = "AIKIDO_TOKEN", value = "invalid-token") - @SetEnvironmentVariable(key = "AIKIDO_BLOCKING", value = "true") + @SetEnvironmentVariable(key = "AIKIDO_BLOCK", value = "true") @Test public void testNewUrlConnectionFaultyProtocol() throws IOException { setContextAndLifecycle(""); diff --git a/sample-apps/JavalinPostgres/Makefile b/sample-apps/JavalinPostgres/Makefile index e2a212d4..d84b5e01 100644 --- a/sample-apps/JavalinPostgres/Makefile +++ b/sample-apps/JavalinPostgres/Makefile @@ -21,7 +21,7 @@ run: build AIKIDO_TOKEN="token" \ AIKIDO_REALTIME_ENDPOINT="http://localhost:5000/realtime" \ AIKIDO_ENDPOINT="http://localhost:5000" \ - AIKIDO_BLOCKING=1 \ + AIKIDO_BLOCK=1 \ nohup java -javaagent:$(JAVA_AGENT) -DportNumber=8088 -jar $(JAR_FILE) > output1.log & # Run the application without Zen @@ -39,7 +39,7 @@ runWithOpentel: build AIKIDO_TOKEN="token" \ AIKIDO_REALTIME_ENDPOINT="http://localhost:5000/realtime" \ AIKIDO_ENDPOINT="http://localhost:5000" \ - AIKIDO_BLOCKING=1 \ + AIKIDO_BLOCK=1 \ AIKIDO_LOG_LEVEL="trace" \ nohup java -javaagent:$(JAVA_AGENT) -javaagent:opentelemetry-javaagent.jar -Dotel.service.name=service -DportNumber=8088 -jar $(JAR_FILE) > output1.log & diff --git a/sample-apps/KtorPostgresNetty/Makefile b/sample-apps/KtorPostgresNetty/Makefile index 9a9e77e0..e7f8cef0 100644 --- a/sample-apps/KtorPostgresNetty/Makefile +++ b/sample-apps/KtorPostgresNetty/Makefile @@ -21,7 +21,7 @@ run: build AIKIDO_TOKEN="token" \ AIKIDO_REALTIME_ENDPOINT="http://localhost:5000/realtime" \ AIKIDO_ENDPOINT="http://localhost:5000" \ - AIKIDO_BLOCKING=1 \ + AIKIDO_BLOCK=1 \ nohup java -javaagent:$(JAVA_AGENT) -jar $(JAR_FILE) 8096 > output1.log & # Run the application without Zen diff --git a/sample-apps/SpringBootMSSQL/Makefile b/sample-apps/SpringBootMSSQL/Makefile index 0930875c..7bc1d44b 100644 --- a/sample-apps/SpringBootMSSQL/Makefile +++ b/sample-apps/SpringBootMSSQL/Makefile @@ -21,7 +21,7 @@ run: build AIKIDO_TOKEN="token" \ AIKIDO_REALTIME_ENDPOINT="http://localhost:5000/realtime" \ AIKIDO_ENDPOINT="http://localhost:5000" \ - AIKIDO_BLOCKING=1 \ + AIKIDO_BLOCK=1 \ nohup java -javaagent:$(JAVA_AGENT) -jar $(JAR_FILE) --server.port=8086 > output1.log & # Run the application without Zen diff --git a/sample-apps/SpringBootMySQL/Makefile b/sample-apps/SpringBootMySQL/Makefile index 4ef674f2..236b50ff 100644 --- a/sample-apps/SpringBootMySQL/Makefile +++ b/sample-apps/SpringBootMySQL/Makefile @@ -21,7 +21,7 @@ run: build AIKIDO_TOKEN="token" \ AIKIDO_REALTIME_ENDPOINT="http://localhost:5000/realtime" \ AIKIDO_ENDPOINT="http://localhost:5000" \ - AIKIDO_BLOCKING=1 \ + AIKIDO_BLOCK=1 \ AIKIDO_LOG_LEVEL="debug" \ nohup java -javaagent:$(JAVA_AGENT) -jar $(JAR_FILE) --server.port=8082 > output1.log & diff --git a/sample-apps/SpringBootPostgres/Makefile b/sample-apps/SpringBootPostgres/Makefile index 5e55bdae..61877cef 100644 --- a/sample-apps/SpringBootPostgres/Makefile +++ b/sample-apps/SpringBootPostgres/Makefile @@ -22,7 +22,7 @@ run: build AIKIDO_TOKEN="token" \ AIKIDO_REALTIME_ENDPOINT="http://localhost:5000/realtime" \ AIKIDO_ENDPOINT="http://localhost:5000" \ - AIKIDO_BLOCKING=1 \ + AIKIDO_BLOCK=1 \ nohup java -javaagent:$(JAVA_AGENT) -jar $(JAR_FILE) --server.port=8080 > output1.log & .PHONY: runWithDdTrace @@ -33,7 +33,7 @@ runWithDdTrace: build AIKIDO_TOKEN="token" \ AIKIDO_REALTIME_ENDPOINT="http://localhost:5000/realtime" \ AIKIDO_ENDPOINT="http://localhost:5000" \ - AIKIDO_BLOCKING=1 \ + AIKIDO_BLOCK=1 \ nohup java -javaagent:dd-java-agent.jar -Ddd.profiling.enabled=true -Ddd.logs.injection=true -Ddd.service=my-app -Ddd.env=staging -Ddd.version=1.0 -javaagent:$(JAVA_AGENT) -jar $(JAR_FILE) --server.port=8080 > output1.log & # Run the application without Zen diff --git a/sample-apps/SpringMVCPostgresGroovy/Makefile b/sample-apps/SpringMVCPostgresGroovy/Makefile index 3d5d2664..a12cbfeb 100644 --- a/sample-apps/SpringMVCPostgresGroovy/Makefile +++ b/sample-apps/SpringMVCPostgresGroovy/Makefile @@ -22,7 +22,7 @@ run: build AIKIDO_TOKEN="token" \ AIKIDO_REALTIME_ENDPOINT="http://localhost:5000/realtime" \ AIKIDO_ENDPOINT="http://localhost:5000" \ - AIKIDO_BLOCKING=1 \ + AIKIDO_BLOCK=1 \ nohup java -javaagent:$(JAVA_AGENT) -jar $(JAR_FILE) --server.port=8094 > output1.log & # Run the application without Zen diff --git a/sample-apps/SpringMVCPostgresKotlin/Makefile b/sample-apps/SpringMVCPostgresKotlin/Makefile index fab3a495..87fdd9e8 100644 --- a/sample-apps/SpringMVCPostgresKotlin/Makefile +++ b/sample-apps/SpringMVCPostgresKotlin/Makefile @@ -22,7 +22,7 @@ run: build AIKIDO_TOKEN="token" \ AIKIDO_REALTIME_ENDPOINT="http://localhost:5000/realtime" \ AIKIDO_ENDPOINT="http://localhost:5000" \ - AIKIDO_BLOCKING=1 \ + AIKIDO_BLOCK=1 \ nohup java -javaagent:$(JAVA_AGENT) -jar $(JAR_FILE) --server.port=8092 > output1.log & # Run the application without Zen diff --git a/sample-apps/SpringWebfluxSampleApp/Makefile b/sample-apps/SpringWebfluxSampleApp/Makefile index 2249bd36..ad9b0e50 100644 --- a/sample-apps/SpringWebfluxSampleApp/Makefile +++ b/sample-apps/SpringWebfluxSampleApp/Makefile @@ -22,7 +22,7 @@ run: build AIKIDO_TOKEN="token" \ AIKIDO_REALTIME_ENDPOINT="http://localhost:5000/realtime" \ AIKIDO_ENDPOINT="http://localhost:5000" \ - AIKIDO_BLOCKING=1 \ + AIKIDO_BLOCK=1 \ nohup java -javaagent:$(JAVA_AGENT) -jar $(JAR_FILE) --server.port=8090 > output1.log & # Run the application without Zen