New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fwrule

Package Overview
Dependencies
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fwrule

Parser for Joyent firewall rules

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
16
increased by14.29%
Maintainers
3
Weekly downloads
 
Created
Source

sdc-fwrule

This repository is part of the Joyent Triton project. See the contribution guidelines -- Triton does not use GitHub PRs -- and general documentation at the main Triton project page.

This contains shared code for manipulating Triton firewall rules. There are two parts to this package:

  • A Jison grammar (src/fwrule.jison) that specifies a DSL for writing firewall rules. This is used to generate the parser (lib/parser.js)
  • A rule object that wraps the parser and provides various convenience and serialization methods.

The parser is currently checked in to avoid requiring jison to be installed in order to use this package.

After making changes to this repo, repos which depend on it should be updated and tested appropriately:

  • sdc-fwapi should have the fwrule dependency bumped as needed in its package.json. When a new version of the rule language is released, FWRULE_VERSION should be bumped as needed.
  • smartos-live contains a copy in src/fw/tools/fwrule which gets copied into other locations in the repo by the src/fw/tools/bin/rebuild-node-modules script.
  • sdc-firewaller-agent keeps a checked-in copy of fwadm and therefore fwrule in deps/fw which should be kept in sync with fwadm.

Repository

docs/           Documentation (restdown format)
lib/            Source files
node_modules/   node.js dependencies (populate by running "npm install")
src/            Contains the jison grammar for creating the firewall rule
                parser
tools/          Tools and configuration files
test/           Test suite (using nodeunit)

Development

If you update the jison grammar, run the following to regenerate the parser:

make parser

Before checking in, please run:

make check

and fix any warnings. Note that jsstyle will stop after the first file with an error, so you may need to run this multiple times while fixing.

For non-trivial changes, please add a unit test that covers the functionality of the change. If this is a syntax change, update docs/rules.md.in and docs/examples.md.in accordingly.

Testing

To run all tests:

make test

To run an individual test:

./node_modules/.bin/nodeunit <path to test file>

Keywords

FAQs

Package last updated on 10 Mar 2018

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc