Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitLabGitLab/dannydoodlesstory/evm-audit-helpers
Static AnalysisVulnerability AnalysisCode AnalysisDevSecOpsLearning & EducationCurated Resources
GitLabdannydoodlesstory/evm-audit-helpers

evm-audit-helpers

Collection of Solidity snippets and Foundry scripts for smart contract security audits

View Repository
372 months agoNot yet reviewed
Share

evm-audit-helpers

GitHub license
GitHub stars
Foundry version
Build Status


Overview

evm-audit-helpers is a curated collection of Solidity snippets, Foundry scripts, and test templates designed to accelerate EVM smart‑contract security audits. The repository bundles reusable building blocks for common audit concerns such as reentrancy, storage layout mismatches, and gas‑optimisation pitfalls, allowing auditors and developers to focus on logic rather than boiler‑plate.

Key goals:

  • Speed up audit preparation with ready‑made checks and patterns.
  • Ensure consistency across audit reports by providing standard test suites.
  • Facilitate learning through well‑documented examples and best‑practice guidelines.

Features

CategoryDescriptionPrimary Files
Reentrancy CheckersHelper modifiers, nonReentrant patterns, and runtime detection scripts.src/helpers/Reentrancy.sol, scripts/reentrancy_check.sol
Storage Layout AnalyzerUtilities to compare storage slots, generate layout diagrams, and detect unsafe upgrades.src/helpers/StorageLayout.sol, scripts/storage_analyzer.sol
Foundry Test TemplatesBoilerplate test suites covering common vulnerabilities (access control, arithmetic, delegatecall, etc.).test/templates/*
Gas & Opcode AuditsScripts to profile gas usage and flag expensive opcodes.scripts/gas_profiler.sol
Reporting HelpersJSON/Markdown reporters that can be piped into CI dashboards.scripts/report_generator.sol
CI IntegrationExample GitHub Actions workflow for automated audit runs..github/workflows/ci.yml

All helpers are written for Solidity ^0.8.20 and are compatible with Foundry (forge, cast).


Quickstart

# 1️⃣ Clone the repository
git clone https://github.com/your-org/evm-audit-helpers.git
cd evm-audit-helpers

# 2️⃣ Install Foundry (if not already installed)
curl -L https://foundry.paradigm.xyz | bash
foundryup

# 3️⃣ Install dependencies
forge install

# 4️⃣ Run the default test suite (includes reentrancy, storage, and gas checks)
forge test

Tip: Add export FOUNDRY_PROFILE=ci to your shell to use the CI‑optimised compiler settings.


Usage

1. Reentrancy Checks

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import "evm-audit-helpers/src/helpers/Reentrancy.sol";

contract MyVault is ReentrancyGuard {
    mapping(address => uint256) private balances;

    function deposit() external payable nonReentrant {
        balances[msg.sender] += msg.value;
    }

    function withdraw(uint256 amount) external nonReentrant {
        require(balances[msg.sender] >= amount, "Insufficient");
        balances[msg.sender] -= amount;
        (bool ok,) = msg.sender.call{value: amount}("");
        require(ok, "Transfer failed");
    }
}

Run the runtime detector on a compiled contract:

forge script scripts/reentrancy_check.sol:ReentrancyChecker --rpc-url $RPC_URL --broadcast

2. Storage Layout Analysis

# Generate a JSON description of a compiled contract's storage layout
cast abi-storage --contract MyUpgradeable.sol:MyUpgradeable > storage.json

# Compare against a reference layout (e.g., from a previous version)
forge script scripts/storage_analyzer.sol:StorageComparator \
    --sig "compare(string memory, string memory)" storage.json reference.json

The script will output mismatched slots, potential shadowing, and suggestions for @custom:oz-upgrades-unsafe-allow annotations.

3. Foundry Test Templates

Copy a template into your audit repo:

cp -r test/templates/reentrancy/ my-audit/tests/

Edit MyContract.t.sol to import the contract under audit and run:

forge test --match-contract MyContract

4. CI Integration

Add the provided workflow to your repository:

# .github/workflows/audit.yml
name: EVM Audit

on:
  push:
    branches: [main]
  pull_request:

jobs:
  audit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Install Foundry
        run: curl -L https://foundry.paradigm.xyz | bash && foundryup
      - name: Run Audit Suite
        run: |
          forge install
          forge test -vv
          forge script scripts/reentrancy_check.sol:ReentrancyChecker --rpc-url ${{ secrets.RPC_URL }}
          forge script scripts/storage_analyzer.sol:StorageComparator --sig "compare(string,string)" storage.json reference.json

The workflow will automatically flag failures and publish a markdown report as a PR comment.


Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository and create a feature branch (git checkout -b feat/<name>).
  2. Write tests for any new helper or bug‑fix. All new code must have 100 % coverage (forge coverage).
  3. Run the linting suite (npm run lint – uses solhint and prettier).
  4. Submit a Pull Request with a clear description, reference to an issue (if applicable), and a brief audit‑use‑case example.

Code Style

  • Solidity: pragma solidity ^0.8.20;
  • Use snake_case for internal functions, camelCase for public/external.
  • Document every public contract/interface with NatSpec (///).

Development Environment

# Install linting tools
npm install

# Run solhint
npx solhint 'src/**/*.sol' 'test/**/*.sol'

# Auto‑format
npx prettier --write '**/*.sol'

License

evm-audit-helpers is licensed under the MIT License. See the LICENSE file for details.


Happy auditing!

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    867
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    544
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    385
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    360
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    302
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    279

Explore all tools

Browse our collection of tools

View all tools →