All storage is publicly visible on the blockchain, even private variables.
According to Solidity documentation, statically-sized variables (everything except mapping and dynamically-sized array types) are laid out contiguously in storage starting from position 0. Multiple items that need less than 32 bytes are packed into a single storage slot if possible.
Anyone can read the password and the account associated with it. Which violates the whole idea of a password magagement system.
Setup an ape environment using ape init.
Setup conftest.py like this
Setup the test file like this
Run it using ape test tests/bug_tests.py.
The approach is same.
Run forge test --match-path test/PasswordStore.t.sol -vvvvv
Manual Review, ApeWorX, Foundry.
Never store passwords and private keys without hashing them first.
https://medium.com/coinmonks/ethernaut-lvl-12-privacy-walkthrough-how-ethereum-optimizes-storage-to-save-space-and-be-less-c9b01ec6adb6
Private functions and state variables are only visible for the contract they are defined in and not in derived contracts. In this case private doesn't mean secret/confidential
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.