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

Smart contract FT internal security audit #130

Open
10 tasks
sydhds opened this issue Nov 20, 2023 · 1 comment
Open
10 tasks

Smart contract FT internal security audit #130

sydhds opened this issue Nov 20, 2023 · 1 comment

Comments

@sydhds
Copy link

sydhds commented Nov 20, 2023

Following the internal audit described here,

The following report has been written with few recommendations:

https://www.notion.so/massa-innoteam/FT-NFT-Contract-Audit-comments-0dd27b501ce44fcf9fbe131a7b6ebb8e?pvs=4#0385a7301ef442b89759faf6577b9f67

Recommendations

Code Coverage

  1. Enable Code Coverage Reporting Automatically:
    • Implement automatic code coverage reporting in the as-pect.config.js file.
    • Ensure that code coverage is enabled as part of the Continuous Integration (CI) pipeline.

Dependencies

  1. Update "semver" Package:
    • Upgrade the "semver" package to the latest version to address any potential vulnerabilities.
    • Integrate npm audit into the CI pipeline to automatically check for package vulnerabilities.

Code Security Checkup

root
  1. Token Constructor Security:

    • Extract arguments from the constructor before setting them to Storage to prevent potential issues.
  2. Safe Math Library Usage:

    • Use a safe math library for all (u256) token manipulation operations to prevent overflow vulnerabilities.
burnable
  1. Burn Functions Security:

    • Ensure that burn functions check for overflow to prevent potential issues.
  2. Unit Tests Enhancements:

    • In the ft.spec.ts unit test, check for transfer and allowance overflows.
    • In the ft-burn.spec.ts unit test, check for burn and decreaseTotalSupply overflows.
    • In the ft-mint.spec.ts unit test, verify that increase balance and supply do not overflow.
@Ben-Rey
Copy link
Contributor

Ben-Rey commented Nov 22, 2023

@peterjah @gregLibert FYI

@Ben-Rey Ben-Rey assigned leoloco and unassigned leoloco Jan 30, 2024
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

No branches or pull requests

3 participants