
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
firebase_rpg
Advanced tools
Just a simpler way to write security rules
npm install firebase_rpg
coffee examples/simple.coffee
Init:
Methods:
isolate - specify if we want to wrap the condition in a section (see the tests)
Init:
Methods:
Init:
E.g.
rules =
'test/all':
read: true
write: false
will result in:
{
"rules": {
"test": {
"all": {
".read": true,
".write": false
}
}
}
}
E.g.
RPG = require "firebase_rpg"
R = RPG.R
P = RPG.P
isLoggedIn = ->
R('auth.username !== null')
isCurrentUser = (userId) ->
R("#{userId} === auth.username")
isAdmin = (userId) ->
R(P("root").child("'admin'").child("#{userId}")).exists()
rules =
'test/$user_id':
read : isLoggedIn()
write: isLoggedIn()
.and(
isCurrentUser("$user_id").or(isAdmin("$user_id"))
, true)
generatedRules = RPG.G(rules).generate()
console.info(JSON.stringify(generatedRules, null, ' '));
Output:
{
"rules": {
"test": {
"$user_id": {
".read": "(auth.username !== null)",
".write": "(auth.username !== null&&($user_id === auth.username||root.child('admin').child($user_id).exists()))"
}
}
}
}
FAQs
utility library to write firebase security rules easier
We found that firebase_rpg 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.