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

har-security-scan

v0.1.1

Published

Scan HAR files for security issues and generate a clean HTML report

Readme

har-security-scan

npm version node license

Scan a HAR file for common security issues and generate a clean, self-contained HTML report.

No external dependencies. Pure Node.js.


Install

npm install -g har-security-scan

Or run without installing:

npx har-security-scan capture.har

Usage

har-security-scan <input.har> [options]

Options:
  --output, -o <file>    Output file path (default: auto-generated)
  --fail-on <severity>   Exit code 1 if findings exist at this severity or above (high|medium|low)
  --help,   -h           Show this help

Basic scan

har-security-scan capture.har

Generates a report named <hostname>-<timestamp>-har-security-scan.html in the current directory.

Custom output path

har-security-scan capture.har --output report.html

CI gate

har-security-scan capture.har --fail-on high

Exits with code 1 if any High findings are present, making it suitable for CI pipelines.


What it checks

| Check | Severity | |---|---| | Sensitive parameter in URL (API key, token, password) | High | | Plain HTTP request (non-HTTPS) | High | | Verbose error response (stack trace, SQL error) | High | | JWT token in response body | High | | Personal data in URL (email, NRIC, phone) | High | | Mixed content (HTTP resources on HTTPS page) | Medium | | Cookie missing Secure flag | Medium | | Cookie missing HttpOnly flag | Medium | | Missing Content-Security-Policy header | Medium | | Missing Strict-Transport-Security header | Medium | | Missing X-Content-Type-Options header | Medium | | Missing X-Frame-Options header | Medium | | Cookie missing SameSite attribute | Low |

Each finding includes a description, evidence (exact URLs and values), and an inline remediation guide with code examples for Express.js, Nginx, Django, and Spring Boot.


How to export a HAR file

Chrome / Edge: DevTools (F12) > Network tab > right-click any request > Save all as HAR

Firefox: DevTools > Network tab > settings icon > Save all as HAR

Burp Suite: Proxy > HTTP history > select requests > right-click > Save as HAR


Report

The report is a single self-contained HTML file with no external dependencies. It includes:

  • Summary with finding counts by severity
  • Per-finding description, evidence list, and remediation guide
  • Collapsible "More detail" with framework-specific code examples
  • CI-friendly --fail-on exit code

See examples/sample-report.html for an example.


Examples

The examples/ directory contains:

  • sample.har - a realistic HAR file that triggers all checks
  • sample-report.html - the generated report from sample.har

Run it yourself:

har-security-scan examples/sample.har --output my-report.html

License

MIT. See LICENSE