Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@enterprise-cmcs/serverless-waf-plugin
Advanced tools
## This is a serverless plugin which has an intelligent set of rules for a waf.
To install the required plugins run the following commands:
npm i -D @enterprise-cmcs/serverless-waf-plugin
npm i -D serverless-associate-waf
This plugin is meant to be used in conjunction with another plugin called serverless-associate-waf
This plugin simply creates the waf and the above plugin will associate the waf with the desired resource.
There are a few configuration options that can be set in the serverless.yml but if you do not need to customize the waf rules at all then simply including the plugin will suffice. The naming convention used for the waf that this plugin generates is the following.
[stage-name]-[service-name]-webacl
This is important to note as you will be using this name in the associate waf plugin to associate the resource. Below is an example of what a serverless.yml file will look like (the peices that need configured).
plugins:
- "@enterprise-cmcs/serverless-waf-plugin"
- serverless-associate-waf
custom:
stage: ${opt:stage, self:provider.stage}
webAclName: ${self:custom.stage}-${self:service}--webacl
associateWaf:
name: ${self:custom.webAclName}
version: V2
There are also currently three customizable rules that can be used by the waf plugin. They are the following:
Below is an example of how you would set an exclude rule in the serverless.yml file:
custom:
wafExcludeRules:
awsCommon:
- "SizeRestrictions_BODY"
Below is an example of how you would set a custom rate-limit (to protect against ddos attacks) in the serverless.yml file:
(Note: if no value is set for the rate limit the default is 5000)
custom:
wafExcludeRules:
awsRateLimit: 200
Below is an example of how to enable logging to cloudwatch from within the serverless.yml file. The cloudwatch log group will be called aws-waf-logs-[stage-name]-[service-name]-webacl
:
(Note: The default value for logging is set to false meaning ther will be no logs)
custom:
wafExcludeRules:
enableLogging: true
Here is an example of how to set the scope of the web acl. This is important if you need to have a web acl for a cloudfront distribution. The default is REGIONAL and there are two options (REGIONAL & CLOUDFRONT)
custom:
wafExcludeRules:
wafScope: CLOUDFRONT
The resource name of the web acl that is generated by this plugin is WafPluginAcl. This resource name will be important if you need to access the resource from within your serverless.yml. An example of when this would be necessary is for associating the web acl with a cloudfront distribution.
FAQs
## This is a serverless plugin which has an intelligent set of rules for a waf.
The npm package @enterprise-cmcs/serverless-waf-plugin receives a total of 417 weekly downloads. As such, @enterprise-cmcs/serverless-waf-plugin popularity was classified as not popular.
We found that @enterprise-cmcs/serverless-waf-plugin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 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
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.