Skip to content

Commit

Permalink
Some renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
timokoessler committed Sep 12, 2024
1 parent bd8fdb7 commit bfb867d
Show file tree
Hide file tree
Showing 45 changed files with 156 additions and 156 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
This program is offered under a commercial and under the AGPL license.
You can be released from the requirements of the AGPL license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the Aikido Firewall software without
develop commercial activities involving the Aikido Zen software without
disclosing the source code of your own applications. These activities include
but are not limited to: offering paid services to customers in a web application
or shipping Aikido with a closed source product.
Expand Down
10 changes: 5 additions & 5 deletions end2end/tests/express-graphql.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ t.test("it blocks in blocking mode", (t) => {
t.equal(normalSearch.status, 200);
const sqlInjectionText = await sqlInjection.text();
const normalSearchText = await normalSearch.text();
t.match(sqlInjectionText, /Aikido firewall has blocked an SQL injection/);
t.match(sqlInjectionText, /Zen by Aikido has blocked an SQL injection/);
t.notMatch(
normalSearchText,
/Aikido firewall has blocked an SQL injection/
/Zen by Aikido has blocked an SQL injection/
);
t.match(stdout, /Starting agent/);
})
Expand Down Expand Up @@ -122,14 +122,14 @@ t.test("it does not block in dry mode", (t) => {
const normalSearchText = await normalSearch.text();
t.notMatch(
sqlInjectionText,
/Aikido firewall has blocked an SQL injection/
/Zen by Aikido has blocked an SQL injection/
);
t.notMatch(
normalSearchText,
/Aikido firewall has blocked an SQL injection/
/Zen by Aikido has blocked an SQL injection/
);
t.match(stdout, /Starting agent/);
t.notMatch(stderr, /Aikido firewall has blocked an SQL injection/);
t.notMatch(stderr, /Zen by Aikido has blocked an SQL injection/);
})
.catch((error) => {
t.fail(error.message);
Expand Down
4 changes: 2 additions & 2 deletions end2end/tests/express-mongodb.shell-injection.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ t.test("it blocks in blocking mode", (t) => {
t.equal(noSQLInjection.status, 500);
t.equal(normalSearch.status, 200);
t.match(stdout, /Starting agent/);
t.match(stderr, /Aikido firewall has blocked a shell injection/);
t.match(stderr, /Zen by Aikido has blocked a shell injection/);
})
.catch((error) => {
t.fail(error.message);
Expand Down Expand Up @@ -121,7 +121,7 @@ t.test("it does not block in dry mode", (t) => {
t.equal(noSQLInjection.status, 200);
t.equal(normalSearch.status, 200);
t.match(stdout, /Starting agent/);
t.notMatch(stderr, /Aikido firewall has blocked a shell injection/);
t.notMatch(stderr, /Zen by Aikido has blocked a shell injection/);
})
.catch((error) => {
t.fail(error.message);
Expand Down
8 changes: 4 additions & 4 deletions end2end/tests/express-mongodb.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ t.test("it blocks in blocking mode", (t) => {
t.equal(noSQLInjection.status, 500);
t.equal(normalSearch.status, 200);
t.match(stdout, /Starting agent/);
t.match(stderr, /Aikido firewall has blocked a NoSQL injection/);
t.match(stderr, /Zen by Aikido has blocked a NoSQL injection/);
})
.catch((error) => {
t.fail(error.message);
Expand Down Expand Up @@ -95,7 +95,7 @@ t.test("it does not block in dry mode", (t) => {
t.equal(noSQLInjection.status, 200);
t.equal(normalSearch.status, 200);
t.match(stdout, /Starting agent/);
t.notMatch(stderr, /Aikido firewall has blocked a NoSQL injection/);
t.notMatch(stderr, /Zen by Aikido has blocked a NoSQL injection/);
})
.catch((error) => {
t.fail(error.message);
Expand Down Expand Up @@ -164,7 +164,7 @@ t.test("it blocks in blocking mode (with open telemetry enabled)", (t) => {
t.equal(normalSearch.status, 200);
t.match(stdout, /mongodb\.find/);
t.match(stdout, /Starting agent/);
t.match(stderr, /Aikido firewall has blocked a NoSQL injection/);
t.match(stderr, /Zen by Aikido has blocked a NoSQL injection/);
})
.catch((error) => {
t.fail(error.message);
Expand Down Expand Up @@ -228,7 +228,7 @@ t.test("it does not block in dry mode (with open telemetry enabled)", (t) => {
t.equal(normalSearch.status, 200);
t.match(stdout, /mongodb\.find/);
t.match(stdout, /Starting agent/);
t.notMatch(stderr, /Aikido firewall has blocked a NoSQL injection/);
t.notMatch(stderr, /Zen by Aikido has blocked a NoSQL injection/);
})
.catch((error) => {
t.fail(error.message);
Expand Down
4 changes: 2 additions & 2 deletions end2end/tests/express-mongoose.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ t.test("it blocks in blocking mode", (t) => {
t.equal(noSQLInjection.status, 500);
t.equal(normalSearch.status, 200);
t.match(stdout, /Starting agent/);
t.match(stderr, /Aikido firewall has blocked a NoSQL injection/);
t.match(stderr, /Zen by Aikido has blocked a NoSQL injection/);
})
.catch((error) => {
t.fail(error.message);
Expand Down Expand Up @@ -93,7 +93,7 @@ t.test("it does not block in dry mode", (t) => {
t.equal(noSQLInjection.status, 200);
t.equal(normalSearch.status, 200);
t.match(stdout, /Starting agent/);
t.notMatch(stderr, /Aikido firewall has blocked a NoSQL injection/);
t.notMatch(stderr, /Zen by Aikido has blocked a NoSQL injection/);
})
.catch((error) => {
t.fail(error.message);
Expand Down
4 changes: 2 additions & 2 deletions end2end/tests/express-mysql.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ t.test("it blocks in blocking mode", (t) => {
t.equal(normalSearch.status, 200);
t.equal(normalAddXml.status, 200);
t.match(stdout, /Starting agent/);
t.match(stderr, /Aikido firewall has blocked an SQL injection/);
t.match(stderr, /Zen by Aikido has blocked an SQL injection/);
})
.catch((error) => {
t.fail(error.message);
Expand Down Expand Up @@ -135,7 +135,7 @@ t.test("it does not block in dry mode", (t) => {
t.equal(normalSearch.status, 200);
t.equal(normalAddXml.status, 200);
t.match(stdout, /Starting agent/);
t.notMatch(stderr, /Aikido firewall has blocked an SQL injection/);
t.notMatch(stderr, /Zen by Aikido has blocked an SQL injection/);
})
.catch((error) => {
t.fail(error.message);
Expand Down
4 changes: 2 additions & 2 deletions end2end/tests/express-mysql2.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ t.test("it blocks in blocking mode", (t) => {
t.equal(sqlInjection2.status, 500);
t.equal(normalSearch.status, 200);
t.match(stdout, /Starting agent/);
t.match(stderr, /Aikido firewall has blocked an SQL injection/);
t.match(stderr, /Zen by Aikido has blocked an SQL injection/);
})
.catch((error) => {
t.fail(error.message);
Expand Down Expand Up @@ -113,7 +113,7 @@ t.test("it does not block in dry mode", (t) => {
t.equal(sqlInjection2.status, 200);
t.equal(normalSearch.status, 200);
t.match(stdout, /Starting agent/);
t.notMatch(stderr, /Aikido firewall has blocked an SQL injection/);
t.notMatch(stderr, /Zen by Aikido has blocked an SQL injection/);
})
.catch((error) => {
t.fail(error.message);
Expand Down
4 changes: 2 additions & 2 deletions end2end/tests/express-path-traversal.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ t.test("it blocks in blocking mode", (t) => {
t.equal(pathTraversal.status, 500);
t.equal(normalSearch.status, 200);
t.match(stdout, /Starting agent/);
t.match(stderr, /Aikido firewall has blocked a path traversal attack/);
t.match(stderr, /Zen by Aikido has blocked a path traversal attack/);
})
.catch((error) => {
t.fail(error.message);
Expand Down Expand Up @@ -105,7 +105,7 @@ t.test("it does not block in dry mode", (t) => {
t.equal(pathTraversal.status, 200);
t.equal(normalSearch.status, 200);
t.match(stdout, /Starting agent/);
t.notMatch(stderr, /Aikido firewall has blocked a path traversal attack/);
t.notMatch(stderr, /Zen by Aikido has blocked a path traversal attack/);
})
.catch((error) => {
t.fail(error.message);
Expand Down
4 changes: 2 additions & 2 deletions end2end/tests/express-postgres.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ t.test("it blocks in blocking mode", (t) => {
t.equal(sqlInjection3.status, 500);
t.equal(normalSearch.status, 200);
t.match(stdout, /Starting agent/);
t.match(stderr, /Aikido firewall has blocked an SQL injection/);
t.match(stderr, /Zen by Aikido has blocked an SQL injection/);
}
)
.catch((error) => {
Expand Down Expand Up @@ -130,7 +130,7 @@ t.test("it does not block in dry mode", (t) => {
t.equal(sqlInjection3.status, 200);
t.equal(normalSearch.status, 200);
t.match(stdout, /Starting agent/);
t.notMatch(stderr, /Aikido firewall has blocked an SQL injection/);
t.notMatch(stderr, /Zen by Aikido has blocked an SQL injection/);
}
)
.catch((error) => {
Expand Down
4 changes: 2 additions & 2 deletions end2end/tests/hapi-postgres.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ t.test("it blocks in blocking mode", (t) => {
t.match(stdout, /Starting agent/);
t.match(
await noSQLInjection.text(),
/Aikido firewall has blocked an SQL injection/
/Zen by Aikido has blocked an SQL injection/
);
})
.catch((error) => {
Expand Down Expand Up @@ -104,7 +104,7 @@ t.test("it does not block in dry mode", (t) => {
t.match(stdout, /Starting agent/);
t.notMatch(
await noSQLInjection.text(),
/Aikido firewall has blocked an SQL injection/
/Zen by Aikido has blocked an SQL injection/
);
})
.catch((error) => {
Expand Down
4 changes: 2 additions & 2 deletions end2end/tests/hono-mongodb.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ t.test("it blocks in blocking mode", (t) => {
t.equal(noSQLInjection.status, 500);
t.equal(normalSearch.status, 200);
t.match(stdout, /Starting agent/);
t.match(stderr, /Aikido firewall has blocked a NoSQL injection/);
t.match(stderr, /Zen by Aikido has blocked a NoSQL injection/);
})
.catch((error) => {
t.fail(error.message);
Expand Down Expand Up @@ -107,7 +107,7 @@ t.test("it does not block in dry mode", (t) => {
t.equal(noSQLInjection.status, 200);
t.equal(normalSearch.status, 200);
t.match(stdout, /Starting agent/);
t.notMatch(stderr, /Aikido firewall has blocked a NoSQL injection/);
t.notMatch(stderr, /Zen by Aikido has blocked a NoSQL injection/);
})
.catch((error) => {
t.fail(error.message);
Expand Down
4 changes: 2 additions & 2 deletions end2end/tests/hono-sqlite3.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ t.test("it blocks in blocking mode", (t) => {
t.equal(sqlInjection.status, 500);
t.equal(normalAdd.status, 200);
t.match(stdout, /Starting agent/);
t.match(stderr, /Aikido firewall has blocked an SQL injection/);
t.match(stderr, /Zen by Aikido has blocked an SQL injection/);
})
.catch((error) => {
t.fail(error.message);
Expand Down Expand Up @@ -113,7 +113,7 @@ t.test("it does not block in dry mode", (t) => {
t.equal(sqlInjection.status, 200);
t.equal(normalAdd.status, 200);
t.match(stdout, /Starting agent/);
t.notMatch(stderr, /Aikido firewall has blocked an SQL injection/);
t.notMatch(stderr, /Zen by Aikido has blocked an SQL injection/);
})
.catch((error) => {
t.fail(error.message);
Expand Down
4 changes: 2 additions & 2 deletions end2end/tests/hono-xml.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ t.test("it blocks in blocking mode", (t) => {
t.equal(sqlInjectionFast2.status, 500);
t.equal(normalAdd.status, 200);
t.match(stdout, /Starting agent/);
t.match(stderr, /Aikido firewall has blocked an SQL injection/);
t.match(stderr, /Zen by Aikido has blocked an SQL injection/);
}
)
.catch((error) => {
Expand Down Expand Up @@ -178,7 +178,7 @@ t.test("it does not block in dry mode", (t) => {
t.equal(sqlInjectionFast2.status, 200);
t.equal(normalAdd.status, 200);
t.match(stdout, /Starting agent/);
t.notMatch(stderr, /Aikido firewall has blocked an SQL injection/);
t.notMatch(stderr, /Zen by Aikido has blocked an SQL injection/);
}
)
.catch((error) => {
Expand Down
4 changes: 2 additions & 2 deletions end2end/tests/http2.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ t.test("it blocks in blocking mode", (t) => {
t.match(stdout, /Starting agent/);
t.match(
stderr,
/Aikido firewall has blocked a server-side request forgery/
/Zen by Aikido has blocked a server-side request forgery/
);
})
.catch((error) => {
Expand Down Expand Up @@ -93,7 +93,7 @@ t.test("it does not block in dry mode", (t) => {
t.match(stdout, /Starting agent/);
t.notMatch(
stderr,
/Aikido firewall has blocked a server-side request forgery/
/Zen by Aikido has blocked a server-side request forgery/
);
t.match(stderr, /fetch failed/);
})
Expand Down
2 changes: 1 addition & 1 deletion end2end/tests/lambda-mongodb.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ t.test("it blocks when AIKIDO_BLOCKING is true", async (t) => {
);

t.same(stdout, "");
t.match(stderr, /Aikido firewall has blocked a NoSQL injection/);
t.match(stderr, /Zen by Aikido has blocked a NoSQL injection/);
});

t.test(
Expand Down
4 changes: 2 additions & 2 deletions end2end/tests/nestjs-sentry.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ t.test("it blocks in blocking mode", (t) => {
const json = await outgoingReq.json();
t.ok(typeof json === "object");
t.match(stdout, /Starting agent/);
t.match(stderr, /Aikido firewall has blocked an SQL injection/);
t.match(stderr, /Zen by Aikido has blocked an SQL injection/);
})
.catch((error) => {
t.fail(error.message);
Expand Down Expand Up @@ -133,7 +133,7 @@ t.test("it does not block in non-blocking mode", (t) => {
const json = await outgoingReq.json();
t.ok(typeof json === "object");
t.match(stdout, /Starting agent/);
t.notMatch(stderr, /Aikido firewall has blocked an SQL injection/);
t.notMatch(stderr, /Zen by Aikido has blocked an SQL injection/);
})
.catch((error) => {
t.fail(error.message);
Expand Down
8 changes: 4 additions & 4 deletions end2end/tests/nextjs-standalone.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ t.test("it blocks in blocking mode", (t) => {
t.equal(noInjection.status, 200);
t.equal(sqlInjection.status, 500);
t.match(stdout, /Starting agent/);
t.match(stderr, /Aikido firewall has blocked a shell injection/);
t.match(stderr, /Aikido firewall has blocked an SQL injection/);
t.match(stderr, /Zen by Aikido has blocked a shell injection/);
t.match(stderr, /Zen by Aikido has blocked an SQL injection/);
}
)
.catch((error) => {
Expand Down Expand Up @@ -187,8 +187,8 @@ t.test("it does not block in dry mode", (t) => {
t.equal(noInjection.status, 200);
t.equal(sqlInjection.status, 200);
t.match(stdout, /Starting agent/);
t.notMatch(stderr, /Aikido firewall has blocked a shell injection/);
t.notMatch(stderr, /Aikido firewall has blocked an SQL injection/);
t.notMatch(stderr, /Zen by Aikido has blocked a shell injection/);
t.notMatch(stderr, /Zen by Aikido has blocked an SQL injection/);
}
)
.catch((error) => {
Expand Down
2 changes: 1 addition & 1 deletion library/agent/applyHooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ function wrapWithoutArgumentModification(

if (agent.shouldBlock()) {
throw new Error(
`Aikido firewall has blocked ${attackKindHumanName(result.kind)}: ${result.operation}(...) originating from ${result.source}${escapeHTML(result.pathToPayload)}`
`Zen by Aikido has blocked ${attackKindHumanName(result.kind)}: ${result.operation}(...) originating from ${result.source}${escapeHTML(result.pathToPayload)}`
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion library/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@aikidosec/firewall",
"version": "0.0.0",
"description": "Aikido firewall protects your application against NoSQL injections and more",
"description": "Zen by Aikido is an embedded Web Application Firewall that autonomously protects Node.js apps against common and critical attacks",
"repository": "https://github.com/AikidoSec/firewall-node",
"keywords": [
"security",
Expand Down
4 changes: 2 additions & 2 deletions library/sinks/AwsSDKVersion2.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ t.test("it works", async (t) => {
if (error instanceof Error) {
t.same(
error.message,
"Aikido firewall has blocked a path traversal attack: S3.putObject(...) originating from body.file.matches"
"Zen by Aikido has blocked a path traversal attack: S3.putObject(...) originating from body.file.matches"
);
}

Expand All @@ -106,7 +106,7 @@ t.test("it works", async (t) => {
if (signedURLError instanceof Error) {
t.same(
signedURLError.message,
"Aikido firewall has blocked a path traversal attack: S3.getSignedUrl(...) originating from body.file.matches"
"Zen by Aikido has blocked a path traversal attack: S3.getSignedUrl(...) originating from body.file.matches"
);
}
});
Expand Down
8 changes: 4 additions & 4 deletions library/sinks/BetterSQLite3.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ t.test("it detects SQL injections", async (t) => {
if (error instanceof Error) {
t.same(
error.message,
"Aikido firewall has blocked an SQL injection: better-sqlite3.exec(...) originating from body.myTitle"
"Zen by Aikido has blocked an SQL injection: better-sqlite3.exec(...) originating from body.myTitle"
);
}

Expand All @@ -84,7 +84,7 @@ t.test("it detects SQL injections", async (t) => {
if (error2 instanceof Error) {
t.same(
error2.message,
"Aikido firewall has blocked an SQL injection: better-sqlite3.prepare(...) originating from body.myTitle"
"Zen by Aikido has blocked an SQL injection: better-sqlite3.prepare(...) originating from body.myTitle"
);
}

Expand All @@ -94,7 +94,7 @@ t.test("it detects SQL injections", async (t) => {
if (error instanceof Error) {
t.same(
error.message,
"Aikido firewall has blocked an SQL injection: better-sqlite3.exec(...) originating from body.myTitle"
"Zen by Aikido has blocked an SQL injection: better-sqlite3.exec(...) originating from body.myTitle"
);
}
});
Expand Down Expand Up @@ -123,7 +123,7 @@ t.test("it detects SQL injections", async (t) => {
if (error instanceof Error) {
t.same(
error.message,
"Aikido firewall has blocked a path traversal attack: better-sqlite3.backup(...) originating from body.myTitle"
"Zen by Aikido has blocked a path traversal attack: better-sqlite3.backup(...) originating from body.myTitle"
);
}
await db.backup("/tmp/sqlite-test-secure");
Expand Down
Loading

0 comments on commit bfb867d

Please sign in to comment.