skills/vulnerability-patterns/incorrect-constructor/SKILL.md
- Solidity version <0.4.22 where constructors are named functions matching the contract name
npx skillsauth add apegurus/solidity-argus incorrect-constructorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
// Solidity <0.4.22: constructor is a named function
contract Owned {
address public owner;
// Typo: "owned" != "Owned" (case mismatch)
// This becomes a regular public function anyone can call
function owned() public {
owner = msg.sender;
}
}
// Contract renamed but constructor not updated
contract Treasury {
address public owner;
// Was "Wallet" before rename — now a regular public function
function Wallet() public {
owner = msg.sender;
}
}
constructor keyword is used, this vulnerability does not applyowner or perform one-time initialization — these may be misnamed constructorsconstructor keyword (enforced by compiler)constructor keyword// Modern Solidity: compiler-enforced constructor
contract Owned {
address public owner;
constructor() {
owner = msg.sender;
}
}
testing
Specialist profile for mechanically applying the attack-vector deck and classifying vectors as skip, drop, or investigate.
tools
Specialist profile for libraries, helpers, base contracts, adapters, encoders, wrappers, and integration glue.
testing
Specialist profile for rounding, scale, decimal, downcast, and arithmetic accounting edge cases.
testing
Specialist profile for extracting conservation laws and state couplings, then searching for violating paths.