From 8a9aa439a4ba62015b06b1997b8181cfff34b717 Mon Sep 17 00:00:00 2001 From: Dachary Carey Date: Thu, 20 Nov 2025 10:01:39 -0500 Subject: [PATCH 1/7] Remove 'landing' and 'drivers' from ignored projects --- audit/gdcd/snooty/GetProjects.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/audit/gdcd/snooty/GetProjects.go b/audit/gdcd/snooty/GetProjects.go index e45a620..1d6e42b 100644 --- a/audit/gdcd/snooty/GetProjects.go +++ b/audit/gdcd/snooty/GetProjects.go @@ -77,13 +77,11 @@ func GetProjects(client *http.Client) []types.ProjectDetails { "docs-app-services", "datalake", "intellij", - "landing", "mongodb-vscode", "mms-docs", "visual-studio-extension", "guides", "atlas-app-services", - "drivers", "mongoid-railsmdb", "cluster-sync", // The Snooty Data API currently lists `cluster-sync` and `mongosync` as independent projects. We don't want to process twice, so ignore the `cluster-sync` entry. } From 712343093ecbedaf4febf7c888ff64c91ce61ee4 Mon Sep 17 00:00:00 2001 From: Dachary Carey Date: Thu, 20 Nov 2025 10:03:06 -0500 Subject: [PATCH 2/7] Update GDCD dependencies --- audit/gdcd/go.mod | 20 ++++++++++---------- audit/gdcd/go.sum | 19 +++++++++++++++++++ 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/audit/gdcd/go.mod b/audit/gdcd/go.mod index 9209306..b5f9b55 100644 --- a/audit/gdcd/go.mod +++ b/audit/gdcd/go.mod @@ -1,13 +1,13 @@ module gdcd -go 1.23.1 +go 1.24.4 require ( common v0.0.0 github.com/joho/godotenv v1.5.1 - github.com/sergi/go-diff v1.3.1 - github.com/tmc/langchaingo v0.1.13 - go.mongodb.org/mongo-driver/v2 v2.2.2 + github.com/sergi/go-diff v1.4.0 + github.com/tmc/langchaingo v0.1.14 + go.mongodb.org/mongo-driver/v2 v2.4.0 ) replace common => ../common @@ -41,11 +41,11 @@ require ( github.com/xdg-go/stringprep v1.0.4 // indirect github.com/yargevad/filepathx v1.0.0 // indirect github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect - go.mongodb.org/mongo-driver v1.14.0 // indirect - golang.org/x/crypto v0.37.0 // indirect - golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect - golang.org/x/sync v0.13.0 // indirect - golang.org/x/sys v0.32.0 // indirect - golang.org/x/text v0.24.0 // indirect + go.mongodb.org/mongo-driver v1.17.6 // indirect + golang.org/x/crypto v0.41.0 // indirect + golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa // indirect + golang.org/x/sync v0.16.0 // indirect + golang.org/x/sys v0.35.0 // indirect + golang.org/x/text v0.28.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/audit/gdcd/go.sum b/audit/gdcd/go.sum index fe3fd9a..cc270a3 100644 --- a/audit/gdcd/go.sum +++ b/audit/gdcd/go.sum @@ -13,6 +13,7 @@ github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448/go.mod h1:GJKEex github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/dlclark/regexp2 v1.10.0 h1:+/GIL799phkJqYW+3YbOd8LCcbHzT0Pbo8zl70MHsq0= github.com/dlclark/regexp2 v1.10.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= @@ -83,11 +84,15 @@ github.com/pkoukk/tiktoken-go v0.1.6 h1:JF0TlJzhTbrI30wCvFuiw6FzP2+/bR+FIxUdgEAc github.com/pkoukk/tiktoken-go v0.1.6/go.mod h1:9NiV+i9mJKGj1rYOT+njbv+ZwA/zJxYdewGl6qVatpg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= github.com/rollbar/rollbar-go v1.0.2/go.mod h1:AcFs5f0I+c71bpHlXNNDbOWJiKwjFDtISeXco0L5PKQ= github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= +github.com/sergi/go-diff v1.4.0 h1:n/SP9D5ad1fORl+llWyN+D6qoUETXNZARKjyY2/KVCw= +github.com/sergi/go-diff v1.4.0/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= @@ -109,8 +114,11 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/tmc/langchaingo v0.1.13 h1:rcpMWBIi2y3B90XxfE4Ao8dhCQPVDMaNPnN5cGB1CaA= github.com/tmc/langchaingo v0.1.13/go.mod h1:vpQ5NOIhpzxDfTZK9B6tf2GM/MoaHewPWM5KXXGh7hg= +github.com/tmc/langchaingo v0.1.14 h1:o1qWBPigAIuFvrG6cjTFo0cZPFEZ47ZqpOYMjM15yZc= +github.com/tmc/langchaingo v0.1.14/go.mod h1:aKKYXYoqhIDEv7WKdpnnCLRaqXic69cX9MnDUk72378= github.com/x-cray/logrus-prefixed-formatter v0.5.2 h1:00txxvfBM9muc0jiLIEAkAcIMJzfthRT6usrui8uGmg= github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= @@ -126,16 +134,23 @@ github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78/go.mod h1:aL8wCCfTfS github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.mongodb.org/mongo-driver v1.14.0 h1:P98w8egYRjYe3XDjxhYJagTokP/H6HzlsnojRgZRd80= go.mongodb.org/mongo-driver v1.14.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c= +go.mongodb.org/mongo-driver v1.17.6 h1:87JUG1wZfWsr6rIz3ZmpH90rL5tea7O3IHuSwHUpsss= +go.mongodb.org/mongo-driver v1.17.6/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= go.mongodb.org/mongo-driver/v2 v2.2.2 h1:9cYuS3fl1Xhqwpfazso10V7BHQD58kCgtzhfAmJYz9c= go.mongodb.org/mongo-driver/v2 v2.2.2/go.mod h1:qQkDMhCGWl3FN509DfdPd4GRBLU/41zqF/k8eTRceps= +go.mongodb.org/mongo-driver/v2 v2.4.0 h1:Oq6BmUAAFTzMeh6AonuDlgZMuAuEiUxoAD1koK5MuFo= +go.mongodb.org/mongo-driver/v2 v2.4.0/go.mod h1:jHeEDJHJq7tm6ZF45Issun9dbogjfnPySb1vXA7EeAI= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= +golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc= golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw= golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa h1:ELnwvuAXPNtPk1TJRuGkI9fDTwym6AYBu0qzT8AcHdI= +golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -147,6 +162,7 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.13.0 h1:AauUjRAJ9OSnvULf/ARrrVywoJDy0YS2AwQ98I37610= golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -158,11 +174,13 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= +golang.org/x/term v0.34.0 h1:O/2T7POpk0ZZ7MAzMeWFSg6S5IpWd/RXDlM9hgM3DR4= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= @@ -170,6 +188,7 @@ golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= +golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= From 46d50eba07e856abd705d02d1bff7d7f8453945e Mon Sep 17 00:00:00 2001 From: Dachary Carey Date: Thu, 20 Nov 2025 10:08:03 -0500 Subject: [PATCH 3/7] Add drivers product info --- audit/common/GetProductInfo.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/audit/common/GetProductInfo.go b/audit/common/GetProductInfo.go index 63d95e0..f4149c3 100644 --- a/audit/common/GetProductInfo.go +++ b/audit/common/GetProductInfo.go @@ -137,6 +137,11 @@ var productInfoMap = map[string]ProductInfo{ ProductType: CollectionIsProduct, SubProduct: "", }, + "drivers": { + ProductName: Drivers, + ProductType: CollectionIsProduct, + SubProduct: "", + }, "entity-framework": { ProductName: EFCoreProvider, ProductType: CollectionIsProduct, From ee06bfbb5ade0a0e7b743bf20a4afe1a925941eb Mon Sep 17 00:00:00 2001 From: Dachary Carey Date: Thu, 20 Nov 2025 10:24:32 -0500 Subject: [PATCH 4/7] Update DODEC dependency versions --- audit/dodec/src/go.mod | 14 +++++++------- audit/dodec/src/go.sum | 12 ++++++++++++ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/audit/dodec/src/go.mod b/audit/dodec/src/go.mod index 53a82fe..3661ddd 100644 --- a/audit/dodec/src/go.mod +++ b/audit/dodec/src/go.mod @@ -1,24 +1,24 @@ module dodec -go 1.23.1 +go 1.24.0 require ( common v0.0.0 github.com/joho/godotenv v1.5.1 - go.mongodb.org/mongo-driver/v2 v2.2.2 + go.mongodb.org/mongo-driver/v2 v2.4.0 ) require ( github.com/golang/snappy v1.0.0 // indirect - github.com/klauspost/compress v1.18.0 // indirect + github.com/klauspost/compress v1.18.1 // indirect github.com/xdg-go/pbkdf2 v1.0.0 // indirect github.com/xdg-go/scram v1.1.2 // indirect github.com/xdg-go/stringprep v1.0.4 // indirect github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect - go.mongodb.org/mongo-driver v1.17.4 // indirect - golang.org/x/crypto v0.37.0 // indirect - golang.org/x/sync v0.13.0 // indirect - golang.org/x/text v0.24.0 // indirect + go.mongodb.org/mongo-driver v1.17.6 // indirect + golang.org/x/crypto v0.45.0 // indirect + golang.org/x/sync v0.18.0 // indirect + golang.org/x/text v0.31.0 // indirect ) replace common => ../../common diff --git a/audit/dodec/src/go.sum b/audit/dodec/src/go.sum index b27635f..0537e28 100644 --- a/audit/dodec/src/go.sum +++ b/audit/dodec/src/go.sum @@ -8,6 +8,8 @@ github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= +github.com/klauspost/compress v1.18.1 h1:bcSGx7UbpBqMChDtsF28Lw6v/G94LPrrbMbdC3JH2co= +github.com/klauspost/compress v1.18.1/go.mod h1:ZQFFVG+MdnR0P+l6wpXgIL4NTtwiKIdBnrBd8Nrxr+0= github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY= @@ -19,14 +21,20 @@ github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78/go.mod h1:aL8wCCfTfS github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.mongodb.org/mongo-driver v1.17.4 h1:jUorfmVzljjr0FLzYQsGP8cgN/qzzxlY9Vh0C9KFXVw= go.mongodb.org/mongo-driver v1.17.4/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= +go.mongodb.org/mongo-driver v1.17.6 h1:87JUG1wZfWsr6rIz3ZmpH90rL5tea7O3IHuSwHUpsss= +go.mongodb.org/mongo-driver v1.17.6/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= go.mongodb.org/mongo-driver/v2 v2.2.1 h1:w5xra3yyu/sGrziMzK1D0cRRaH/b7lWCSsoN6+WV6AM= go.mongodb.org/mongo-driver/v2 v2.2.1/go.mod h1:qQkDMhCGWl3FN509DfdPd4GRBLU/41zqF/k8eTRceps= go.mongodb.org/mongo-driver/v2 v2.2.2 h1:9cYuS3fl1Xhqwpfazso10V7BHQD58kCgtzhfAmJYz9c= go.mongodb.org/mongo-driver/v2 v2.2.2/go.mod h1:qQkDMhCGWl3FN509DfdPd4GRBLU/41zqF/k8eTRceps= +go.mongodb.org/mongo-driver/v2 v2.4.0 h1:Oq6BmUAAFTzMeh6AonuDlgZMuAuEiUxoAD1koK5MuFo= +go.mongodb.org/mongo-driver/v2 v2.4.0/go.mod h1:jHeEDJHJq7tm6ZF45Issun9dbogjfnPySb1vXA7EeAI= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= +golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q= +golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= @@ -35,6 +43,8 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.13.0 h1:AauUjRAJ9OSnvULf/ARrrVywoJDy0YS2AwQ98I37610= golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I= +golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -48,6 +58,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= +golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM= +golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= From 089f270e9082e70ff33507bec55f41010eb0e70b Mon Sep 17 00:00:00 2001 From: Dachary Carey Date: Thu, 20 Nov 2025 10:53:53 -0500 Subject: [PATCH 5/7] Add new aggregation to get usage examples for the month --- audit/dodec/README.md | 2 + .../aggregations/FindUsageExamplesForMonth.go | 119 ++++++++++++++++++ 2 files changed, 121 insertions(+) create mode 100644 audit/dodec/src/aggregations/FindUsageExamplesForMonth.go diff --git a/audit/dodec/README.md b/audit/dodec/README.md index ad56d38..44e755e 100644 --- a/audit/dodec/README.md +++ b/audit/dodec/README.md @@ -25,6 +25,8 @@ Get counts broken down in the following ways: - [By product](src/aggregations/GetProductCategoryCounts.go) - [By Atlas sub-product](src/aggregations/GetSubProductCategoryCounts.go) - [For one specific category by product](src/aggregations/GetSpecificCategoryByProduct.go) + - [For usage examples added in the last month](src/aggregations/FindUsageExamplesForMonth.go) + - [For applied usage examples (>300 characters) added in the last week](src/aggregations/FindNewAppliedUsageExamples.go) - Complexity counts: - [One line usage examples by docs property](src/aggregations/GetOneLineUsageExampleCounts.go) - [Minimum, median, maximum character counts for code examples in the collection, and one-liner counts](src/aggregations/GetMinMedianMaxCodeLength.go) diff --git a/audit/dodec/src/aggregations/FindUsageExamplesForMonth.go b/audit/dodec/src/aggregations/FindUsageExamplesForMonth.go new file mode 100644 index 0000000..47af134 --- /dev/null +++ b/audit/dodec/src/aggregations/FindUsageExamplesForMonth.go @@ -0,0 +1,119 @@ +package aggregations + +import ( + "common" + "context" + "dodec/types" + "dodec/utils" + "fmt" + "time" + + "go.mongodb.org/mongo-driver/v2/bson" + "go.mongodb.org/mongo-driver/v2/mongo" +) + +// FindUsageExamplesForMonth looks for docs pages in Atlas that have had a new usage example added during the target month. +// We get a count of new usage examples matching this criteria, return the count and the page_id, and +// track the product and sub-product in the types.NewAppliedUsageExampleCounterByProductSubProduct +func FindUsageExamplesForMonth(db *mongo.Database, collectionName string, productSubProductCounter types.NewAppliedUsageExampleCounterByProductSubProduct, ctx context.Context) types.NewAppliedUsageExampleCounterByProductSubProduct { + // Target a specific month (example for November 2025): + targetYear := 2025 + targetMonth := time.November + monthStart := time.Date(targetYear, targetMonth, 1, 0, 0, 0, 0, time.UTC) + monthEnd := monthStart.AddDate(0, 1, 0) // First day of next month + // Define the aggregation pipeline + pipeline := mongo.Pipeline{ + // Find only page documents where the `nodes` value is not null + {{"$match", bson.D{ + {"_id", bson.D{{"$ne", "summaries"}}}, + {"nodes", bson.D{{"$ne", nil}}}, // Ensure nodes is not null + }}}, + + // Unwind the `nodes` value to match on specific node elements + {{"$unwind", bson.D{{"path", "$nodes"}}}}, + + {{"$match", bson.D{ + {"$and", bson.A{ + // Filter for nodes that have been added during the target month + bson.D{{"$and", bson.A{ + bson.D{{"nodes.date_added", bson.D{{"$gte", monthStart}}}}, + bson.D{{"nodes.date_added", bson.D{{"$lt", monthEnd}}}}, + }}}, + // Consider only usage examples + bson.D{{"nodes.category", common.UsageExample}}, + }}, + }}}, + + // First group by Product and SubProduct + bson.D{{"$group", bson.D{ + {"_id", bson.D{ + {"product", "$product"}, + {"subProduct", bson.D{{"$ifNull", bson.A{"$sub_product", "None"}}}}, + }}, + {"nodesPerProduct", bson.D{{"$push", bson.D{ + {"_id", "$_id"}, // Preserve original document _id + {"nodes", "$nodes"}, // Collect nodes + }}}}, + }}}, + // Unwind after the first group to regroup by original _id + bson.D{{"$unwind", bson.D{{"path", "$nodesPerProduct"}}}}, + // Regroup by original document _id within each Product and SubProduct + bson.D{{"$group", bson.D{ + {"_id", bson.D{ + {"product", "$_id.product"}, + {"subProduct", "$_id.subProduct"}, + {"documentId", "$nodesPerProduct._id"}, + }}, + {"new_applied_usage_examples", bson.D{{"$push", "$nodesPerProduct.nodes"}}}, + {"count", bson.D{{"$sum", 1}}}, + }}}, + // Optionally sort by count in descending order + bson.D{{"$sort", bson.D{{"count", -1}}}}, + } + // Execute the aggregation + collection := db.Collection(collectionName) + cursor, err := collection.Aggregate(ctx, pipeline) + if err != nil { + println(fmt.Errorf("failed to execute aggregate query: %v", err)) + return productSubProductCounter + } + defer cursor.Close(ctx) + collectionPagesWithNewAppliedUsageExamples := make([]types.PageIdNewAppliedUsageExamples, 0) + for cursor.Next(ctx) { + var result types.PageIdNewAppliedUsageExamples + if err = cursor.Decode(&result); err != nil { + println(fmt.Errorf("failed to decode result document: %v", err)) + return productSubProductCounter + } + + // If a sub-product map for the product does not exist yet, create one + if _, ok := productSubProductCounter.ProductSubProductCounts[result.ID.Product]; !ok { + productSubProductCounter.ProductSubProductCounts[result.ID.Product] = make(map[string]int) + } + + // The docs org would like to see a breakdown of focus areas. For the purpose of reporting this result, I'm arbitrarily + // assigning some of the key focus areas as "sub-product" if a page ID contains a substring related to these focus + // areas. That makes it easy to report on these things as sub-products even if they're not officially sub-products. + resultAdjustedForFocusAreas := utils.GetFocusAreaAsSubProduct(result) + if resultAdjustedForFocusAreas.ID.SubProduct != "None" { + productSubProductCounter.ProductSubProductCounts[result.ID.Product][resultAdjustedForFocusAreas.ID.SubProduct] += resultAdjustedForFocusAreas.Count + + // Add the adjusted for focus area count to the product accumulator + productSubProductCounter.ProductAggregateCount[result.ID.Product] += resultAdjustedForFocusAreas.Count + } else { + // If the subproduct is "None", just append the original count + productSubProductCounter.ProductSubProductCounts[result.ID.Product][result.ID.SubProduct] += result.Count + // Add the non-adjusted subproduct count to the product accumulator + productSubProductCounter.ProductAggregateCount[result.ID.Product] += result.Count + } + collectionPagesWithNewAppliedUsageExamples = append(collectionPagesWithNewAppliedUsageExamples, resultAdjustedForFocusAreas) + } + if err = cursor.Err(); err != nil { + println(fmt.Errorf("cursor encountered an error: %v", err)) + return productSubProductCounter + } + if collectionPagesWithNewAppliedUsageExamples != nil && len(collectionPagesWithNewAppliedUsageExamples) > 0 { + productSubProductCounter.PagesInCollections[collectionName] = collectionPagesWithNewAppliedUsageExamples + } + return productSubProductCounter +} From 38abf46773c9ac0cb3cd0e2b82020d82c71f1cac Mon Sep 17 00:00:00 2001 From: Dachary Carey Date: Thu, 20 Nov 2025 11:15:09 -0500 Subject: [PATCH 6/7] Add print function to get monthly counts --- audit/dodec/src/PerformAggregation.go | 9 +- .../aggregations/FindUsageExamplesForMonth.go | 5 +- .../utils/PrintMonthlyUsageExampleCounts.go | 138 ++++++++++++++++++ 3 files changed, 147 insertions(+), 5 deletions(-) create mode 100644 audit/dodec/src/utils/PrintMonthlyUsageExampleCounts.go diff --git a/audit/dodec/src/PerformAggregation.go b/audit/dodec/src/PerformAggregation.go index 40b777b..46eaf16 100644 --- a/audit/dodec/src/PerformAggregation.go +++ b/audit/dodec/src/PerformAggregation.go @@ -5,6 +5,8 @@ import ( "dodec/aggregations" "dodec/types" "dodec/utils" + "time" + "go.mongodb.org/mongo-driver/v2/bson" "go.mongodb.org/mongo-driver/v2/mongo" ) @@ -36,6 +38,7 @@ func PerformAggregation(db *mongo.Database, ctx context.Context) { } //substringToFindInCodeExamples := "defaultauthdb" //substringToFindInPageURL := "code-examples" + monthForReporting := time.November for _, collectionName := range collectionNames { //simpleMap = aggregations.GetCategoryCounts(db, collectionName, simpleMap, ctx) @@ -56,7 +59,8 @@ func PerformAggregation(db *mongo.Database, ctx context.Context) { //pageIdChangesCountMap = aggregations.GetDocsIdsWithRecentActivity(db, collectionName, pageIdChangesCountMap, ctx) //pageIdsWithNodeLangCountMismatch = aggregations.GetPagesWithNodeLangCountMismatch(db, collectionName, pageIdsWithNodeLangCountMismatch, ctx) //pageIdsWithNodeLangCountMismatch = aggregations.FindDocsMissingProduct(db, collectionName, pageIdsWithNodeLangCountMismatch, ctx) - productSubProductCounter = aggregations.FindNewAppliedUsageExamples(db, collectionName, productSubProductCounter, ctx) + //productSubProductCounter = aggregations.FindNewAppliedUsageExamples(db, collectionName, productSubProductCounter, ctx) + productSubProductCounter = aggregations.FindUsageExamplesForMonth(db, collectionName, productSubProductCounter, monthForReporting, ctx) //pageIdsWithNodeLangCountMismatch = aggregations.FindURLContainingString(db, collectionName, pageIdsWithNodeLangCountMismatch, ctx, substringToFindInPageURL) } @@ -79,5 +83,6 @@ func PerformAggregation(db *mongo.Database, ctx context.Context) { //utils.PrintCodeLengthMapToConsole(codeLengthMap) //utils.PrintPageIdChangesCountMap(pageIdChangesCountMap) //utils.PrintPageIdsWithNodeLangCountMismatch(pageIdsWithNodeLangCountMismatch) - utils.PrintPageIdNewAppliedUsageExampleCounts(productSubProductCounter) + //utils.PrintPageIdNewAppliedUsageExampleCounts(productSubProductCounter) + utils.PrintMonthlyUsageExampleCounts(productSubProductCounter, monthForReporting) } diff --git a/audit/dodec/src/aggregations/FindUsageExamplesForMonth.go b/audit/dodec/src/aggregations/FindUsageExamplesForMonth.go index 47af134..1745dcd 100644 --- a/audit/dodec/src/aggregations/FindUsageExamplesForMonth.go +++ b/audit/dodec/src/aggregations/FindUsageExamplesForMonth.go @@ -15,11 +15,10 @@ import ( // FindUsageExamplesForMonth looks for docs pages in Atlas that have had a new usage example added during the target month. // We get a count of new usage examples matching this criteria, return the count and the page_id, and // track the product and sub-product in the types.NewAppliedUsageExampleCounterByProductSubProduct -func FindUsageExamplesForMonth(db *mongo.Database, collectionName string, productSubProductCounter types.NewAppliedUsageExampleCounterByProductSubProduct, ctx context.Context) types.NewAppliedUsageExampleCounterByProductSubProduct { +func FindUsageExamplesForMonth(db *mongo.Database, collectionName string, productSubProductCounter types.NewAppliedUsageExampleCounterByProductSubProduct, monthForReporting time.Month, ctx context.Context) types.NewAppliedUsageExampleCounterByProductSubProduct { // Target a specific month (example for November 2025): targetYear := 2025 - targetMonth := time.November - monthStart := time.Date(targetYear, targetMonth, 1, 0, 0, 0, 0, time.UTC) + monthStart := time.Date(targetYear, monthForReporting, 1, 0, 0, 0, 0, time.UTC) monthEnd := monthStart.AddDate(0, 1, 0) // First day of next month // Define the aggregation pipeline pipeline := mongo.Pipeline{ diff --git a/audit/dodec/src/utils/PrintMonthlyUsageExampleCounts.go b/audit/dodec/src/utils/PrintMonthlyUsageExampleCounts.go new file mode 100644 index 0000000..cb668e5 --- /dev/null +++ b/audit/dodec/src/utils/PrintMonthlyUsageExampleCounts.go @@ -0,0 +1,138 @@ +package utils + +import ( + "dodec/types" + "fmt" + "log" + "sort" + "time" +) + +// PrintMonthlyUsageExampleCounts prints a nicely-formatted series of tables with counts of new usage +// examples broken down in various ways. Each collection prints as its own table, which has a list of page IDs and counts +// for pages that have new usage examples. This makes it easy to validate the data if we want to perform manual QA. After +// the individual collection tables, we print a consolidated table breaking down the counts by sub-product and product. +func PrintMonthlyUsageExampleCounts(productSubProductCounter types.NewAppliedUsageExampleCounterByProductSubProduct, monthForReporting time.Month) { + // Print one table for each product, where each row represents the count of new applied usage examples on a given page, specified here by ID + // This information is useful for debugging/validating counts. + pageIdTableColumnNames := []interface{}{"Product", "Sub Product", "Page ID", "Count"} + pageIdTableColumnWidths := []int{30, 30, 70, 15} + fmt.Printf("\nPrinting breakdown of new usage example counts by page ID in collections. This info is for validating and/or debugging counts.\n") + for collectionName, pagesToPrintInCollection := range productSubProductCounter.PagesInCollections { + collectionCount := 0 + fmt.Printf("\nTotal new Usage Example Counts by Page in Collection %s\n", collectionName) + printSeparator(pageIdTableColumnWidths...) + printRow(pageIdTableColumnWidths, pageIdTableColumnNames...) + printSeparator(pageIdTableColumnWidths...) + for _, page := range pagesToPrintInCollection { + printRow(pageIdTableColumnWidths, page.ID.Product, page.ID.SubProduct, page.ID.DocumentID, page.Count) + collectionCount += page.Count + } + printSeparator(pageIdTableColumnWidths...) + fmt.Printf("Total new usage example counts in collection %s: %d\n", collectionName, collectionCount) + } + + fmt.Printf("\nPrinting new usage example counts aggregate table - share data below with team lead.\n") + + // Print one consolidated table that lists just the counts for each product/sub-product. This information is used to report to the leads. + appliedUsageExampleCountsColumnNames := []interface{}{"Product", "Count", "Sub-product", "Count"} + appliedUsageExampleCountsColumnWidths := []int{30, 18, 25, 18} + + if len(appliedUsageExampleCountsColumnNames) != len(appliedUsageExampleCountsColumnWidths) { + log.Fatalf("Got %d column names, but %d column widths - can't print the table unless we have the same number of names and widths", len(appliedUsageExampleCountsColumnNames), len(appliedUsageExampleCountsColumnWidths)) + } + + // Gather all data together into a sortable slice + var allEntries []struct { + ProductName string + ProductCount int + SubProductName string + SubProductCount int + } + + totalCount := 0 + for productName, subProductMap := range productSubProductCounter.ProductSubProductCounts { + aggregateCount, exists := productSubProductCounter.ProductAggregateCount[productName] + if !exists { + log.Fatalf("No aggregate count found for product %s", productName) + } + totalCount += aggregateCount + + subProductSum := 0 + for _, subProductCount := range subProductMap { + subProductSum += subProductCount + } + + for subProductName, subProductCount := range subProductMap { + allEntries = append(allEntries, struct { + ProductName string + ProductCount int + SubProductName string + SubProductCount int + }{ + ProductName: productName, + ProductCount: aggregateCount, + SubProductName: subProductName, + SubProductCount: subProductCount, + }) + } + + // Add "None" sub-product if sub-product sum is less than aggregate count + if subProductSum < aggregateCount { + allEntries = append(allEntries, struct { + ProductName string + ProductCount int + SubProductName string + SubProductCount int + }{ + ProductName: productName, + ProductCount: aggregateCount, + SubProductName: "None", + SubProductCount: aggregateCount - subProductSum, + }) + } + } + + // Sort entries by product name, then put "None" sub-product last within its group + sort.Slice(allEntries, func(i, j int) bool { + if allEntries[i].ProductName == allEntries[j].ProductName { + // Within the same product name, prioritize "None" to appear last + if allEntries[i].SubProductName == "None" { + return false // i should come after j + } else if allEntries[j].SubProductName == "None" { + return true // j should come after i + } + // Otherwise, sort sub-products by name + return allEntries[i].SubProductName < allEntries[j].SubProductName + } + return allEntries[i].ProductName < allEntries[j].ProductName + }) + + // Print a single consolidated table + fmt.Printf("\nTotal New Usage Example Counts for %s: %d\n", monthForReporting.String(), totalCount) + printSeparator(appliedUsageExampleCountsColumnWidths...) + printRow(appliedUsageExampleCountsColumnWidths, appliedUsageExampleCountsColumnNames...) + printSeparator(appliedUsageExampleCountsColumnWidths...) + + var lastProductName string + for i, entry := range allEntries { + // Print separator before a new product group + if entry.ProductName != lastProductName && i > 0 { + printSeparator(appliedUsageExampleCountsColumnWidths...) + } + + productNameToDisplay := "" + aggregateCountToDisplay := "" + + // Only display the product and its aggregate count once for a group + if entry.ProductName != lastProductName { + productNameToDisplay = entry.ProductName + aggregateCountToDisplay = fmt.Sprintf("%d", entry.ProductCount) + lastProductName = entry.ProductName + } + + printRow(appliedUsageExampleCountsColumnWidths, productNameToDisplay, aggregateCountToDisplay, entry.SubProductName, entry.SubProductCount) + } + + printSeparator(appliedUsageExampleCountsColumnWidths...) +} From 9521e1af472575f7a46179a040e8bdb5de3ef252 Mon Sep 17 00:00:00 2001 From: Dachary Carey Date: Thu, 20 Nov 2025 11:33:49 -0500 Subject: [PATCH 7/7] Updates re: missing product info --- audit/common/Constants.go | 1 + audit/common/GetProductInfo.go | 6 ++++++ audit/gdcd/GetProductSubProduct.go | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/audit/common/Constants.go b/audit/common/Constants.go index 2ff7443..18774da 100644 --- a/audit/common/Constants.go +++ b/audit/common/Constants.go @@ -107,6 +107,7 @@ const ( StreamProcessingDir = "atlas-stream-processing" TriggersDir = "triggers" VectorSearchDir = "atlas-vector-search" + AiIntegrationsDir = "ai-integrations" ) var CanonicalLanguages = []string{Bash, C, CPP, diff --git a/audit/common/GetProductInfo.go b/audit/common/GetProductInfo.go index f4149c3..cb2786b 100644 --- a/audit/common/GetProductInfo.go +++ b/audit/common/GetProductInfo.go @@ -23,6 +23,7 @@ func GetProductInfo(projectOrSubdir string) ProductInfo { } var SubProductDirs = []string{ + AiIntegrationsDir, DataFederationDir, OnlineArchiveDir, StreamProcessingDir, @@ -32,6 +33,11 @@ var SubProductDirs = []string{ } var productInfoMap = map[string]ProductInfo{ + "ai-integrations": { + ProductName: Atlas, + ProductType: DirIsSubProduct, + SubProduct: VectorSearch, + }, "atlas-cli": { ProductName: Atlas, ProductType: CollectionIsSubProduct, diff --git a/audit/gdcd/GetProductSubProduct.go b/audit/gdcd/GetProductSubProduct.go index 2b813bd..543eaf9 100644 --- a/audit/gdcd/GetProductSubProduct.go +++ b/audit/gdcd/GetProductSubProduct.go @@ -23,6 +23,11 @@ func GetProductSubProduct(project string, page string) (string, string) { productInfo = common.GetProductInfo(dir) } } + // If the project is cloud-docs and we didn't find a sub-product in the page ID, just return the product info + // for the project itself. + if productInfo.ProductName == "" { + productInfo = common.GetProductInfo(project) + } } else { // Otherwise, just get the product/sub-product info defined in the common package productInfo = common.GetProductInfo(project)