skills/vulnerability-patterns/incorrect-inheritance-order/SKILL.md
- Contract uses multiple inheritance (`is ContractA, ContractB, ...`)
npx skillsauth add apegurus/solidity-argus incorrect-inheritance-orderInstall 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.
is ContractA, ContractB, ...)contract Ownable {
function owner() public view virtual returns (address) {
return _owner; // Returns EOA owner
}
}
contract Governance {
function owner() public view virtual returns (address) {
return governance; // Returns governance contract
}
}
// C3 linearization: rightmost (Ownable) takes precedence
// Developer intended Governance.owner() but gets Ownable.owner()
contract Treasury is Governance, Ownable {
// owner() resolves to Ownable (rightmost) — may not be intended
// Should be: is Ownable, Governance (if Governance should win)
}
is A, B, C)override specifiers: override(A, B) should explicitly list which parents are being overriddenoverride(A, B) and provides its own implementationoverride(ContractA, ContractB)// Correct: general-to-specific order
contract Treasury is Ownable, Governance {
function owner() public view override(Ownable, Governance) returns (address) {
return Governance.owner(); // Explicit resolution
}
}
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.