Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin Slither to specific version #63

Closed
wants to merge 4 commits into from
Closed

Pin Slither to specific version #63

wants to merge 4 commits into from

Conversation

michaelkaplan13
Copy link
Collaborator

Why this should be merged

Slither CI workflow is currently failing with error:

[-] Installing dependencies from foundry.toml
Updating dependencies in /github/workspace/contracts/lib
[-] SARIF output enabled, writing to results.sarif.
[-] Slither config provided: contracts/slither.config.json
'forge clean' running (wd: /github/workspace/contracts)
Traceback (most recent call last):
  File "/opt/slither/bin/slither", line 8, in <module>
    sys.exit(main())
  File "/opt/slither/lib/python3.9/site-packages/slither/__main__.py", line 727, in main
    main_impl(all_detector_classes=detectors, all_printer_classes=printers)
  File "/opt/slither/lib/python3.9/site-packages/slither/__main__.py", line 833, in main_impl
    ) = process_all(filename, args, detector_classes, printer_classes)
  File "/opt/slither/lib/python3.9/site-packages/slither/__main__.py", line 96, in process_all
    compilations = compile_all(target, **vars(args))
  File "/opt/slither/lib/python3.9/site-packages/crytic_compile/crytic_compile.py", line 718, in compile_all
    compilations.append(CryticCompile(target, **kwargs))
  File "/opt/slither/lib/python3.9/site-packages/crytic_compile/crytic_compile.py", line 207, in __init__
    self._compile(**kwargs)
  File "/opt/slither/lib/python3.9/site-packages/crytic_compile/crytic_compile.py", line 629, in _compile
    self._platform.compile(self, **kwargs)
  File "/opt/slither/lib/python3.9/site-packages/crytic_compile/platform/foundry.py", line 66, in compile
    foundry_config = self.config(str(crytic_compile.working_dir.absolute()))
  File "/opt/slither/lib/python3.9/site-packages/crytic_compile/platform/foundry.py", line 137, in config
    with open("foundry.toml", "r", encoding="utf-8") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'foundry.toml'

How this works

Pins Slither to version 0.9.6 for now. Uses the "fail-on" Slither setting rather than "continue-on-error" to make the error message more apparent when the step fails.

How this was tested

CI

How is this documented

N/A

@michaelkaplan13
Copy link
Collaborator Author

Closing in favor of #70

@michaelkaplan13 michaelkaplan13 deleted the fix-slither branch November 15, 2023 16:45
minghinmatthewlam pushed a commit that referenced this pull request Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant