Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
![Robot](https://www.matchabot.site/static/adea4702d2b8d591adf406a3cd842e36/logo-nav-light.svg)
🍵 MatchaBot is a code generator written in TypeScript.
You can use matchabot to create an entire project, or to generate code inside an existing project in a consistent way.
This tool has been created to offer a "Ruby on Rail" like programming experience with any projects: React / Vue / Angular, NextJS / Gatsby, etc ...
The complete documentation of the project is available at https://www.matchabot.site/
./_machatbot
directory as a subdirectorymatchabot.cmd.json
file inside the ./_machatbot/--generator-name--
directoryExecute the following command at the root of your project.
yarn add matchabot --dev
or
npm install matchabot --save-dev
Execute the following command at the root of your project.
matchabot init
👉 This command create a local directory ./_matchabot
inside your current project directory
Content of _matchabot
_matchabot
├── license
│ ├── add
│ │ ├── apache2.md.hbs
│ │ ├── bsd.md.hbs
│ │ ├── gnu3.md.hbs
│ │ ├── matchabot.cmd.json
│ │ └── mit.md.hbs
│ └── matchabot.json
└── react-app
├── create-app
│ ├── matchabot.cmd.json
│ └── template
├── create-component
│ ├── component.tsx.hbs
│ ├── matchabot.cmd.json
│ ├── stories.tsx.hbs
│ └── style.tsx.hbs
└── matchabot.json
In this example, the _matchabot
is composed of 2 generators
Each generator is defined by a matchabot.json
file
Example for license
{
"name": "license",
"description": "📃 Add licence to your project",
"version": "1.0.0"
}
Each subdirectory contains a definition of a command asociated with a generator
For the react-app
generator we have 2 commands:
create-app
create-component
Each subdirectory contains a matchabot.cmd.json file that defines the *commands and list of actions to perform.
Example ./.matchabot/license/add/matchabot.cmd.json
:
{
"name": "add",
"description": "add a licence file to your project",
"version": "1.0.0",
"args": [
{
"name": "CopyRightsHolder",
"alias": "c",
"type": "string",
"default": "{{process.env.LOGNAME}}"
},
{
"name": "ProgramDescription",
"alias": "p",
"type": "string"
},
{
"name": "LicenceType",
"type": "list",
"choices": [
{ "name": "MIT License", "value": "mit" },
{ "name": "BSD License", "value": "bsd" },
{ "name": "Apache License, Version 2.0", "value": "apache2" },
{ "name": "GNU General Public License version 3", "value": "gnu3" }
],
"default": "MIT"
}
],
"actions": [
{
"type": "template",
"name": "Generate Licence",
"source": "{{toLowerCase LicenceType}}.md.hbs",
"target": "LICENCE.md"
}
]
}
In this example, the args
array contains a list of arguments (variables) that will be used in the templates.
Example of template
MIT License
{{ProgramDescription}}.
Copyright (c) {{formatDate currentDate "YYYY"}} - {{CopyRightsHolder}}
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
In this example with only have 1 action: select a template from "source": "{{toLowerCase LicenceType}}.md.hbs"
and generates a file "target": "LICENCE.md"
matchabot list
👉 This command gives the list of defined generators
__ __ _ _ ____ _
| \/ | __ _| |_ ___| |__ __ _ | __ ) ___ | |_
| |\/| |/ _` | __/ __| '_ \ / _` | | _ \ / _ \| __|
| | | | (_| | || (__| | | | (_| | | |_) | (_) | |_
|_| |_|\__,_|\__\___|_| |_|\__,_| |____/ \___/ \__|
Version: 0.3.0 🍵
Availables generators
---------------------
┌────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬──────────┬────────────────────────────────────────────────────────────────────────────────┐
│ name │ description │ version │ location │
├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼──────────┼────────────────────────────────────────────────────────────────────────────────┤
│ generator │ 🤖 Built-in generator of generators: create your own generator │ 1.0.0 │ ./_matchabot/generator │
├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼──────────┼────────────────────────────────────────────────────────────────────────────────┤
│ license │ 📃 Add licence to your project │ 1.0.0 │ ./_matchabot/license │
├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼──────────┼────────────────────────────────────────────────────────────────────────────────┤
│ react-app │ 🚀 react app generator │ 1.0.0 │ ./_matchabot/react-app │
└────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴──────────┴────────────────────────────────────────────────────────────────────────────────┘
Lists all the commands of the generator react-app
matchabot react-app list
Result
__ __ _ _ ____ _
| \/ | __ _| |_ ___| |__ __ _ | __ ) ___ | |_
| |\/| |/ _` | __/ __| '_ \ / _` | | _ \ / _ \| __|
| | | | (_| | || (__| | | | (_| | | |_) | (_) | |_
|_| |_|\__,_|\__\___|_| |_|\__,_| |____/ \___/ \__|
Version: 0.3.0 🍵
Availables command(s) for react-app
-----------------------------------
┌────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬──────────┬────────────────────────────────────────────────────────────────────────────────┐
│ name │ description │ version │ location │
├────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼──────────┼────────────────────────────────────────────────────────────────────────────────┤
│ create-app │ create a typescript react app │ 1.0.0 │ ./_matchabot/react-app/create-app │
├────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼──────────┼────────────────────────────────────────────────────────────────────────────────┤
│ create-component │ generate a Styled React Component, and an associated story │ 1.0.0 │ ./_matchabot/react-app/create-component │
└────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴──────────┴────────────────────────────────────────────────────────────────────────────────┘
Creation of a React Application using a template generator
matchabot react-app create-app
Result
__ __ _ _ ____ _
| \/ | __ _| |_ ___| |__ __ _ | __ ) ___ | |_
| |\/| |/ _` | __/ __| '_ \ / _` | | _ \ / _ \| __|
| | | | (_| | || (__| | | | (_| | | |_) | (_) | |_
|_| |_|\__,_|\__\___|_| |_|\__,_| |____/ \___/ \__|
Version: 0.3.0 🍵
? ApplicationName MyReactApp
🍵 Generating files ...
👉 Created files
FAQs
![Robot](https://www.matchabot.site/static/adea4702d2b8d591adf406a3cd842e36/logo-nav-light.svg)
The npm package matchabot receives a total of 1 weekly downloads. As such, matchabot popularity was classified as not popular.
We found that matchabot 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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.