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.
@symphonyoss/hubot-symphony
Advanced tools
Hubot adapter for Symphony developed by the Symphony Foundation
Hubot is a chatops tool developed by GitHub, with this adapator you can get up and running with a programmable bot written in JavaScript/Coffescript in a few minutes. This project wraps a small number of the Symphony REST APIs required for two-way bot communication and user lookup together with offline test cases, the adaptor is in use both by Symphony clients and by Symphony themselves.
You must pass the following environment variables to hubot
HUBOT_SYMPHONY_HOST
set to the url of your pod without the https:// prefixHUBOT_SYMPHONY_PUBLIC_KEY
set to the location of your bot account .pem public key fileHUBOT_SYMPHONY_PRIVATE_KEY
set to the location of your bot account .pem private key fileHUBOT_SYMPHONY_PASSPHRASE
set to the passphrase associated with your bot account private keyThere are also optional arguments which should be used if you are running on-premise
HUBOT_SYMPHONY_KM_HOST
set to the url of your key manager without the https:// prefixHUBOT_SYMPHONY_AGENT_HOST
set to the url of your agent without the https:// prefixHUBOT_SYMPHONY_SESSIONAUTH_HOST
set to the url of your session auth without the https:// prefixThese arguments are passed through to the NodeJs request module as described here.
If you want to send a rich message you can call send with an Object instead of a String:
module.exports = (robot) ->
robot.respond /pug me/i, (msg) ->
msg.http("http://pugme.herokuapp.com/random")
.get() (err, res, body) ->
pug = JSON.parse(body).pug
msg.send pug
msg.send {
format: 'MESSAGEML'
text: "<messageML><a href=\"#{pug}\"/></messageML>"
}
The various supported tags are documented here.
If you want to send a direct message to a user in response to a webhook you can interact with the adaptor via the robot variable:
module.exports = (robot) ->
robot.router.post '/hubot/webhook', (req, res) ->
email = req.params.email
message = req.params.message
robot.adapter.sendDirectMessageToEmail(email, message)
res.send 'OK'
A simple diagnostic script is included to help confirm that you have all the necessary pieces to get started. You can run this as follows:
git clone https://github.com/symphonyoss/hubot-symphony.git
cd hubot-symphony
npm install
npm run diagnostic -- --publicKey [key1.pem] --privateKey [key2.pem] --passphrase [changeit] --host [host.symphony.com]
If you are running on-premise you can add optional fifth / sixth / seventh arguments
git clone https://github.com/symphonyoss/hubot-symphony.git
cd hubot-symphony
npm install
npm run diagnostic -- --publicKey [key1.pem] --privateKey [key2.pem] --passphrase [changeit] --host [host.symphony.com] --kmhost [keymanager.host.com] --agenthost [agent.host.com] --sessionhost [session.host.com]
If the script runs as expected it will obtain and log both session and key manager tokens, look up and log some details of the bot account and then create a datafeed and poll. If you send a message using the Symphony client to the bot account you should see the details logged.
Contributions are accepted via GitHub pull requests. All contributors must be covered by contributor license agreements to comply with the Code Contribution Process.
The privateKey.pem and publicKey.pem files under test/resources have been generated at random and are not real keys.
FAQs
Hubot adapter for Symphony
We found that @symphonyoss/hubot-symphony 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.