vuln-web3-access

Detect access control and upgradeability vulnerabilities in Solidity smart contracts.

Updated Jun 23, 2024
One-click install
npx skills add https://github.com/n4igme/randscript --skill vuln-web3-access
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vuln-web3-access
Source: https://github.com/n4igme/randscript/tree/main/llm/skills/scode/vuln-web3-access
Command: npx skills add https://github.com/n4igme/randscript --skill vuln-web3-access

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps security teams automatically identify access control flaws and unsafe upgrade patterns in smart contracts, reducing manual review time and improving audit quality.

Core Features & Use Cases

  • Missing Access Modifiers: flags functions without proper access control modifiers like onlyOwner or onlyRole.
  • tx.origin Authentication: detects usage of tx.origin in authentication logic that can be spoofed.
  • Unprotected Initializers: finds initialize functions that could be called by anyone or lack proper initialization guards.
  • Proxy Storage & Upgrade Risks: checks for storage-slot conflicts and improper upgrade patterns that enable takeover.
  • Upgrade Authorization & Roles: assesses who can upgrade and whether admin roles are securely managed.
  • Audit Process Guidance: provides steps to map findings to vulnerability reports and remediation suggestions.
  • Output: appends results to ./assessment/vulnerabilities.md.

Quick Start

Provide threat-model and recon data, then run the scanner to append findings to ./assessment/vulnerabilities.md.

Frequently Asked Questions about vuln-web3-access

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scan Solidity smart contracts for access control vulnerabilities?

To scan Solidity smart contracts for access control vulnerabilities, provide threat-model and recon data to the scanner. It identifies missing modifiers, tx.origin usage, and unprotected initializers, then appends findings to ./assessment/vulnerabilities.md.

What are common upgradeability and proxy storage risks in smart contracts?

Common upgradeability and proxy storage risks include storage-slot conflicts and improper upgrade patterns that enable takeover. The scanner detects these flaws by assessing proxy storage layouts and checking if upgrade authorization and admin roles are securely managed.

Can I use this scanner for bug bounty and security audit workflows?

Yes, you can use this scanner for bug bounty and security audit workflows. It applies to Solidity projects across these workflows by parsing threat-model inputs, detecting unsafe access control patterns, and guiding the mapping of findings to vulnerability reports.

How do I detect missing onlyOwner modifiers and unprotected initializers in Solidity?

To detect missing onlyOwner modifiers and unprotected initializers in Solidity, the scanner parses smart contract code for functions lacking proper access control and initialize functions callable by anyone without initialization guards.

What input data is needed to run a smart contract vulnerability assessment?

Running a smart contract vulnerability assessment requires threat-model and recon data as input. The scanner uses this data to identify access control flaws and unsafe upgrade patterns, writing the results directly to ./assessment/vulnerabilities.md.

Why does using tx.origin for authentication create a vulnerability in smart contracts?

Using tx.origin for authentication creates a vulnerability because it can be spoofed by intermediary contracts. The scanner detects tx.origin usage in authentication logic to flag this access control weakness during security audits.