Merge pull request #2436 from crytic/dev-slither-plugin

Restore plugin example to working state
pull/2439/head
alpharush 7 months ago committed by GitHub
commit 7f82f4ad0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      plugin_example/setup.py
  2. 0
      plugin_example/slither_my_plugin/detectors/__init__.py
  3. 10
      plugin_example/slither_my_plugin/detectors/example.py

@ -1,14 +1,14 @@
from setuptools import setup, find_packages from setuptools import setup, find_packages
setup( setup(
name="slither-my-plugins", name="slither_my_plugin",
description="This is an example of detectors and printers to Slither.", description="This is an example of detectors and printers to Slither.",
url="https://github.com/trailofbits/slither-plugins", url="https://github.com/trailofbits/slither-plugins",
author="Trail of Bits", author="Trail of Bits",
version="0.0", version="0.0",
packages=find_packages(), packages=find_packages(),
python_requires=">=3.8", python_requires=">=3.8",
install_requires=["slither-analyzer==0.1"], install_requires=["slither-analyzer>=0.6.0"],
entry_points={ entry_points={
"slither_analyzer.plugin": "slither my-plugin=slither_my_plugin:make_plugin", "slither_analyzer.plugin": "slither my-plugin=slither_my_plugin:make_plugin",
}, },

@ -11,12 +11,12 @@ class Example(AbstractDetector): # pylint: disable=too-few-public-methods
IMPACT = DetectorClassification.HIGH IMPACT = DetectorClassification.HIGH
CONFIDENCE = DetectorClassification.HIGH CONFIDENCE = DetectorClassification.HIGH
WIKI = "" WIKI = "https://www.example.com/#example-detector"
WIKI_TITLE = "" WIKI_TITLE = "example detector"
WIKI_DESCRIPTION = "" WIKI_DESCRIPTION = "This is an example detector that always generates a finding"
WIKI_EXPLOIT_SCENARIO = "" WIKI_EXPLOIT_SCENARIO = "Scenario goes here"
WIKI_RECOMMENDATION = "" WIKI_RECOMMENDATION = "Customize the detector"
def _detect(self): def _detect(self):

Loading…
Cancel
Save