From ab939cd485067af7b9272b73127efefe99c9acdb Mon Sep 17 00:00:00 2001 From: Julio Guerra Date: Tue, 21 Jul 2020 11:14:03 +0200 Subject: [PATCH] sdk/sqreen-instrumentation-tool: add limited instrumentation of go.mongodb.org/mongo-driver/mongo In order to attach noSQL-injection protection to the driver. --- sdk/sqreen-instrumentation-tool/instrumentation.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sdk/sqreen-instrumentation-tool/instrumentation.go b/sdk/sqreen-instrumentation-tool/instrumentation.go index 6bdf33b3..ec34bb3b 100644 --- a/sdk/sqreen-instrumentation-tool/instrumentation.go +++ b/sdk/sqreen-instrumentation-tool/instrumentation.go @@ -202,6 +202,7 @@ var ( "os", "net/http", "github.com/gin-gonic/gin", + "go.mongodb.org/mongo-driver/mongo", } // Optional list packages, files and functions we want to only instrument for @@ -221,6 +222,10 @@ var ( // Same comment as net/http "context.go", // context.go contains the body parsers }, + "go.mongodb.org/mongo-driver/mongo": { + // Limited for performance reasons to: + "mongo.go", // mongo.go contains the bson transformation function + }, } )