algorand-vulnerability-scanner

Scans Algorand TEAL and PyTeal smart contracts for 11 platform-specific vulnerability patterns.

Updated Mar 22, 2026
One-click install
npx skills add https://github.com/TECH-HY/SKILLS --skill algorand-vulnerability-scanner-tech-hy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: algorand-vulnerability-scanner
Source: https://github.com/TECH-HY/SKILLS/tree/main/skills/algorand-vulnerability-scanner
Command: npx skills add https://github.com/TECH-HY/SKILLS --skill algorand-vulnerability-scanner-tech-hy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires tealer, and includes references (resource) components.

What problem does it solve? Algorand smart contracts have unique attack surfaces—rekeying, unchecked CloseRemainderTo fields, group transaction manipulation—that generic Solidity-oriented audit tools miss entirely. This Skill systematically detects 11 Algorand-specific vulnerability patterns in TEAL and PyTeal code before they reach production. ## Core Features & Use Cases - 11 Vulnerability Pattern Detection: Checks for rekeying attacks, unchecked transaction fees, missing group size validation, asset close-to issues, access control gaps, and more, each with severity ratings and code examples. - Tealer Integration: Runs Trail of Bits' Tealer static analyzer alongside manual pattern sweeps, with CI/CD commands for failing builds on critical findings. - Structured Audit Reports: Produces findings with file locations, vulnerable code snippets, attack scenarios, and concrete remediation code. - Use Case: Before deploying a PyTeal DeFi contract, run this Skill to discover that your payment handler never validates the RekeyTo field, then apply the provided fix to block account takeover attacks. ## Quick Start Scan the Algorand smart contracts in this repository for security vulnerabilities and report any findings with severity and fixes.

Frequently Asked Questions about algorand-vulnerability-scanner

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scan Algorand smart contracts for vulnerabilities?

Scan TEAL and PyTeal files for the 11 documented vulnerability patterns, checking transaction fields like RekeyTo, CloseRemainderTo, and group size. You can also run Tealer with 'tealer contract.teal --detect all' for automated static analysis.

What vulnerabilities are unique to Algorand smart contracts?

Algorand-specific risks include rekeying attacks via the RekeyTo field, account draining through CloseRemainderTo and AssetCloseTo, group transaction manipulation without group size checks, and clear state program invocation bypassing approval logic.

Does Tealer work with PyTeal contracts?

Tealer analyzes compiled TEAL code, so PyTeal contracts must be compiled to TEAL first. Install it with 'pip3 install tealer' and run it against the generated .teal files with specific detectors like unprotected-rekey or group-size-check.

How do I prevent rekeying attacks in Algorand contracts?

Validate that Txn.rekey_to() equals Global.zero_address() in every transaction approval path. For inner transactions in TEAL v6+, never allow user-controlled RekeyTo fields, since a successful rekey transfers full account authorization to an attacker.

Can this audit process run in a CI/CD pipeline?

Yes, Tealer supports JSON output and severity-based failure thresholds. Use 'tealer approval.teal --detect all --fail-on critical,high' to automatically fail builds when critical or high severity findings are detected.