This repository has been archived by the owner on Jan 25, 2022. It is now read-only.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rocky
force-pushed
the
separate-mythx-artifacts
branch
2 times, most recently
from
March 2, 2019 22:28
ad0c936
to
4c58f40
Compare
and "sources" fields
even though MythX doesn't support it right now
that is MythX API friendly.
* Rename contracts to basenames * change config.build_mythx_snapshots to config.build_mythx_contracts
- reduce solc output selection - Handle imports by returning multiple sources and contracts in a file
* move normalizeJsonObject to truffle-compile * move bytecode cleaning to truffle-compile
Now it stores details of imported files as well
rocky
force-pushed
the
separate-mythx-artifacts
branch
from
March 3, 2019 21:21
4c58f40
to
deb0eb7
Compare
Output "Writing artifacts" message only once
See: console.log("FIXME: danyiar"); for what remains.
sourceMap fixup: adjust non-zero file entries when sending only a single source. Note: this is temporary until we have something better worked out. Don't recompile where we don't ahve to. Don't print writing artifacts when we haven't recompiled. To do this we pass back the stale status.
Addresses this error when run on AragonOS: MythX Logs: TypeError: Cannot read property 'level' of undefined at logs.forEach.log (/src/external-vcs/github/consensys/truffle-security/helpers.js:361:38) at Array.forEach (<anonymous>) at doReport (/src/external-vcs/github/consensys/truffle-security/helpers.js:360:14) at Object.analyze (/src/external-vcs/github/consensys/truffle-security/helpers.js:492:5) at process._tickCallback (internal/process/next_tick.js:68:7) There is probably some fancier way to address this in the reduce above, but I like simple and stupid.
* Adjust test_mythx.js test. * turn a commented-out test into a pending test
…into display_logs
Display logs
* add tests for zeroedSourceMap * add tests for newTruffleObjToOldTruffleByContracts
Wrong variable name is a remnant from older code.
daniyarchambylov
changed the title
WIP - Separate mythx artifacts
Separate mythx artifacts
Mar 6, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is not finished, but it seems to be a first step and (mostly?) works. It is important to get this out for people to get a sense of what's up.
We have modified truffle artifact directory
build/contracts
to save additional information per contract to assist MythX analysis.This puts artifacts in
build/mythx/contracts
which is likebuild/contracts
but each contract has:sourceList[]
- a list of the sources that can be used in a sourceMap.sources
- a dict whose key is an entry of sourceList and whose value containssource
: stringast
: astlegacyAst
: ast