
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
TypeEnvy is a super simple library that gives you **typed environment variables**!
TypeEnvy is a super simple library that gives you typed environment variables!
It couldn't be easier to use. Just do:
yarn add type-envy
Then in your code that needs environment variables do:
import { TypeEnvy, TypeEnvyArgument } from "type-envy";
const env = TypeEnvy(types => ({
// TypeScript Primitives
SOME_STRING_VARIABLE: types.String,
SOME_NUMBER_VARIABLE: types.Number,
// TypeScript Unions
SOME_CHOICE_VARIABLE: ["yes", "no"] as const,
SOME_OPTIONAL_STRING_VARIABLE: [types.Nothing, types.String] as const,
// Custom Types
SOME_CUSTOM_TYPE: (build: TypeEnvyArgument): SpecialType => ({
someFlag: build.value ? true | false,
someValue: build.value ? parseFloat(build.value.toString()) * 100 : NaN
})
}))
type SpecialType = {
someFlag: boolean,
someValue: number,
}
When an environment variable is not available or cannot be converted to your type, you'll get a useful runtime exception:
// Error: Could not safely convert required value THIS_VAR_DOES_NOT_EXIST from <empty> to String.
const env = TypeEnvy(types => ({
THIS_VAR_DOES_NOT_EXIST: types.String
}))
FAQs
TypeEnvy is a super simple library that gives you **typed environment variables**!
We found that type-envy 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 Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.