
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@airhornjs/azure
Advanced tools
Azure Communication Services and Notification Hubs provider for Airhorn.
npm install airhorn @airhornjs/azure
import { Airhorn } from 'airhorn';
import { AirhornAzure } from '@airhornjs/azure';
// Create Azure provider for SMS
const azureProvider = new AirhornAzure({
connectionString: 'endpoint=https://your-service.communication.azure.com/;accesskey=your-key',
});
// Create Airhorn instance with Azure provider
const airhorn = new Airhorn({
providers: [azureProvider],
});
const data = {
orderId: '12345',
customerName: 'John',
};
// Send SMS
const template = {
from: '+1234567890', // Your sender phone number (must be provisioned in Azure)
content: 'Hello <%= customerName %>!, your order #<%= orderId %> has been shipped!',
type: AirhornSendType.SMS,
};
const result = await airhorn.send(
'+0987654321', // to
template,
data,
AirhornSendType.SMS
);
import { Airhorn } from 'airhorn';
import { AirhornAzure } from '@airhornjs/azure';
// Create Azure provider with email support
const azureProvider = new AirhornAzure({
connectionString: 'endpoint=https://your-service.communication.azure.com/;accesskey=your-key',
});
// Create Airhorn instance
const airhorn = new Airhorn({
providers: [azureProvider],
});
const data = {
orderId: '656565',
customerName: 'John',
};
// Send Email
const template = {
from: 'DoNotReply@yourdomain.com', // Must be verified domain in Azure
subject: 'Order Confirmation: <%= orderId %>',
content: 'Hi <%= customerName %>, your order #<%= orderId %> has been confirmed!',
};
const result = await airhorn.send(
'recipient@example.com', // to
template,
data,
AirhornSendType.Email
);
import { Airhorn } from 'airhorn';
import { AirhornAzure } from '@airhornjs/azure';
const azureProvider = new AirhornAzure({
notificationHubConnectionString: 'Endpoint=sb://your-namespace.servicebus.windows.net/;SharedAccessKeyName=DefaultFullSharedAccessSignature;SharedAccessKey=your-key',
notificationHubName: 'your-hub-name',
});
const airhorn = new Airhorn({
providers: [azureProvider],
});
const data = {
orderId: '12345',
customerName: 'John',
};
// Send to iOS device via APNs
const template = {
from: 'YourApp',
content: JSON.stringify({
aps: {
alert: {
title: 'New Order',
body: 'Hi <%= customerName %>You have a new order #<%= orderId %>',
},
badge: 1,
sound: 'default',
},
// Custom data
orderId: '12345',
}),
};
// Send using tag expression
await airhorn.send(
'user:john-doe', // Tag expression
template,
data,
AirhornSendType.MobilePush,
{
platform: 'apple',
tags: 'user:john-doe && ios',
},
);
You can specify which services to enable using the capabilities
option:
// SMS only
const smsProvider = new AirhornAzure({
connectionString: 'your-connection-string',
capabilities: [AirhornSendType.SMS],
});
// Email only
const emailProvider = new AirhornAzure({
connectionString: 'your-connection-string',
capabilities: [AirhornSendType.Email],
});
// Mobile Push only
const pushProvider = new AirhornAzure({
notificationHubConnectionString: 'your-hub-connection-string',
notificationHubName: 'your-hub-name',
capabilities: [AirhornSendType.MobilePush],
});
// All capabilities (explicit)
const allProvider = new AirhornAzure({
connectionString: 'your-communication-services-connection-string',
notificationHubConnectionString: 'your-hub-connection-string',
notificationHubName: 'your-hub-name',
capabilities: [AirhornSendType.SMS, AirhornSendType.Email, AirhornSendType.MobilePush],
});
connectionString
(optional): Azure Communication Services connection string (used for both SMS and Email if specific strings not provided)emailConnectionString
(optional): Specific connection string for Email servicesmsConnectionString
(optional): Specific connection string for SMS servicenotificationHubConnectionString
(optional): Azure Notification Hub connection stringnotificationHubName
(optional): Azure Notification Hub namecapabilities
(optional): Array of AirhornSendType
values to specify which services to enable (defaults to SMS, MobilePush, and Email)await airhorn.send(to, message, {
// Additional SMS options from Azure Communication Services
deliveryReportTimeoutInSeconds: 300,
tag: 'custom-tag',
});
Minimum required permissions for the service principal or managed identity:
Azure Communication Services Contributor
roleMicrosoft.Communication/CommunicationServices/read
Microsoft.Communication/CommunicationServices/write
Azure Notification Hubs Contributor
roleMicrosoft.NotificationHubs/Namespaces/NotificationHubs/read
Microsoft.NotificationHubs/Namespaces/NotificationHubs/write
pnpm test
Now that you've set up your workspace, you're ready to contribute changes to the airhorn
repository you can refer to the CONTRIBUTING guide. If you have any questions please feel free to ask by creating an issue and label it question
.
This project is MIT License © Jared Wray
FAQs
Azure provider for Airhorn
We found that @airhornjs/azure demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.