
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
azure-cognitiveservices-language
Advanced tools
Microsoft Azure Cognitive Services Language API Client Library for Node.js
This project provides a Node.js rollup package that makes it easy to work with the Microsoft Azure Cognitive Services Language APIs. Right now it supports:
npm install azure-cognitiveservices-language
const msRestAzure = require('ms-rest-azure');
const CognitiveServicesManagement = require("azure-arm-cognitiveservices");
let client;
let createAccount = msRestAzure.interactiveLogin().then((credentials) => {
client = new CognitiveServicesManagement(credentials, suite.subscriptionId);
return client.accounts.create('groupname', 'accountname', {
sku: {
name: "F0"
},
kind: "TextAnalytics",
location: "westus",
properties: {}
});
}).catch((err) => {
console.log('An error ocurred');
console.dir(err, {depth: null, colors: true});
});
let serviceKey;
createAccount.then((result) => {
return client.accounts.listKeys('groupname', 'accountname');
}).then((result) => {
serviceKey = result.key1;
console.log(result.key2);
}).catch((err) => {
console.log('An error ocurred');
console.dir(err, {depth: null, colors: true});
});
const CognitiveServicesCredentials = require('ms-rest-azure').CognitiveServicesCredentials;
// Creating the Cognitive Services credentials
// This requires a key corresponding to the service being used (i.e. text-analytics, etc)
let credentials = new CognitiveServicesCredentials(serviceKey);
const language = require('azure-cognitiveservices-language');
let client = new language.TextAnalyticsAPIClient(credentials);
let input = {
documents: [
{
'id': "1",
'text': "I had a wonderful experience! The rooms were wonderful and the staff was helpful."
}
]
}
let operation = client.detectLanguage(input)
operation.then(function (result){
console.log(result.documents[0].detectedLanguages[0].name);
console.log(result.documents[0].detectedLanguages[0].score);
}).catch(function (err){
throw err;
});
https://azure.microsoft.com/en-us/try/cognitive-services/ under "Language"
FAQs
Microsoft Azure Cognitive Services Language API Client Library for Node.js
The npm package azure-cognitiveservices-language receives a total of 0 weekly downloads. As such, azure-cognitiveservices-language popularity was classified as not popular.
We found that azure-cognitiveservices-language 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
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.