skills/vulnerability-patterns/unencrypted-private-data-on-chain/SKILL.md
- Sensitive data (passwords, secrets, private keys, game answers) is stored in contract storage
npx skillsauth add apegurus/solidity-argus unencrypted-private-data-on-chainInstall 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.
private visibility modifier for confidentialitycontract SecretGame {
// `private` only prevents OTHER CONTRACTS from reading
// Anyone can read this via eth_getStorageAt(address, slot)
bytes32 private secretAnswer;
string private password;
constructor(bytes32 _answer, string memory _pwd) {
secretAnswer = _answer; // Visible in deployment tx calldata
password = _pwd; // Readable from storage slot
}
function guess(bytes32 _guess) external {
// Attacker reads secretAnswer from storage first
require(_guess == secretAnswer, "wrong");
_reward(msg.sender);
}
}
private variable is relied upon for confidentiality (not just access control)private modifier is used correctly for access control between contracts, not for data confidentialitykeccak256(secret || salt) first, reveal later// Commit-reveal scheme
mapping(address => bytes32) public commitments;
function commit(bytes32 hash) external {
// User submits keccak256(answer, salt) — answer stays private
commitments[msg.sender] = hash;
}
function reveal(bytes32 answer, bytes32 salt) external {
require(commitments[msg.sender] == keccak256(abi.encodePacked(answer, salt)));
_processAnswer(msg.sender, answer);
}
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.