
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
@schleifner/assemblyscript-transform
Advanced tools
This repo is AssemblyScript transforms to enhance AssemblyScript features
This is a transform of AssemblyScript to store const utf8 string literal.
The string literal in AssemblyScript is utf16 encoded into Wasm data section, this brings two problems:
To solve this problem, this repo provides a transform of AssemblyScript to define utf8 string literals
This transform scans function call pattern
utf8.build("string literal");
and replace it to
utf8.build_internal(memory.data<u8>([bytes in utf8]), length of bytes);
For example:
utf8.build("test3");
is transferred to
utf8.build_internal(memory.data<u8>([116, 101, 115, 116, 51]), 5);
Attentions:
The AST transform is based on string pattern matcher, so alias is not supported. Please don't use name alias of import and indirect function call to utf8.build, for example import {utf8 as utf_8} or let foo = utf8.build; foo("abc").
The parameter of utf8.build must be string literal
Install assemblyscript-transform
npm install @schleifner/assemblyscript-transform
In AssemblyScript code, src/index.ts
import {utf8} from "../node_modules/@schleifner/assemblyscript-transform/as/utf8ConstStr"
const str = utf8.build("test3");
Build with transform
asc -o out.wasm --transform ./node_modules/@schleifner/assemblyscript-transform/dist/transformBuildUtf8ConstStr.mjs ./src/index.ts
FAQs
const utf8 string literal in AssemblyScript
The npm package @schleifner/assemblyscript-transform receives a total of 0 weekly downloads. As such, @schleifner/assemblyscript-transform popularity was classified as not popular.
We found that @schleifner/assemblyscript-transform demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

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.