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

salesforce-org-health

v1.0.6

Published

World-class Salesforce Org Health Assessment Tool - Generate beautiful HTML reports with KPIs, charts, and risk analysis

Readme

🛡️ Salesforce Org Health Assessment Tool

A world-class, professional-grade Node.js application that analyzes your Salesforce org's security health and generates beautiful, interactive HTML reports with comprehensive KPIs, risk visualizations, and detailed data tables.

✨ Features

📊 Key Performance Indicators (KPIs)

  • Health Score - Overall security score from Salesforce Security Health Check
  • Critical Issues - Count of high-risk items requiring immediate attention
  • Compliance Rate - Percentage of checks meeting Salesforce standards
  • Total Issues - Complete count of non-compliant items
  • Download KPI as Image - Export KPI section as a PNG image

📈 Interactive Visualizations

  • Risk Level Distribution - Donut chart showing high, medium, low risk, and compliant items
  • Compliance Overview - Visual representation of compliant vs non-compliant checks
  • Risk by Category - Bar chart breaking down issues by setting group

📋 Advanced Data Table

  • Column Sorting - Click any column header to sort ascending/descending
  • Search Functionality - Real-time search across all fields
  • Pagination - Navigate through data with 20 rows per page
  • CSV Export - Download complete data as CSV file
  • Responsive Design - Works on desktop, tablet, and mobile

🎨 Beautiful Design

  • Modern gradient UI with professional styling
  • Responsive layout that adapts to any screen size
  • Smooth animations and transitions
  • Print-friendly design
  • Color-coded risk badges for easy identification

Screenshots

sfoh

sfoh2

sfoh3


📋 Prerequisites

  • Node.js (v14 or higher)
  • Salesforce CLI (sf CLI)
  • Authenticated Salesforce org with Security Health Check enabled

🚀 Installation

npm install -g salesforce-org-health

💻 Usage

Basic Usage

sfoh -o <your-org-username-or-alias>

Specify Output File

sfoh -o [email protected] --output custom-report.html

Using org alias

sfoh -o ea11

Command Line Options

| Option | Alias | Description | Required | Default | |--------|-------|-------------|----------|---------| | --org | -o | Salesforce org username or alias | ✅ Yes | - | | --output | - | Output HTML file path | ❌ No | org-health-report.html | | --version | -V | Show version number | ❌ No | - | | --help | -h | Display help information | ❌ No | - |

📊 Data Sources

The tool queries the following Salesforce objects:

  1. SecurityHealthCheck - Overall org health score
  2. SecurityHealthCheckRisks - Detailed risk items filtered by:
    • HIGH_RISK
    • MEDIUM_RISK
    • LOW_RISK
    • MEETS_STANDARD

🎯 Example Output

The generated HTML report includes:

Header Section

  • Organization name and report timestamp
  • Quick summary statistics (High/Medium/Low/Compliant counts)

KPI Dashboard

  • 4 beautiful KPI cards with gradient backgrounds
  • Downloadable as image for presentations

Charts Section

  • 3 interactive Chart.js visualizations
  • Responsive and animated

Data Table

  • Sortable columns
  • Real-time search
  • Pagination controls
  • CSV export functionality

🔒 Security Considerations

  • The tool uses Salesforce CLI authentication - ensure you're authenticated to the correct org
  • No credentials are stored in the application
  • All queries are read-only
  • HTML reports are generated locally

🐛 Troubleshooting

"Command not found: sf"

Solution: Install Salesforce CLI from https://developer.salesforce.com/tools/salesforcecli

"No org configuration found"

Solution: Authenticate to your Salesforce org using:

sf org login web -a myorg

"INVALID_FIELD: No such column 'Score'"

Solution: Enable Security Health Check in Setup → Security Health Check

Empty or missing data

Solution:

  1. Run Security Health Check in your Salesforce org first
  2. Ensure you have proper permissions to query SecurityHealthCheck objects

📖 API Reference

Salesforce Objects Used

SecurityHealthCheck

  • Score - Overall health score (0-100)

SecurityHealthCheckRisks

  • RiskType - Risk level (HIGH_RISK, MEDIUM_RISK, LOW_RISK, MEETS_STANDARD)
  • Setting - Name of the security setting
  • SettingGroup - Category/group of the setting
  • OrgValue - Current value in your org
  • StandardValue - Recommended value by Salesforce

For complete documentation, see: https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_securityhealthcheckrisks.htm

🎓 Best Practices

  1. Run regularly - Generate reports monthly or after major configuration changes
  2. Address high-risk items first - Focus on critical security issues
  3. Track progress - Compare reports over time to measure improvement
  4. Share with stakeholders - Export KPI image for executive summaries
  5. Document remediation - Use CSV export to track remediation efforts

📄 License

MIT License (c) Mohan Chinnappan

🤝 Contributing

📞 Support

For issues related to:

  • Salesforce CLI: Check Salesforce CLI documentation
  • Security Health Check: Contact Salesforce Support

Made with ❤️ for the Salesforce Community