Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
rox-browser
Advanced tools
Accelerate development and minimize the risk of deploying new code with simple to create feature flags, controlled rollouts, and contextual analytics & integrations.
The package is Javascript SDK of ROX by Rollout.io for integration with web applications. Define and use simple and advanced feature flags, remote configuration variables, static and computed custom properties in code. Control your application via Rollout.io dashboard.
Get more information at https://support.rollout.io
npm i rox-browser --save
Obtain application key by registering at Rollout.io. As soon as your app is created, start using the SDK
import Rox from '../src';
const appSettingsContainer = {
shouldShoWelcome: new Rox.Flag(),
textColor: new Rox.Configuration('black')
};
const onRoxReady = () => {
if (settingsContainer.shouldShoWelcome.isEnabled) {
const color = settingsContainer.textColor.value
const div = document
.createElement('div')
.textContent('Hello world!')
.setAttribute('style', `color: ${color}`);
const body = document.getElementsByTagName('body')[0]
body.appendChild(div)
}
};
Rox.register('settingsNamespace', appSettingsContainer);
Rox.setup('<app key', {
syncCompletionHandler: onRoxReady
});
yarn && yarn start
Navigate to http://localhost:3000
to see the demo project.
Make sure your NPM registry is https://registry.npmjs.org
. Login to the registry npm login
npm version patch | minor | major # bump sem version
npm run deploy # deploys latest tag
The command will clean the /dist
folder, build the project & publish it to our npm registry.
Please note that the command does not increment the version -- you have to do that manually beforehand. However, the following command will also increment patch version (ex. 3.1.4 -> 3.1.5):
yarn run deploy:patch
<script>
HTML tagyarn build
)dist/rox.browser.js
and upload it to s3://builds.rollout.io/sdk_web_js/
.<script type='text/javascript'>
window.roxLoad = function() {
var container = {
flagA: new Rox.Flag()
}
Rox.register('namespace', container);
Rox.setAppRelease('0.0.1');
Rox.setDistinctId('userId');
Rox.setup('RoxAppKey');
};
(function(d, s, id){
var js, rjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.rollout.io/rox.js";
rjs.parentNode.insertBefore(js, rjs);
}(document, 'script', 'rox-sdk'));
</script>
Override the default configuration by prodiving predefined configuration preset for Rox.setup
. There're predefined presets in configPresets
.
For example:
import config from '../configPresets';
import Rox from '../src';
/*
- config.PRODUCTION - uses production settings
- config.QA - uses QA settings
- config.LOCAL - user localhost settings
*/
Rox.setup('appKey', {
configuration: config.QA
});
Override the default configuration by prodiving predefined configuration preset for Rox.setup
.
For example:
import Rox from '../src';
/*
- roxOptions.distinctId
- roxOptions.version
- roxOptions.syncComplitionHandler
*/
const roxOptions = {
distinctId: 'sessionDistinctId',
version: '1.0',
syncCompletionHandler: () => {}
};
Rox.setup('appKey', roxOptions);
Uncomment the import of webpack-bundle-analyzer
module and plugin definition at webpack.config.build.js
. Run yarn run stats
- a new browser window will be opened with bundle's package distribution
FAQs
Rollout.io ROX JS SDK Client
The npm package rox-browser receives a total of 8,118 weekly downloads. As such, rox-browser popularity was classified as popular.
We found that rox-browser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.