skills/vulnerability-patterns/dos-gas-limit/SKILL.md
- Contract iterates over a dynamic array or mapping whose size can grow unboundedly
npx skillsauth add apegurus/solidity-argus dos-gas-limitInstall 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.
address[] public recipients;
function addRecipient(address r) external {
recipients.push(r); // Array grows without bound
}
// Push-payment: one tx must process all recipients
function distributeRewards() external {
for (uint256 i = 0; i < recipients.length; i++) {
// When recipients.length grows large enough,
// this loop exceeds block gas limit and ALWAYS reverts
payable(recipients[i]).transfer(reward);
}
}
for, while) in the codebasestartIndex, batchSize parameters) — if not, flag ituint256[10], array with a capped maxLength)startIndex and batchSize parameters// Pull-payment pattern
mapping(address => uint256) public pendingWithdrawals;
function claimReward() external {
uint256 amount = pendingWithdrawals[msg.sender];
pendingWithdrawals[msg.sender] = 0;
payable(msg.sender).transfer(amount);
}
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.