npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

insomnia-plugin-preflight-guard

v1.1.0

Published

Local-only configurable preflight safety checks for Insomnia requests: secret leaks, production mutations, unsafe auth placement, and redacted workspace audits.

Downloads

565

Readme

insomnia-plugin-preflight-guard

npm version npm downloads license: MIT

Local-only configurable preflight safety checks for Insomnia requests. v1.1.0 adds a local settings file for team-specific guard rules.

Preflight Guard warns before risky API requests leave your machine: leaked secrets, production mutations, query-string auth, sensitive headers, and redacted workspace audits.

Why

Most Insomnia plugins help you send requests faster. This one helps you avoid sending the wrong request.

It is designed for developers who work with real API keys, production endpoints, destructive methods, and private collections.

Features

  • Detects common secret leaks in URL, headers, and body
  • Warns on auth-like query parameters such as access_token, api_key, client_secret, token
  • Blocks destructive requests to production-like hosts by default
  • Loads local settings from ~/.insomnia-preflight-guard.json
  • Supports configurable production host patterns, blocked methods, risky POST paths, and host allowlists
  • Flags sensitive headers with redacted previews
  • Adds a workspace action to export a redacted local Markdown audit
  • Adds a Redacted Preview template tag
  • No cloud
  • No telemetry
  • No backend
  • No dependencies

Demo

Safe request passes normally:

Safe request passes

Production-like destructive request is blocked before sending:

Production DELETE blocked

Sensitive headers warn with redacted values:

Sensitive header warning

The redacted audit action appears in the New Request dropdown:

Audit action menu

Audit export writes a local Markdown file:

Audit exported

What it catches

  • OpenAI-style keys: sk-...
  • Anthropic keys: sk-ant-...
  • GitHub tokens: ghp_..., gho_..., ghs_...
  • Slack tokens: xoxb-..., xoxp-...
  • AWS access keys: AKIA..., ASIA...
  • Stripe secret/restricted keys
  • JWT bearer tokens
  • Private key blocks
  • Generic api_key, access_token, client_secret, secret assignments
  • Production-like host mutations using DELETE, PATCH, PUT, or risky POST paths

Install

From Insomnia:

  1. Open Preferences
  2. Go to Plugins
  3. Enter:
insomnia-plugin-preflight-guard
  1. Click Install Plugin

Manual local install while developing:

cd ~/.config/Insomnia/plugins
npm install insomnia-plugin-preflight-guard

On macOS the plugin folder is:

~/Library/Application Support/Insomnia/plugins/

On Windows:

%APPDATA%\Insomnia\plugins\

Usage

Request guard

Send requests normally. Before a risky request is sent, Preflight Guard analyzes:

  • request URL
  • query parameters
  • method
  • headers
  • body text

High-risk findings show an alert and block the request by default.

Example blocked request alert:

Request:
DELETE https://api.production.example.com/users/42

Findings:
• [HIGH] Destructive request to production-like host
  Location: method+host
  Preview: DELETE api.production.example.com/users/42

Example secret finding:

[HIGH] GitHub token at body: ghp_…abcd

Workspace audit

Use the workspace action:

Preflight Guard: Export Redacted Audit

It exports a local Markdown report with redacted findings:

  • secret-like values
  • production-like URLs
  • auth-like query parameters
  • duplicate names

The plugin exports with includePrivate: false and writes a local .md file.

Redacted Preview template tag

Use the Redacted Preview template tag to redact common secret patterns from pasted text.

Configuration

v1.1.0 loads optional local settings from:

~/.insomnia-preflight-guard.json

For tests, automation, or alternate profiles, set:

INSOMNIA_PREFLIGHT_GUARD_CONFIG=/absolute/path/to/config.json

Example local config:

{
  "blockOnHighRisk": true,
  "warnOnMediumRisk": true,
  "prodHostPatterns": ["prod", "production", "live", "customer"],
  "destructiveMethods": ["DELETE", "PATCH", "PUT"],
  "riskyPostPathPatterns": ["/delete", "/destroy", "/remove", "/purge", "/admin"],
  "allowedHosts": ["prod-sandbox.example.com"]
}

The default config remains local and conservative:

{
  "blockOnHighRisk": true,
  "warnOnMediumRisk": true,
  "prodHostPatterns": ["prod", "production", "live"],
  "destructiveMethods": ["DELETE", "PATCH", "PUT"],
  "riskyPostPathPatterns": ["/delete", "/destroy", "/remove", "/purge", "/admin"],
  "allowedHosts": []
}

File config is merged first; existing Insomnia context.store config, when present, overrides the file for workspace-specific tweaks.

Config behavior

  • blockOnHighRisk: true blocks high-risk requests after showing an alert.
  • blockOnHighRisk: false shows the alert but allows the request to continue.
  • warnOnMediumRisk: true shows warnings for sensitive-but-not-blocking findings.
  • allowedHosts prevents production-host matching for known safe domains.
  • prodHostPatterns controls host matching for words like prod, production, and live.

Example internal config value:

{
  "blockOnHighRisk": false,
  "allowedHosts": ["prod-sandbox.example.com"]
}

Privacy

Preflight Guard is local-only.

  • It does not send request data anywhere.
  • It does not use analytics.
  • It does not call a backend.
  • It does not require an account.
  • It does not require API keys.
  • It only uses Insomnia plugin APIs and local file writes for audits.

Development

git clone https://github.com/oliviajohns5/insomnia-plugin-preflight-guard.git
cd insomnia-plugin-preflight-guard
npm test
npm run test:packaged
npm pack --dry-run

Verified QA

Verified before release:

  • node --check main.js
  • node --check test.js
  • node --check real-insomnia-packaged-test.js
  • node --check qa-packaged.js
  • npm test
  • npm run test:packaged
  • npm pack --dry-run
  • real Insomnia Desktop on macOS manual test:
    • safe request passes
    • production DELETE blocks
    • query-string secret blocks
    • sensitive header warns
    • redacted audit export writes a Markdown file

Plugin Hub

The npm package is public and eligible for Insomnia Plugin Hub indexing:

  • npm: https://www.npmjs.com/package/insomnia-plugin-preflight-guard
  • GitHub: https://github.com/oliviajohns5/insomnia-plugin-preflight-guard
  • Plugin Hub: https://insomnia.rest/plugins

Insomnia Plugin Hub indexing is automatic and may take hours or days after npm publish.

Publish

The Insomnia Plugin Hub lists public npm packages that:

  • start with insomnia-plugin-
  • include a valid package.json
  • include the insomnia metadata field
  • are published as public npm packages

Publish:

npm publish --access public

Requirements

  • Insomnia
  • Node.js/npm only for development or npm publishing

License

MIT