Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
hubot-rate-limit
Advanced tools
Middleware for adding rate limits to commands
See src/rate-limit.coffee
for full documentation.
In hubot project repo, run:
npm install hubot-rate-limit --save
Then add hubot-rate-limit to your external-scripts.json
:
[
"hubot-rate-limit"
]
HUBOT_RATE_LIMIT_NOTIFY_PERIOD
- default interval (seconds) between posting rate limiting messages in chat
HUBOT_RATE_LIMIT_CMD_PERIOD
- default interval (seconds) between each invocation of a specific listener
HUBOT_RATE_LIMIT_CMD_PERIOD
can be overridden using listener options:
robot.hear /hi/, {rateLimits:{minPeriodMs:1000}} (msg) ->
# stuff that will only be executed once per second
A rate limit period of 0 effectively means as fast as possible.
If notify period is greater than command period, then the notify period is lowered down to the command period. This is so that there is always at least one notification per transition from allowed to limiting.
user1>> hubot hello
hubot>> hello!
user1>> hubot hello
hubot>> Rate limit hit! Please wait 5 seconds before trying again.
user1>> hubot hello
(no response)
user1>> hubot hello
(no response)
(wait 5 seconds)
user1>> hubot hello
hubot>> hello!
If you are using the hubot-history script, it adds a catch-all listener that hubot-rate-limit then applies rate limiting to. This will result in spurious rate limiting messages and patchy logs (only one log message every second).
FAQs
Middleware for adding rate limits to commands
The npm package hubot-rate-limit receives a total of 2 weekly downloads. As such, hubot-rate-limit popularity was classified as not popular.
We found that hubot-rate-limit 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.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.