
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.
env-files-diff
Advanced tools
show diff of .env files
$ cat .env
env='env'
env2='env2'
env3='env3'
env_and_sample='env_and_sample-in-env'
env_and_sample2='env_and_sample-in-env2'
$ cat .env.sample
sample='sample'
sample2='sample2'
sample3='sample3'
env_and_sample='env-and-sample-in-sample'
env_and_sample2='env_and_sample-in-sample2'
$ deno run --allow-read=. cli.ts fixture/.env fixture/.env.sample
Keys that exist in .env.sample but not in .env: sample, sample2, sample3
Keys that exist in .env but not in .env.sample: env, env2, env3
import { parse } from "https://raw.githubusercontent.com/ppdx999/deno-env-parser/main/mod.ts";
import {diff, mkMsg} from "https://raw.githubusercontent.com/ppdx999/deno-env-diff/main/mod.ts"
/* if you use node.
run `npm i env-files-parser env-files-diff` and import like below
import { parse } from "env-files-parser";
import {diff, mkMsg} from "env-files-diff"
*/
const env = await Deno.readTextFile('.env');
const sample = await Deno.readTextFile('.env.sample');
const result = diff(parseEnv(env), parseEnv(sample));
// result is like this. [['sample', sample1', sample2'], ['env', 'env1', 'env2']
const msg = mkMsg(result, { aPath, bPath });
// msg is like this.
// Keys that exist in .env.sample but not in .env: sample, sample2, sample3
// Keys that exist in .env but not in .env.sample: env, env2, env3
if (msg) {
console.log(msg);
}
FAQs
Parse env files to typescript
We found that env-files-diff 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.

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.