
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@automattic/explat-client
Advanced tools
This is a standalone client for Automattic's ExPlat, allowing use of ExPlat in any Javascript context.
const exPlatClient = createExPlatClient(config)
ExperimentAssignment
ExperimentAssignment
represents an experiment assignment, as an experimenter you just need to look at ExperimentAssignment.variationName
.
variationName === null
: This means you should return the default experience.variationName !== null
: This means you should return the treatment experience. Currently variationName
will always be treatment
, but this may change.This type will likely be extended, it can also be missing in some API functions, particularly in the React side of things. A missing experiment assignment does not mean the default experience, it means we do not have an assignment yet and if we can afford to wait we should, generally displaying a loading experience.
exPlatClient.loadExperimentAssignment
loadExperimentAssignment: (experimentName: string) => Promise<ExperimentAssignment>
const experimentAssignment = await loadExperimentAssignment('experiment_name')
exPlatClient.dangerouslyGetExperimentAssignment
dangerouslyGetExperimentAssignment: ( experimentName: string ) => ExperimentAssignment
// An experiment MUST be loaded beforehand:
loadExperimentAssignment( 'experiment_name' );
// Then, significantly enough in the future for the loading to have occurred:
try {
const experimentAssignment = dangerouslyGetExperimentAssignment( 'experiment_name' );
} catch ( e ) {
// You need to ensure that this will happen very rarely, we use throwing and a try catch block
// to indicate that this is the exception rather than the norm.
// You MAY want to provide the default experience here.
}
This is an "asyncronous escape hatch", allowing you to use ExPlat in more synchronous code such as within /lib
.
Checklist for use:
loadExperiment
get called before dangerouslyGetExperimentAssignment
gets called.loadExperiment
get called significantly before it (minimum 2 seconds looking at perf data, 5-10 seconds is best).dangerouslyGetExperimentAssignment
wrapped in a try-catch blockFAQs
Standalone ExPlat Client.
The npm package @automattic/explat-client receives a total of 2,865 weekly downloads. As such, @automattic/explat-client popularity was classified as popular.
We found that @automattic/explat-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 49 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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.