
Research
Using Trusted Protocols Against You: Gmail as a C2 Mechanism
Socket uncovers malicious packages on PyPI using Gmail's SMTP protocol for command and control (C2) to exfiltrate data and execute commands.
A simple, useful, but somewhat incorrect implementation of the Either monad in Javascript.
A simple, useful, and slightly incorrect implementation of the Either monad in Javascript.
For starters, some implementation is about what's useful in JS rather than following laws. For example, id(Either.Right.of(1)) !== Either.Right(1).map(id)
. The value will remain the same, but the referential equality is lost.
But hey, the usefulness is real.
Maybe can be used when you just want to know if something exists or not, but do not care about why anything went wrong. Either is roughly the same general idea, except that it captures and preserves the error that caused the chain to be broken, so that you can report on it at the end.
More detail to come.
import Either from 'jseither';
const a = Either.of('test');
const b = a.map(test => `${test} post, please ignore`);
// => Right { 'test post, please ignore' }
const c = b.map(v => v.unsupportedOp());
// => Left { ' TypeError: v.unsupportedOp is not a function' }
b.value();
// => 'test post, please ignore'
c.value();
// => TypeError
b instanceof Right;
// => true
c instanceof Left;
// => true
c.withRight(val => console.log(val)).withleft(err => console.error(err));
// => TypeError is logged
FAQs
A simple, useful, but somewhat incorrect implementation of the Either monad in Javascript.
The npm package jseither receives a total of 3 weekly downloads. As such, jseither popularity was classified as not popular.
We found that jseither 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.
Research
Socket uncovers malicious packages on PyPI using Gmail's SMTP protocol for command and control (C2) to exfiltrate data and execute commands.
Product
We redesigned Socket's first logged-in page to display rich and insightful visualizations about your repositories protected against supply chain threats.
Product
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.