
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
github.com/deibyz/go-client-mongodb-ops-manager
A go client for Ops Manager and Cloud Manager API.
Currently, ops-manager requires Go version 1.12 or greater.
import "go.mongodb.org/ops-manager/opsmngr"
Construct a new Ops Manager client, then use the various services on the client to access different parts of the Ops Manager API. For example:
client := opsmngr.NewClient(nil)
The services of a client divide the API into logical chunks and correspond to the structure of the Ops Manager API documentation at https://docs.opsmanager.mongodb.com/v4.2/reference/api/.
NOTE: Using the context package, one can easily
pass cancellation signals and deadlines to various services of the client for
handling a request. In case there is no context available, then context.Background()
can be used as a starting point.
The ops-manager library does not directly handle authentication. Instead, when
creating a new client, pass an http.Client that can handle authentication for
you. The easiest and recommended way to do this is using the digest
library, but you can always use any other library that provides an http.Client
.
If you have a private and public API token pair, you can
use it with the digest library using:
import (
"context"
"log"
"github.com/Sectorbob/mlab-ns2/gae/ns/digest"
"go.mongodb.org/ops-manager/opsmngr"
)
func main() {
t := digest.NewTransport("your public key", "your private key")
tc, err := t.Client()
if err != nil {
log.Fatalf(err.Error())
}
client := opsmngr.NewClient(tc)
orgs, _, err := client.Organizations.List(context.Background(), nil)
}
Note that when using an authenticated Client, all calls made by the client will include the specified tokens. Therefore, authenticated clients should almost never be shared between different users.
This library is being initially developed for mongocli, so API methods will likely be implemented in the order that they are needed by that application.
See our CONTRIBUTING.md Guide.
MongoDB Ops Manager Go Client is released under the Apache 2.0 license. See LICENSE
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.