Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Azure signing utilities for node (just table service right now)
The goal is to provide a way to grant access keys to your azure resources (like querying a table from the browser) with a very small footprint.
Like the node azure client(s) the credentials are taken from environment variables by default:
AZURE_STORAGE_ACCOUNT
: used in the "resource" parameterAZURE_STORAGE_ACCESS_KEY
: used to generate sig
query parameter and sign the other paramsSee the azure docs for more details
The tests are written in an end-to-end style see them for actual usage (making calls to azure)
var signTable = require('azure-sign/table');
var expires = new Date();
// good for an hour
expires.setHours(expires.getHours() + 1);
// sign a table resource
var queryParams = table.sas({
// this must be lowercase even if your table is uppercase, etc...
resource: 'tablename',
// allow reads
signedpermissions: 'r',
signedexpiry: expires
});
// query params is suitable for use in any table query that is supported
// via reads
// a quick example using superagent
var superagent = require('superagent');
superagent.get('https://mytable.table.core.windows.net/mytable()').
query('$filter', '(PartitionKey eq "mypartition")').
// turn on json mode
set('Accept', 'application/json');
end(function(err, result) {
var json = result.res.body;
});
var superagent = requrie('superagent');
var now = new Date().toUTCString();
var url = 'https://' + tableService.host + '/' + tableName + '()';
var req = superagent('GET', url);
// These are all required headers
req.set('Content-Type', 'application/json');
req.set('Date', now)
req.set('x-ms-date', now)
req.set('x-ms-version', '2013-08-15');
var headers = {
'Content-Type': req.get('Content-Type'),
'Date': req.get('Date')
};
var signed = subject.sharedKey({
method: req.method,
headers: headers,
resource: tableName + '()'
});
req.set('Authorization', signed);
// now your request is authenticated go for it!
// ... yay
FAQs
Azure Shared Access Signature generation.
The npm package azure-sign receives a total of 1 weekly downloads. As such, azure-sign popularity was classified as not popular.
We found that azure-sign demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.