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

hardhat-web3sentinel

v1.0.0

Published

Hardhat plugin for Web3Sentinel smart contract security audits

Readme

hardhat-web3sentinel

Hardhat plugin for Web3Sentinel smart contract security audits.

npm version License: MIT

What is Web3Sentinel?

Web3Sentinel is an AI-powered smart contract security platform that provides instant, affordable security audits. This Hardhat plugin integrates Web3Sentinel directly into your development workflow.

Installation

npm install --save-dev hardhat-web3sentinel

Setup

1. Import the plugin in your hardhat.config.js:

require("hardhat-web3sentinel");

module.exports = {
  solidity: "0.8.19",
  web3sentinel: {
    apiKey: process.env.WEB3SENTINEL_API_KEY, // or hardcode (not recommended)
    failOnCritical: true,  // Fail build if critical vulnerabilities found
    failOnHigh: false,     // Fail build if high severity vulnerabilities found
    minSecurityScore: 70   // Minimum security score required
  }
};

2. Get your API key

  1. Sign up at web3sentinel.org
  2. Go to Dashboard → API Keys
  3. Create a new API key
  4. Set it as environment variable:
export WEB3SENTINEL_API_KEY=ws_your_api_key_here

Usage

Audit all contracts

npx hardhat audit

Audit specific contract

npx hardhat audit --contract MyToken.sol

Audit all contracts explicitly

npx hardhat audit --all

Configuration Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | apiKey | string | - | Your Web3Sentinel API key (required) | | failOnCritical | boolean | true | Fail build if critical vulnerabilities found | | failOnHigh | boolean | false | Fail build if high severity vulnerabilities found | | minSecurityScore | number | 70 | Minimum security score (0-100) required to pass |

Example Output

🔍 Web3Sentinel Smart Contract Audit

Found 2 contract(s) to audit

📄 Auditing: MyToken.sol
   Status: completed
   ✅ Audit complete
   Security Score: 85/100
   Gas Score: 78/100
   Vulnerabilities: 2

📄 Auditing: MyNFT.sol
   Status: completed
   ✅ Audit complete
   Security Score: 92/100
   Gas Score: 88/100
   Vulnerabilities: 0

📊 Audit Summary

🟢 MyToken: 85/100 (2 issues)
🟢 MyNFT: 92/100 (0 issues)

✅ All audits passed!

CI/CD Integration

GitHub Actions

name: Security Audit

on: [push, pull_request]

jobs:
  audit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: '18'
      
      - run: npm install
      - run: npx hardhat audit
        env:
          WEB3SENTINEL_API_KEY: ${{ secrets.WEB3SENTINEL_API_KEY }}

GitLab CI

audit:
  stage: test
  script:
    - npm install
    - npx hardhat audit
  variables:
    WEB3SENTINEL_API_KEY: $WEB3SENTINEL_API_KEY

Pre-deployment Hook

Add to your deployment script:

// scripts/deploy.js
const hre = require("hardhat");

async function main() {
  // Run audit before deployment
  console.log("Running security audit...");
  await hre.run("audit");
  
  // Deploy contract
  const MyContract = await hre.ethers.getContractFactory("MyContract");
  const contract = await MyContract.deploy();
  await contract.deployed();
  
  console.log("Contract deployed to:", contract.address);
}

main().catch((error) => {
  console.error(error);
  process.exitCode = 1;
});

Programmatic Usage

const { Web3Sentinel } = require("web3sentinel-sdk");

task("custom-audit", "Custom audit task").setAction(async (_, hre) => {
  const sentinel = hre.web3sentinel;
  
  const result = await sentinel.audits.submitAndWait({
    name: "MyContract",
    sourceCode: contractCode
  });
  
  console.log("Security Score:", result.securityScore);
});

Features

  • ✅ Automatic contract discovery
  • ✅ AI-powered vulnerability detection
  • ✅ Gas optimization analysis
  • ✅ Standards compliance checking
  • ✅ Configurable failure thresholds
  • ✅ CI/CD ready
  • ✅ Beautiful terminal output
  • ✅ Pre-deployment hooks

Support

  • 📧 Email: [email protected]
  • 📚 Documentation: https://web3sentinel.org/docs
  • 📱 Telegram: @sopdap
  • 🐛 Issues: https://github.com/SopeDapo/hardhat-web3sentinel/issues

License

MIT © Web3Sentinel