
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
firebase-json
Advanced tools
Parser for Firebase rules JSON files.
It supersedes RFC 7159 with those additions:
To parse Firebase rules:
const json = require('firebase-json');
const fs = require('js');
const rules = json.parse(fs.readFileSync('./rules.json', 'utf8'));
console.log(rules);
This is primarily used to load rules for targaryen test.
The alternatives are:
Those solutions might limit or disrupt your current work flow or deployment. Parsing the rule might also allow us later to map a rule syntax or evaluation error to a specific place in the JSON file similarly to Firebase simulator.
npm install firebase-json
parse(json: rules): any
Parse the firebase-json encoded string.
load(filePath: string, options: void|string|object): Promise<any,Error>
Read the file and parse its firebase-json encoded content.
loadSync(filePath: string, options: void|string|object): any
Read the file synchronously and parse its firebase-json encoded content.
ast(json: rules): {type: string, expression: object, loc: object}
Parse the firebase-json encoded string into an to intermediary AST. It uses the ESTree AST schema and returns an "ExpressionStatement" node.
git clone git@github.com:dinoboff/firebase-json.git
cd firebase-json
npm i
npm test
Firebase-json is maintained by Damien Lebrun.
The parser is generated by David Majda's Pegjs. The firebase-json grammar definition is based on Pegjs JSON grammar example.
MIT License
Copyright (c) 2017 Damien Lebrun
FAQs
Parser for JSON based Firebase rules files
The npm package firebase-json receives a total of 2,774 weekly downloads. As such, firebase-json popularity was classified as popular.
We found that firebase-json 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.