feat: Add integration tests for token contract#86
Merged
Gbangbolaoluwagbemiga merged 3 commits intoHyperSafeD:mainfrom Feb 25, 2026
Merged
Conversation
Contributor
Author
|
@Gbangbolaoluwagbemiga please review my PR |
Contributor
|
@ritik4ever, please resolve conflicts |
xqcxx
pushed a commit
to xqcxx/Sanctifier
that referenced
this pull request
Mar 10, 2026
…ract-template-Reentrancy-Guardian Develop-smart-contract-template-Reentrancy-Guardian
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
feat: Add Integration Tests for Token Contract
Closes #32
Description
This pull request introduces integration tests for the
sanctifier-coreanalyzer to verify its ability to detect common vulnerabilities in Soroban token contracts.To facilitate this, a new vulnerable contract,
token-with-bugs, has been added. This contract includes the following intentional vulnerabilities:transferfunction can be called without arequire_authcheck, allowing unauthorized transfers.mintandtransferfunctions perform arithmetic operations without using checked arithmetic, making them vulnerable to integer overflow/underflow attacks.Changes
contracts/token-with-bugswith the vulnerabilities described above.test_token_with_bugstotooling/sanctifier-core/src/lib.rs.Analyzerto scan thetoken-with-bugscontract.scan_auth_gapsandscan_arithmetic_overflowcorrectly identify and report the vulnerabilities.Testing
The changes were tested by running the
sanctifier-coretest suite. The new testtest_token_with_bugspasses, confirming that the analyzer works as expected.