
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
@akord/crypto
Advanced tools
In browser en-/decryption API
Module is helping in bringing the client apps into end-2-end encrypted, privacy-first world. No reinventig APIs, just facading well known libs to make those more developer friendly for majority of business cases.
See here to learn more about e2e encryption @Akord
npm i @akord/crypto
Crypto.configure(
{
password: "test"
}
)
Crypto.configure(
{
password: "test",
encBackupPhrase: "yExlksth..."
}
)
Decorators are a way to go to abstract encryption from business logic. The goal of decorators API is really to "decorate" client side app with encryption
Use two high-level functions (encrypt & decrypt) as decorators like:
class User extends Encryptable {
@encrypted()
name: string;
@encrypted()
profileImageUrl: string;
id: string
constructor(name: string, profileImageUrl: string, keys: Array<Keys>, publicKey: string) {
super(keys, publicKey);
this.name = name;
this.profileImageUrl = profileImageUrl;
}
}
const user = new User("yExlksth...", "https:/profile-image...", [{encPrivateKey: "yJbmdor...", publicKey: "yHklouu.." }], "yHuyks...")
await user.encrypt()
Same rules apply to methods and their parameters
saveFooBar(
@encrypted foo: string,
bar: string) {
...
}
In the above foo param will be end up as encrypted string in method body. bar param will stay untouched.
Complex structures are supported:
saveFooBar(
@encrypted(attributes="encAttr1,encAttr2") foo: Foo,
bar: string) {
...
}
Foo {
id: string
encAttr1: string
encAttr2: string
}
and decryption goes like
class User extends Encryptable {
@encrypted()
name: string;
@encrypted()
profileImageUrl: string;
id: string
constructor(name: string, profileImageUrl: string, keys: Array<Keys>){
this.name = name;
this.profileImageUrl = profileImageUrl;
}
}
const user = new User("yExlksth...", [{encPrivateKey: "yJbmdor...", publicKey: "yHklouu.." }])
await user.decrypt()
fetchBar(
@decrypted param1: string,
param2: HeaderParams
) {
...
}
in the above param1 will be decreypted, param2 will not be touched.
No need to refactor the code to split complex parameters into single string params:
fetchBar(
@decrypted(attributes="encAttr1,encAttr2") param1: QueryParams,
param2: HeaderParams
) {
...
}
QueryParams {
id: string
encAttr1: string
encAttr2: string
}
In the above id from QueryParams will not be decrypted. Obviously HeaderParams will also stay untouched
...
yarn install
yarn build
To run all tests:
yarn test
To run single test file:
yarn test <path-to-test-file>
yarn test ./src/__tests__/encrypt.test.ts
To run single test file with direct log output:
node --inspect node_modules/.bin/jest ./src/__tests__/wallet.test.ts
FAQs
In browser en-/decryption API
We found that @akord/crypto demonstrated a not healthy version release cadence and project activity because the last version was released 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
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.