Skip to content

Commit

Permalink
Merge branch 'main' into update-zen-internals
Browse files Browse the repository at this point in the history
  • Loading branch information
timokoessler committed Jan 3, 2025
2 parents caaa5f3 + f386c7c commit 337a9b0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions end2end/tests/lambda-mongodb.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ t.test("it does not block by default", async (t) => {
);

t.same(stderr, "");
t.same(JSON.parse(stdout.toString()), {
t.same(JSON.parse(stdout.toString().split("\n").slice(2).join("\n")), {
statusCode: 200,
headers: {
"Content-Type": "application/json",
Expand All @@ -45,7 +45,10 @@ t.test("it blocks when AIKIDO_BLOCKING is true", async (t) => {
}
);

t.same(stdout, "");
t.match(
stdout,
'Zen has blocked a NoSQL injection: kind="nosql_injection" operation="MongoDB.Collection.findOne(...)" source="body.password" ip="1.2.3.4"'
);
t.match(stderr, /Zen has blocked a NoSQL injection/);
});

Expand Down

0 comments on commit 337a9b0

Please sign in to comment.