
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
@aws-sdk/util-user-agent-browser
Advanced tools
[](https://www.npmjs.com/package/@aws-sdk/util-user-agent-browser) [](https://www.n
In previous versions of the AWS SDK for JavaScript v3, the AWS SDK user agent header was provided by parsing the navigator user agent string with the bowser
library.
This was later changed to browser feature detection using the native Navigator APIs, but if you would like to have the previous functionality, use the following code:
import { createUserAgentStringParsingProvider } from "@aws-sdk/util-user-agent-browser";
import { S3Client } from "@aws-sdk/client-s3";
import pkgInfo from "@aws-sdk/client-s3/package.json";
// or any other client.
const client = new S3Client({
defaultUserAgentProvider: createUserAgentStringParsingProvider({
// For a client's serviceId, check the corresponding shared runtimeConfig file
// https://github.com/aws/aws-sdk-js-v3/blob/main/clients/client-s3/src/runtimeConfig.shared.ts
serviceId: "S3",
clientVersion: pkgInfo.version,
}),
});
This usage is not recommended, due to the size of the additional parsing library.
The 'useragent' package is a comprehensive library for parsing and handling user-agent strings. It provides detailed information about the browser, operating system, and device. Compared to @aws-sdk/util-user-agent-browser, 'useragent' offers more extensive parsing capabilities but is not specifically tailored for AWS SDK usage.
The 'ua-parser-js' package is a lightweight JavaScript library for parsing user-agent strings. It can identify the browser, engine, OS, and device from a user-agent string. While it offers similar functionality in terms of parsing user-agent strings, it does not provide the AWS-specific customizations available in @aws-sdk/util-user-agent-browser.
FAQs
[](https://www.npmjs.com/package/@aws-sdk/util-user-agent-browser) [](https://www.n
The npm package @aws-sdk/util-user-agent-browser receives a total of 34,226,719 weekly downloads. As such, @aws-sdk/util-user-agent-browser popularity was classified as popular.
We found that @aws-sdk/util-user-agent-browser 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 uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.