Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@vercel/blob
Advanced tools
The Vercel Blob JavaScript API client.
👉 Quickstart — SDK Reference 👈
npm install @vercel/blob
We have examples on the vercel.com documentation, there are two ways to upload files to Vercel Blob:
Make sure to include a changeset in your PR. You can do this by running:
pnpm changeset
git commit -am "changeset"
git push
Once such a commit gets merged in main, then GitHub will open a versioning PR you can merge. And the package will be automatically published to npm.
@vercel/blob
reads the token from the environment variables on process.env
. In general, process.env
is automatically populated from your .env
file during development, which is created when you run vc env pull
. However, Vite does not expose the .env
variables on process.env.
You can fix this in one of following two ways:
process.env
yourself using something like dotenv-expand
:pnpm install --save-dev dotenv dotenv-expand
// vite.config.js
import dotenvExpand from 'dotenv-expand';
import { loadEnv, defineConfig } from 'vite';
export default defineConfig(({ mode }) => {
// This check is important!
if (mode === 'development') {
const env = loadEnv(mode, process.cwd(), '');
dotenvExpand.expand({ parsed: env });
}
return {
...
};
});
$env/static/private
:import { put } from '@vercel/blob';
+ import { BLOB_TOKEN } from '$env/static/private';
const blob = await head("filepath", {
- token: '<token>',
+ token: BLOB_TOKEN,
});
FAQs
The Vercel Blob JavaScript API client
The npm package @vercel/blob receives a total of 223,376 weekly downloads. As such, @vercel/blob popularity was classified as popular.
We found that @vercel/blob demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 9 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.