crytic / tealer

Static Analyzer for Teal
GNU Affero General Public License v3.0
62 stars 14 forks source link

Update all stateless detectors to work on the group configuration #192

Closed S3v3ru5 closed 1 year ago

S3v3ru5 commented 1 year ago

The MissingFeeCheck, CanCloseAccount, CanCloseAsset detectors are updated to work on group transactions. The tests are updated to test these detectors as well.

The PR also adds support for use of user-given transaction type in the detectors.

The contracts are only vulnerable to CanCloseAccount only if the logic-sig is executed in a Payment transaction. The detector checks if the type of the transaction is Payment or not and only detects if the transaction is payment.

Note: The CanCloseAccount and CanCloseAsset detectors do use the transaction types before this PR. however, they relied on the information computed by tealer instead of the user-given configuration.