Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@aws-sdk/middleware-flexible-checksums
Advanced tools
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/middleware-flexible-checksums/latest.svg)](https://www.npmjs.com/package/@aws-sdk/middleware-flexible-checksums) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/middleware-flexible-checksums.s
@aws-sdk/middleware-flexible-checksums is a middleware package for the AWS SDK for JavaScript. It provides functionality to handle flexible checksums for AWS services, ensuring data integrity during transmission.
Adding Checksum to Requests
This feature allows you to add a checksum to your S3 PutObject requests to ensure data integrity during transmission.
const { S3Client, PutObjectCommand } = require('@aws-sdk/client-s3');
const { flexibleChecksumsMiddleware } = require('@aws-sdk/middleware-flexible-checksums');
const client = new S3Client({
region: 'us-west-2',
});
client.middlewareStack.add(flexibleChecksumsMiddleware(), {
step: 'build',
priority: 'high',
});
const command = new PutObjectCommand({
Bucket: 'example-bucket',
Key: 'example-key',
Body: 'Hello, world!',
});
client.send(command).then((response) => {
console.log('Success', response);
}).catch((error) => {
console.error('Error', error);
});
Validating Checksum in Responses
This feature allows you to validate the checksum in the response from an S3 GetObject request to ensure data integrity.
const { S3Client, GetObjectCommand } = require('@aws-sdk/client-s3');
const { flexibleChecksumsMiddleware } = require('@aws-sdk/middleware-flexible-checksums');
const client = new S3Client({
region: 'us-west-2',
});
client.middlewareStack.add(flexibleChecksumsMiddleware(), {
step: 'deserialize',
priority: 'high',
});
const command = new GetObjectCommand({
Bucket: 'example-bucket',
Key: 'example-key',
});
client.send(command).then((response) => {
console.log('Success', response);
}).catch((error) => {
console.error('Error', error);
});
The 'aws-sdk' package is the official AWS SDK for JavaScript. It provides a comprehensive set of tools for interacting with AWS services, including S3. While it does not specifically focus on flexible checksums, it offers a wide range of functionalities for AWS services.
The 'aws4' package is a lightweight library for signing AWS requests using AWS Signature Version 4. It does not provide checksum functionality but is useful for securely signing requests to AWS services.
The 's3-upload-stream' package is a Node.js library for streaming uploads to Amazon S3. It focuses on streaming data to S3 and does not provide checksum functionality, but it is useful for handling large file uploads.
FAQs
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/middleware-flexible-checksums/latest.svg)](https://www.npmjs.com/package/@aws-sdk/middleware-flexible-checksums) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/middleware-flexible-checksums.s
The npm package @aws-sdk/middleware-flexible-checksums receives a total of 0 weekly downloads. As such, @aws-sdk/middleware-flexible-checksums popularity was classified as not popular.
We found that @aws-sdk/middleware-flexible-checksums demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.