
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
@sectester/core
Advanced tools
The core package can be used to obtain a config including credentials from different sources, and provide a simplified abstraction to handle events and commands.
The core package can be used to obtain a config including credentials from different sources, and provide a simplified abstraction to handle events and commands.
npm i -s @sectester/core
First, you need to generate a new instance of Configuration.
import { Configuration } from '@sectester/core';
const config = new Configuration({
hostname: 'app.brightsec.com',
projectId: 'your project ID',
credentials: {
token: 'your API key'
}
});
After that, you can resolve the configuration using the IoC container.
const config = config.container.resolve(Configuration);
Configuration can be customized using the following options:
export interface ConfigurationOptions {
hostname?: string;
projectId?: string;
credentials?: Credentials;
logLevel?: LogLevel;
credentialProviders?: CredentialProvider[];
}
The default configuration is as follows:
{
logLevel: LogLevel.ERROR,
credentialProviders: [new EnvCredentialProvider()];
}
stringSet the hostname (domain name) used to establish a connection.
import { Configuration } from '@sectester/core';
const config = new Configuration({
hostname: 'app.brightsec.com'
});
[!NOTE] If you omit the
hostnameparameter, 'app.brightsec.com' will be used by default.
stringSet the ID of the project you want to work with.
import { Configuration } from '@sectester/core';
const config = new Configuration({
// ...
projectId: 'your project ID'
});
[!TIP] The project ID can be found in the URL of the project page. For example, in the URL
https://app.brightsec.com/projects/1234, the project ID is1234. We recommend using the dedicated project ID for each application.
[!WARNING] If you omit the
projectIdparameter, we will use the default project ID. This is not recommended especially if you have multiple projects.
LogLevelSet the maximum log level to report.
import { Configuration, LogLevel } from '@sectester/core';
const config = new Configuration({
// ...
logLevel: LogLevel.ERROR
});
CredentialsSet credentials for accessing the application.
import { Configuration } from '@sectester/core';
const config = new Configuration({
// ...
credentials: {
token: 'your API key'
}
});
More info about setting up an API key
CredentialProvider[]Allows you to provide credentials that are loaded at runtime. The configuration will invoke one provider at a time and only continue to the next if no credentials have been located. For example, if the process finds values defined via the BRIGHT_TOKEN environment variables, the file at .sectesterrc will not be read.
Use this provider to read credentials from the following environment variable: BRIGHT_TOKEN
If the BRIGHT_TOKEN environment variable is not set or contains a falsy value, it will return undefined.
import { Configuration, EnvCredentialProvider } from '@sectester/core';
const credentialsProvider = new EnvCredentialProvider();
const config = new Configuration({
// ...
credentialProviders: [credentialsProvider]
});
The ApiClient interface and its implementation FetchApiClient provide a robust way to handle HTTP requests with built-in retry logic, rate limiting, and error handling.
import { FetchApiClient } from '@sectester/core';
const client = new FetchApiClient({
baseUrl: 'https://app.brightsec.com',
apiKey: 'your-api-key',
timeout: 5000 // optional, defaults to 5000ms
});
// Make a request
const response = await client.request('/api/v1/scans');
The FetchApiClient includes the following features:
The client can be configured using the following options:
| Option | Type | Default | Description |
|---|---|---|---|
| baseUrl | string | - | Base URL for all API requests |
| apiKey | string | - | API key for authentication |
| apiKeyPrefix | string | 'Api-Key' | Prefix used in the Authorization header |
| timeout | number | 5000 | Request timeout in milliseconds |
| userAgent | string | sectester-js/ | User agent string |
| retry | RetryOptions | See FetchApiClient.ts | Retry options for the client |
Copyright © 2025 Bright Security.
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
The core package can be used to obtain a config including credentials from different sources, and provide a simplified abstraction to handle events and commands.
We found that @sectester/core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
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
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.