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

Add simple json report generation #195

Open
wants to merge 55 commits into
base: master
Choose a base branch
from

Conversation

tuturu-tech
Copy link

@tuturu-tech tuturu-tech commented Aug 4, 2023

Added very simple json report generation (only lines found/covered)

Issues:

  • Error var is overridden, looking for guidance on how best to handle this
  • html path is modified in order to replace the file name, looking for guidance here as well
  • Currently not generating branches/functions coverage

@montyly
Copy link
Member

montyly commented Aug 4, 2023

@tuturu-tech can you fix the issues reported by golangci-lint?

You can look at https://github.com/crytic/medusa/blob/01c8d9efc40ac13ae937a7cef3f1999290dca7b7/CONTRIBUTING.md#linters to see how to install and run it

@tuturu-tech tuturu-tech marked this pull request as ready for review August 4, 2023 16:20
Xenomega and others added 21 commits July 8, 2024 18:25
* Updated CallMessage to be compliant with core.Message made in new go-ethereum

---------

Co-authored-by: anishnaik <[email protected]>
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.12.0 to 0.14.0.
- [Commits](golang/net@v0.12.0...v0.14.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Introduce `console.log` functionality with string formatting capabilities.

---------

Co-authored-by: David Pokora <[email protected]>
* Added denomination parsing to AST constant mining
* Added tests for AST value extraction, removed print from experimental code

---------

Co-authored-by: anishnaik <[email protected]>
* Console output with optional coloring

* optional Colorize

* LF and CRLF line endings

* update no-color flag description

* code review changes

---------

Authored-by: Exca-DK <[email protected]>
Bumps [github.com/rs/zerolog](https://github.com/rs/zerolog) from 1.29.0 to 1.30.0.
- [Release notes](https://github.com/rs/zerolog/releases)
- [Commits](rs/zerolog@v1.29.0...v1.30.0)

---
updated-dependencies:
- dependency-name: github.com/rs/zerolog
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: David Pokora <[email protected]>
Co-authored-by: anishnaik <[email protected]>
Bumps [github.com/google/uuid](https://github.com/google/uuid) from 1.3.0 to 1.3.1.
- [Release notes](https://github.com/google/uuid/releases)
- [Changelog](https://github.com/google/uuid/blob/master/CHANGELOG.md)
- [Commits](google/uuid@v1.3.0...v1.3.1)

---
updated-dependencies:
- dependency-name: github.com/google/uuid
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: anishnaik <[email protected]>
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.12.0 to 0.13.0.
- [Commits](golang/crypto@v0.12.0...v0.13.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: anishnaik <[email protected]>
Bumps [github.com/rs/zerolog](https://github.com/rs/zerolog) from 1.30.0 to 1.31.0.
- [Release notes](https://github.com/rs/zerolog/releases)
- [Commits](rs/zerolog@v1.30.0...v1.31.0)

---
updated-dependencies:
- dependency-name: github.com/rs/zerolog
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: anishnaik <[email protected]>
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.13.0 to 0.14.0.
- [Commits](golang/crypto@v0.13.0...v0.14.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: anishnaik <[email protected]>
* fix warp cheatcode

* revert if warp input value is greater than type(uint64).max

* Make max uint64 a global value
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](spf13/cobra@v1.7.0...v1.8.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: David Pokora <[email protected]>
dependabot bot and others added 30 commits July 8, 2024 18:28
Bumps [github.com/google/uuid](https://github.com/google/uuid) from 1.3.1 to 1.6.0.
- [Release notes](https://github.com/google/uuid/releases)
- [Changelog](https://github.com/google/uuid/blob/master/CHANGELOG.md)
- [Commits](google/uuid@v1.3.1...v1.6.0)

---
updated-dependencies:
- dependency-name: github.com/google/uuid
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.14.0 to 0.21.0.
- [Commits](golang/net@v0.14.0...v0.21.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: David Pokora <[email protected]>
…prove UX, allow for contracts to have starting balances, and fix coverage panic (#216)

* - merged all three testing modes
- created testing provider utils file to evaluate whether an abi.method is an optimization / property test
- updated fuzzer tests
- made default property test prefix "invariant_"

* enable all testing modes, update fuzzer tests

* add verification for config

* improve config-related errors

* update deploymentOrder to targetContracts

* update edge case where coverage is 0/0 lines

* add support for payable constructors

* linting

* fix bug

* fix panic and improve return data printing in execution trace

* encode bytes and byteX as hex strings

* fix console

* updates from PR review

* change config language
…e up errors with exit codes from cmd, organized exit code definitions into one package (#301)

Co-authored-by: anishnaik <[email protected]>
* * Fixed a corpus call method resolution bug.
* Deprecated "methodName" in corpus (lack of support for function overloading). To be removed later, in favor of new "methodSignature" key.
* Improved fuzzer initialization logging
* Print basic metrics for corpus health on startup
* Reorder printing to avoid "Creating X workers" message after "fuzz: elapsed[...]" message.

* Update corpus health log for readability

---------

Co-authored-by: anishnaik <[email protected]>
* Add shrinking limits, improve "call removal" logic, fixed a bug where corpus results could re-record if replayed/reshrunk differently

* Removed comment indicating shrinkLimit must be greater than zero (untrue)

* Re-order unexecuted sequences so test result corpus items are replayed first

* change where shrinkIncrement is updated

---------

Co-authored-by: Anish Naik <[email protected]>
* fix: use signature in traces to handle overloaded function names

* fix test

---------

Co-authored-by: anishnaik <[email protected]>
* feat: add execution trace for failed target contract deployments

* fix bugs in logging and improve trace output to console

---------

Co-authored-by: anishnaik <[email protected]>
* Output error message if there was one

* Slight cleanup/refactor

* Updated exit code and error return so error messages are only printed if there is an error (despite exiting with a special exit code)

* proposed changed to prevent double logging/printing of fuzzer errors

* change name of exit code

* fix bug

---------

Co-authored-by: anishnaik <[email protected]>
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.19.0 to 0.22.0.
- [Commits](golang/crypto@v0.19.0...v0.22.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps google.golang.org/protobuf from 1.28.1 to 1.33.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: anishnaik <[email protected]>
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.4 to 1.9.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](stretchr/testify@v1.8.4...v1.9.0)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: anishnaik <[email protected]>
* add M1 mac arch build and test

* Update .github/workflows/ci.yml

Co-authored-by: Emilio López <[email protected]>

* Update .github/workflows/ci.yml

Co-authored-by: Emilio López <[email protected]>

* ci: automate release creation when pushing a tag

* ci: upgrade actions/setup-{node,go}

* ci: fix Python dependency installation on macOS

  error: externally-managed-environment

  × This environment is externally managed
  ╰─> To install Python packages system-wide, try brew install
      xyz, where xyz is the package you are trying to
      install.

      If you wish to install a non-brew-packaged Python package,
      create a virtual environment using python3 -m venv path/to/venv.
      Then use path/to/venv/bin/python and path/to/venv/bin/pip.

      If you wish to install a non-brew packaged Python application,
      it may be easiest to use pipx install xyz, which will manage a
      virtual environment for you. Make sure you have pipx installed.

  note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

* ci: use `alls-green` to decide success status

`release` can be skipped, but GitHub will then skip `all-checks`.
We need to check that `release` is successful when it runs, but ignore
it when it is skipped.

---------

Co-authored-by: Anish Naik <[email protected]>
* Migrate to mdbook (#223)

Co-authored-by: Zach McManus <[email protected]>
Co-authored-by: Damilola Edwards <[email protected]>
…them (#363)

* feat: call constant methods ocassionally and allow assertion testing them

* add test
* fix: re-encode calldata in mutator and refactor

* panic on misuse
* fix: excluding compilation platform fallsback to default

* warn if coverage is disabled

---------

Co-authored-by: anishnaik <[email protected]>
* feat: display test cases discovered by the fuzzer

* check whether optimization test case has started
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.

10 participants