Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
@onereach/channel-transformers
Advanced tools
Convert data models between different channels (Slack, Microsoft Teams...) to a generic CB model and vice versa
Readme
✅ Developing:
npm i
Sample of code in ./user-test.js If you use ./user-test.js than just run:
npm run dev
Or, create local file and require from ./index.js next functions
import {
transformSlackToMicrosoftTeams,
transformMicrosoftTeamsToSlack
} from './index';
After that import json data. Fot example, slack model
const slackToMsTeamsData = require('./slack->msTeams.json');
And transform Slack model to Microsoft team:
const microsoftTeamsModel = transformSlackToMicrosoftTeams({ data: slackToMsTeamsData });
console.log(JSON.stringify(microsoftTeamsModel))
We use unit testing based on cases. Create new case, just run script, before run command look up in derictory ./test/cases and enter NUMBER_OF_CASE next after existing (change NUMBER_OF_CASE to Number of case)
sh scripts/createCase.sh NUMBER_OF_CASE
Than open ./test/cases/NUMBER_OF_CASE and add original data model to from.json file open ./test/cases/NUMBER_OF_CASE and add expected data model to to.json file
npm run test
Sample: Microsoft Teams and Slack
...
{
itmes: [
{
itemType: type, // type of block or element
children: [], // array of atributes, children, items,
attributes: {} // additional data (title, styles and so on),
value: // anu value data
}
]
}
itemType: 'section',
children,
attributes: {
position // could be left of undefined
}
{
itemType: 'text',
textType: type, // could be mrkdown, markdown, plain_text
text
}
{
itemType: 'image',
url: image_url,
alt: alt_text,
attributes: {
title,
position // could be left of undefined
}
}
{
itemType: 'divider'
}
{
itemType: 'actions',
children
}
{
itemType: 'button',
value,
url,
text,
attributes: {
text,
style // color styling default, blue, red, green
}
}
{
itemType: 'columnset',
columnLength: 0,
children: [
{
numberOfColumn: Number // have to be cleared
}
]
}
{
itemType: 'select',
id,
placeholder: { type: 'plain_text', text: 'Select a date', emoji: true } || 'Just a string',
options: [
{
label: item.text,
value: item.value
};
],
isMultiSelect: false,
attributes: {
position
}
}
{
itemType: 'datepicker',
placeholder: { type: 'plain_text', text: 'Select a date', emoji: true } || 'Just a string',
value: '1990-04-28',
id: '123',
attributes: { position: 'left' }
}
{
itemType: 'input',
input: {
placeholder,
isMultiline
},
label: text or text object
}
{
itemType: 'error',
message: `Method for ${type} not found`
}
FAQs
Convert data models between different channels (Slack, Microsoft Teams...) to a generic CB model and vice versa
The npm package @onereach/channel-transformers receives a total of 0 weekly downloads. As such, @onereach/channel-transformers popularity was classified as not popular.
We found that @onereach/channel-transformers demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Research
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.