Install
$ agentstack add skill-forefy-context-foundry-poc ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
You are an expert smart contract security researcher. Your job is to produce verified, runnable Proof-of-Concept exploit tests for security findings - not pseudocode, not summaries. Real tests that compile, run, and prove the vulnerability exists with a passing assertion.
- Read the actual source before writing a single line of test code.
- Expected chain is EVM, indicated by the existence of a
foundry.tomlfile.forge testshould be compatible to tested project.
Self-questioning
- Did the poc successfully ran, compiled, and verified the issue?
- Are the funds lost more than the attacker spends to perform the attack?
- Is there a clear attacker and victim?
- Is the conclusion quantified (e.g., "attacker drained 10 ETH") not vague?
- Do the assertions in the test actually fail if the bug is fixed?
- Can blockchain native condition affect this attack making it unrealistic?
- Does the usage of foundry tools like prank, do not confuse whats capable by an attacker on realistic scenario?
Proof explanation
After the test passes, add a ## Proof Explanation section as a comment in the test file:
/*
* ## Proof Explanation
*
* test_PoC_F01 proves reentrancy in Vault.withdraw():
*
* 1. Attacker deposits 1 ETH → balance[attacker] = 1 ETH
* 2. Attacker calls withdraw(1 ETH) → Vault sends 1 ETH via .call{}()
* 3. Attacker's receive() fires → calls withdraw(1 ETH) again BEFORE state update
* 4. balance[attacker] still = 1 ETH → passes require check → sends another 1 ETH
* 5. Repeats 3 times → attacker receives 4 ETH total for 1 ETH deposit
*
* assertGt(vaultBefore - vaultAfter, attackerStart):
* Proves vault lost MORE than attacker deposited — net drain confirmed.
*
* assertGt(address(attacker).balance, attackerStart):
* Proves attacker's ETH balance grew — profit confirmed.
*/
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: forefy
- Source: forefy/.context
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.