Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
github.com/go-chat-bot/plugins
Tip: Use !help <command>
to obtaing more info about these commands.
Passive commands receive all the text sent to the bot or the channels that the bot is in and can process it and reply.
These commands differ from the active commands as they are executed for every text that the bot receives. Ex: The Chuck Norris command, replies with a Chuck Norris fact every time the words "chuck" or "norris" are mentioned on a channel.
Periodic commands are run based on a cron specification passed to the config. These commands are runned periodically, outputting a message to the configured channel(s).
Look into the good morning example command for guidance on how to write and configure periodic commands.
Start with the example commands in the example directory.
It's dead simple, you just need to write a go function and register it on the bot.
Here's a Hello World plugin example:
package example
import (
"fmt"
"github.com/go-chat-bot/bot"
)
func hello(command *bot.Cmd) (msg string, err error) {
msg = fmt.Sprintf("Hello %s", command.User.RealName)
return
}
func init() {
bot.RegisterCommand(
"hello",
"Sends a 'Hello' message to you on the channel.",
"",
hello)
}
FAQs
Unknown package
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 found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.