Skip to content

Commit

Permalink
Add 'Testing Stacy' to README (#18)
Browse files Browse the repository at this point in the history
Fixed 2 detectors and updated the README on how to test Stacy.


---------

Co-authored-by: Facundo Lerena <[email protected]>
  • Loading branch information
NinaTea and faculerena authored Jul 12, 2024
1 parent be22867 commit 8af3bd2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,17 @@ Severities are based on worst case scenarios and the detector's finding may vary
You can find our contribution guidelines [here](https://github.com/CoinFabrik/stacy/tree/main/docs/contribution_guidelines/contribute.md)


## Testing Stacy

You can run Stacy over all the test contracts by running the following command:

```shell
stacy-analyzer lint tests
```

It will recursively search for all the `.clar` files in the `tests` directory and run Stacy over them. With this command, you won't need to specify the path to each smart contract.
This should print the errors in the vulnerable examples, and nothing in the remediated ones!

## About CoinFabrik

We - [CoinFabrik](https://www.coinfabrik.com/) - are a research and development company specialized in Web3, with a strong background in cybersecurity. Founded in 2014, we have worked on over 180 blockchain-related projects, EVM based and also for Solana, Algorand, and Polkadot. Beyond development, we offer security audits through a dedicated in-house team of senior cybersecurity professionals, currently working on code in Substrate, Solidity, Clarity, Rust, and TEAL.
Expand Down
2 changes: 2 additions & 0 deletions src/stacy_analyzer/detectors/UnusedArguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ def visit_node(self, node: Node, i):
self.HELP = None
self.FOOTNOTE = f"Consider removing '{k}' since its not used inside the function."
self.add_finding(v, v)

self.arguments = {}
2 changes: 2 additions & 0 deletions src/stacy_analyzer/detectors/UnusedLetVariables.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ def visit_node(self, node: Node, i):
self.FOOTNOTE = f"Consider removing '{k}' from let function since its not used."
self.add_finding(v, v)

self.arguments = {}

0 comments on commit 8af3bd2

Please sign in to comment.