
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/patdeg/common
Shared helpers for Go projects.
Use the root package:
import "github.com/patdeg/common"
Import subpackages, for example:
import "github.com/patdeg/common/auth"
You can also import specialized helpers:
import "github.com/patdeg/common/gcp"
import "github.com/patdeg/common/ga"
The packages read several configuration values from environment variables:
BQ_PROJECT_ID
: Google Cloud project used for storing visit and event data.VISITS_DATASET
: BigQuery dataset name for visit tables.EVENTS_DATASET
: BigQuery dataset name for event tables.ADWORDS_PROJECT_ID
: Cloud project for AdWords click tracking.ADWORDS_DATASET
: BigQuery dataset for AdWords click tables.GOOGLE_OAUTH_CLIENT_ID
: OAuth client ID used by the auth package.GOOGLE_OAUTH_CLIENT_SECRET
: OAuth client secret.ADMIN_EMAILS
: comma-separated list of admin emails for login.If a variable is unset, sensible defaults defined in the code will be used.
Set the required environment variables before starting the sample server:
export BQ_PROJECT_ID=your-gcp-project
export VISITS_DATASET=visits
export EVENTS_DATASET=events
export ADWORDS_PROJECT_ID=your-gcp-project
export ADWORDS_DATASET=adwords
export GOOGLE_OAUTH_CLIENT_ID=xxxxx.apps.googleusercontent.com
export GOOGLE_OAUTH_CLIENT_SECRET=your-secret
export ADMIN_EMAILS=user@example.com
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service_account.json
Run the App Engine example with:
go run ./examples/appengine
The server listens on the port specified by the PORT
variable (defaults to
8080
).
VISITS_DATASET
, EVENTS_DATASET
and
ADWORDS_DATASET
in the project identified by BQ_PROJECT_ID
.GOOGLE_APPLICATION_CREDENTIALS
to
the JSON file path.GOOGLE_OAUTH_CLIENT_ID
and GOOGLE_OAUTH_CLIENT_SECRET
to the
generated values.The project now validates redirect targets and uses AES‑GCM encryption for sensitive data.
The gcp
package includes a Version
helper that fetches the App Engine
version ID from a request context. The function stores the major part of the
version string in the exported common.VERSION
variable and returns it. Call
this helper during initialization so the application can log or act on the
deployed version via common.VERSION
.
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.