
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
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.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.