
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
define a tree of scopes, creating scope strings to provide access without redundancy, and matching agains required scopes
define trees of scopes, create scope strings to provide access without redundancy, and matching agains required scopes
creating a scope layout
const scope = require('scope-map');
let layout = scope`
root {
scope1
scope2
}
`;
creating permissions to target route(s)
let allow_root = layout.allow('root');
let allow_0 = layout.allow('scope1');
let allow_1 = layout.allow('scope1 scope2');
let allow_2 = layout.allow('scope1', 'scope2');
let allow_3 = layout.allow`scope1 scope2`;
/* NOTE:
* scope map doesnt extrapolate all sub scopes to mean
* a common parent scope so that parent scopes can later
* be expanded without giving scopes to unauthorized clients
*/
// true
console.log(allow_root != allow_1);
scope modifiers
let allow_read_0 = layout.allow('scope1');
let allow_read_1 = layout.allow('scope1:r');
let allow_write = layout.allow('scope1:w');
let allow_read_write_0 = layout.allow('scope1:rw');
let allow_read_write_1 = layout.allow('scope1:wr');
let allow_exclude = layout.allow('scope1:x');
creating requiremnts
let require_0 = layout.require('scope1');
let require_1 = layout.require('scope1 scope2');
let require_2 = layout.require('scope1', 'scope2');
let require_3 = layout.require`scope1 scope2`;
let require_read_0 = layout.require('scope1');
let require_read_1 = layout.require('scope1:r');
let require_write = layout.require('scope1:w');
let require_read_write_0 = layout.require('scope1:rw');
let require_read_write_1 = layout.require('scope1:wr');
using requiremnts on a scope
// true
console.log(require_0(allow_0));
requirements will remember scopes that are passed to them so that subsequent calls for the same scope run faster
you can also pre prime all requirments so that common scopes run faster. this effects all existing requirments and all future requirements
layout.prime(allow_0);
FAQs
define a tree of scopes, creating scope strings to provide access without redundancy, and matching agains required scopes
We found that scope-map 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
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.