Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
@arcjet/analyze
Advanced tools
@arcjet/analyze
Arcjet helps developers protect their apps in just a few lines of code. Implement rate limiting, bot protection, email verification, and defense against common attacks.
This is the Arcjet local analysis engine.
npm install -S @arcjet/analyze
import { generateFingerprint, isValidEmail } from "@arcjet/analyze";
const fingerprint = generateFingerprint("127.0.0.1");
console.log("fingerprint: ", fingerprint);
const valid = isValidEmail("hello@example.com");
console.log("is email valid?", valid);
This package provides analyze logic implemented as a WebAssembly module which will run local analysis on request details before calling the Arcjet API.
The arcjet.wasm.js file contains the binary inlined as
a base64 Data URL with the application/wasm
MIME type.
This was chosen to save on storage space over inlining the file directly as a Uint8Array, which would take up ~3x the space of the Wasm file. See Better Binary Batter: Mixing Base64 and Uint8Array for more details.
It is then decoded into an ArrayBuffer to be used directly via WebAssembly's
compile()
function in our entry point file.
This is all done to avoid trying to read or bundle the Wasm asset in various
ways based on the platform or bundler a user is targeting. One example being
that Next.js requires special asyncWebAssembly
webpack config to load our
Wasm file if we don't do this.
In the future, we hope to do away with this workaround when all bundlers properly support consistent asset bundling techniques.
In progress.
Licensed under the Apache License, Version 2.0.
1.0.0-alpha.25 (2024-09-10)
FAQs
Arcjet local analysis engine
The npm package @arcjet/analyze receives a total of 2,076 weekly downloads. As such, @arcjet/analyze popularity was classified as popular.
We found that @arcjet/analyze demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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 initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.