Skip to content

Commit

Permalink
Merge pull request #211 from CoinFabrik/doc/update-readme
Browse files Browse the repository at this point in the history
modified repo readme file
  • Loading branch information
matiascabello authored May 3, 2024
2 parents 383f960 + a563782 commit f78a675
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 13 deletions.
59 changes: 46 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,20 @@ Afterwards, install Scout with the following command:
cargo install cargo-scout-audit
```

To run Scout on your project, navigate to its root directory and execute the following command:
To run Scout on your project, navigate to the root directory of your smart contract (where the `Cargo.toml` file is) and execute the following command:

```bash
cargo scout-audit
```

For more information on installation and usage, please refer to the [Getting Started](https://coinfabrik.github.io/scout-soroban/docs/intro) section in our documentation below.

# Documentation

- [Getting Started](https://coinfabrik.github.io/scout-soroban/docs/intro)
- [Vulnerabilities](https://coinfabrik.github.io/scout-soroban/docs/vulnerabilities)
- [Detectors](https://coinfabrik.github.io/scout-soroban/docs/detectors)
- [Contribute](https://coinfabrik.github.io/scout-soroban/docs/contribute)
- [Architecture](https://coinfabrik.github.io/scout-soroban/docs/architecture)
- [Blog](https://blog.coinfabrik.com/)
:warning: Make sure that your smart contracts compile properly. Scout won't run if any compilation errors exist.

Visit [Scout's website](https://coinfabrik.github.io/scout-soroban/) to view the full documentation.
For more information on installation and usage, please refer to the [Getting Started](https://coinfabrik.github.io/scout-soroban/docs/intro) section in our documentation below.

## Detectors

Currently Scout includes the following detectors.

| Detector ID | What it Detects | Test Cases | Severity |
| ------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
| [divide-before-multiply](https://github.com/CoinFabrik/scout-soroban/tree/main/detectors/divide-before-multiply) | Performing a division operation before a multiplication, leading to loss of precision. | [1](https://github.com/CoinFabrik/scout-soroban/tree/main/test-cases/divide-before-multiply/divide-before-multiply-1), [2](https://github.com/CoinFabrik/scout-soroban/tree/main/test-cases/divide-before-multiply/divide-before-multiply-2), [3](https://github.com/CoinFabrik/scout-soroban/tree/main/test-cases/divide-before-multiply/divide-before-multiply-3) | Medium |
Expand All @@ -70,6 +63,37 @@ Visit [Scout's website](https://coinfabrik.github.io/scout-soroban/) to view the
| [unsafe-map-get](https://github.com/CoinFabrik/scout-soroban/tree/main/detectors/unsafe-map-get) | Inappropriate usage of the `get` method for `Map` in soroban | [1](https://github.com/CoinFabrik/scout-soroban/tree/main/test-cases/unsafe-map-get/unsafe-map-get-1) | Medium |
| [zero-or-test-address](https://github.com/CoinFabrik/scout-soroban/tree/main/detectors/zero-or-test-address) | Avoid zero or test address assignment to prevent contract control loss. | [1](https://github.com/CoinFabrik/scout-soroban/tree/main/test-cases/zero-or-test-address/zero-or-test-address-1) | Validations and error handling |

## Output formats

You can choose the output format that best suit your needs (html or markdown). To specify the desired output run the following command:

```
cargo scout-audit --output-format [html|md]
```

**Example HTML report**

![Scout HTML report.](/docs/static/img/scout-soroban-html.jpg)

## VS Code extension

Add Scout to your development workspace with Scout's VS Code extension to run Scout automatically upon saving your file.

![Scout VS Code extension.](/assets/vscode-extension.png)



:point_right: Download Scout VS Code from [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=CoinFabrik.scout-audit).

## Scout GitHub Action

Integrate Scout into your CI/CD pipeline! Automatically run the tool against the targeted smart contracts. This immediate feedback loop allows developers to quickly address any issues before merging the code into the main branch, reducing the risk of introducing bugs or vulnerabilities.

**Scout output as a comment in a pull request**

![Scout GitHub action output](/docs/static/img/github-action-output.jpg)

:point_right: Find Scout GitHub Action in [GitHub Marketplace](https://github.com/marketplace/actions/run-scout-action).

## Tests

Expand All @@ -83,9 +107,18 @@ cargo test --all --all-features

In order to run the tests for a particular test-case, run the same command on that particular test-case folder (e.g: `test-cases/divide-before-multiply/divide-before-multiply-1`)

# Documentation

- [Getting Started](https://coinfabrik.github.io/scout-soroban/docs/intro)
- [Vulnerabilities](https://coinfabrik.github.io/scout-soroban/docs/vulnerabilities)
- [Detectors](https://coinfabrik.github.io/scout-soroban/docs/detectors)
- [Contribute](https://coinfabrik.github.io/scout-soroban/docs/contribute)
- [Architecture](https://coinfabrik.github.io/scout-soroban/docs/architecture)
- [Blog](https://blog.coinfabrik.com/)

## Acknowledgements

Scout Soroban is an open source vulnerability analyzer developed by [CoinFabrik's](https://www.coinfabrik.com/) Research and Development team.
Scout for Soroban is an open source vulnerability analyzer developed by [CoinFabrik's](https://www.coinfabrik.com/) Research and Development team.

We received support through a grant from the [Stellar Community Fund (SCF)](https://communityfund.stellar.org/).

Expand Down
Binary file added assets/vscode-extension.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/static/img/github-action-output.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/static/img/scout-soroban-html.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f78a675

Please sign in to comment.