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

Triage mode's slither.db.json not shareable #324

Open
RyanRHall opened this issue Aug 27, 2019 · 4 comments
Open

Triage mode's slither.db.json not shareable #324

RyanRHall opened this issue Aug 27, 2019 · 4 comments
Labels
enhancement New feature or request

Comments

@RyanRHall
Copy link

Triage mode cannot be used by teams to universally ignore warnings because the constructed file, slither.db.json, records the absolute file path of a contract (filename_absolute), which may not be identical on different machines.

Example:

Alice has contracts in folder:
/home/Alice/project/contracts

she uses triage mode to ignore warnings and creates a slither.db.json

Bob tries to use slither but wants to ignore the warnings that Alice has already hid. Bob has contracts in folder:
/home/Bob/project/contracts

Bob runs slither but slither shows all the warnings that Alice hid.

@montyly montyly added the enhancement New feature or request label Aug 27, 2019
@montyly
Copy link
Member

montyly commented Aug 27, 2019

Hi @RyanRHall ,

Thank you for reporting the issue and for the detailed description.

We are going to investigate how to better triage results from different machines.

@RyanRHall
Copy link
Author

@montyly this may actually be a non-issue. Turns out one of the machines I was working with was running an older version of slither. I assumed the issue must have been with the file paths in the the db.json. I guess those are not actually used when running slither? Sorry for the confusion!

@moodysalem
Copy link

i ran into this issue and thought the same thing was the problem (file paths), imo slither should remember results across versions for the same detectors. is it possible to make the db more lightweight/compatible across versions?

@montyly montyly reopened this Oct 26, 2020
@montyly
Copy link
Member

montyly commented Oct 26, 2020

Hi @moodysalem.
Do you have an example to reproduce this behavior?

Slither should be able to filter on different paths, if not there is a bug somewhere.

For example, this works:

$ cat a/test.sol
contract C{
    uint A;
}
$ cp a/test.sol b/test.sol
$ cd a
$ slither test.sol --triage
# add all the results
$ cd ..
$ cp a/slither.db.json .
$ cp a/slither.db.json b/

Now running with cd a; slither test.sol, cd b; slither test.sol, slither a/test.sol, or slither b/test.sol, with all hide the triaged results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants