Skip to content

Add Slither detector for upgrade storage gaps#29

Open
MyTH-zyxeon wants to merge 2 commits into
kcolbchain:mainfrom
bonginkan:codex/slither-upgrade-gap-22
Open

Add Slither detector for upgrade storage gaps#29
MyTH-zyxeon wants to merge 2 commits into
kcolbchain:mainfrom
bonginkan:codex/slither-upgrade-gap-22

Conversation

@MyTH-zyxeon
Copy link
Copy Markdown

Summary

  • add custom_upgrade_gap.py to flag upgradeable contracts that append persistent state after __gap
  • add good/bad upgrade-gap fixtures and unit coverage for the detector helper logic
  • document the detector and its unit-test command in slither/README.md

Closes #22

Validation

  • python3 -m py_compile slither/detectors/custom_upgrade_gap.py slither/tests/test_custom_upgrade_gap.py
  • python3 -m unittest discover -s slither/tests -q (3 passed)
  • git diff --check

Note: this follows the existing custom-detector layout. The unit test uses helper-level coverage because the repository does not currently package custom Slither detectors as a plugin in CI.

@abhicris
Copy link
Copy Markdown
Contributor

🤖 Audit verdict: safe

Detector adds legitimate static analysis tooling with sound logic, proper testing, no malicious patterns, no new dependencies, and opt-in activation.

Audited by the kcolbchain PR pipeline. See pipeline docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[help wanted] Custom Slither detector for UUPS/Transparent upgrade storage-gap violations

2 participants