
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
@flagbear/flagbear
Advanced tools
Simple library to separate deployment of features from release time. It uses network accessible files without the need of a server to provide feature toggles.
Simple library to separate deployment of features from release time. It uses network accesible files without the need of a server to provide feature toggles.
add it to your project using npm install flagbear --save
or yarn add flagbear
import { flagbear } from '../lib'
// or: const { flagbear } = require("flagbear")
const url = "https://gist.githubusercontent.com/alvarolorentedev/c469f99bef5a5c0634b4a94a4acd6546/raw/toggles"
const refreshRateSeconds = 5
const defaultValues = [
{
type: "release",
name: "prop",
value: true,
},
{
type: "release",
name: "prop2",
value: true
},
{
type: "context",
name: "prop3",
conditions: [
{
field: "username",
value: "user1",
operation: "eq"
}
]
}
]
const subject = new flagbear(url, refreshRateSeconds, defaultValues)
setInterval(() => {
if (subject.isEnabled("prop"))
console.log("do stuff")
else
console.log("dont do stuff")
if (subject.isEnabled("prop3", {"username": "user1"}))
console.log("do stuff for user 1")
else
console.log("dont do stuff for user 1")
if (subject.isEnabled("prop3", {"username": "user2"}))
console.log("do stuff for user 2")
else
console.log("dont do stuff for user 2")
console.log("-----------")
}, 10000);
Simple true/false logical path definition.
{
type: "release",
name: "prop",
value: true,
}
Allows complex logic to decide the outcome of the logical path (example traffic, users, resources available).
{
type: "context",
name: "prop3",
conditions: [
{
field: "username",
value: "user1",
operation: "eq"
}
]
}
available operations are:
FAQs
Simple library to separate deployment of features from release time. It uses network accessible files without the need of a server to provide feature toggles.
We found that @flagbear/flagbear demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.