@trailofbits

作成者 · trailofbits

最終更新 · 2026年8月24日

algorand-vulnerability-scanner

レビュー · 74Registry に収録

Scans Algorand smart contracts for 11 common vulnerabilities including rekeying attacks, unchecked transaction fees, missing field validations, and access control issues. Use when auditing Algorand projects (TEAL/PyTeal).

OpenAgentSkill Trust Score
74/100

サンドボックス限定

品質86/100
監査87/100
スター6.8K
Verified installs0

インストール先

Codex インストールプロンプト

Install the "algorand-vulnerability-scanner" agent skill from https://github.com/trailofbits/skills/tree/main/plugins/building-secure-contracts/skills/algorand-vulnerability-scanner. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Scans Algorand smart contracts for 11 common vulnerabilities including rekeying attacks, unchecked transaction fees, missing field validations, and access control issues. Use when auditing Algorand projects (TEAL/PyTeal). After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"trailofbits-algorand-vulnerability-scanner","task":"Install algorand-vulnerability-scanner","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.

供給アセットの概要

コーディングと開発 Agent

コードレビュー、リポジトリ分析、テスト、CI、GitHub、DevOps、開発ワークフロー向けのスキルです。

カテゴリを見る

シナリオ

GitHub automation

I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.

Agent 適合

Claude Code + CLI + Codex

Codex、Claude Code、Cursor、CLI、またはカスタム Agent に対応します。

インストール

準備完了

npx skills add trailofbits/skills --skill algorand-vulnerability-scanner

メンテナンス

新しい

本日プッシュ

リスク

高リスク

Permission surface may require sandboxing

GitHub 品質

6.8K

86/100 品質 · 82/100 信頼

対象タグ

コーディングGitHub automationセキュリティagent-skill

レビュー注記

Permission surface may require sandboxing · Potential broker, wallet, exchange, or real-money execution surface; sandbox and explicit approval are required

Agent 導入スコアカード

信頼、監査、インストール準備状況を一目で確認

公開リポジトリのメタデータ、OpenAgentSkill のレビューシグナル、保守の鮮度、インストール準備状況を組み合わせたスコアです。候補選定の目安であり、人によるレビューの代替ではありません。

品質

優秀
86

採用度と保守性のシグナルが強い高信頼候補です。

信頼

サンドボックス限定
74

信頼シグナルが不足または混在する有用な候補です。結果ループがタスク適合を示すまで、隔離されたワークスペースで使用してください。

監査

高リスク
87

インストール準備、安全メタデータ、保守、採用リスクの機械可読なレビュー。

OpenAgentSkill Trust Score v5

サンドボックス限定

実作業で使う前に、サンドボックスでのみ実行し、近い代替と比較してください。

CodexClaude CodeCursorOpenAgentSkill CLI

スター

GitHub スター 6.8K

リポジトリ活動

スター 6.8K、フォーク 585

メンテナンス

本日プッシュ

ライセンス

CC-BY-SA-4.0

インストール

npx skills add trailofbits/skills --skill algorand-vulnerability-scanner

インストール安全性

標準パッケージまたはランタイムのインストールパス

権限範囲

shell or command execution, filesystem or document access

Agent の成果

Agent の成果データはまだありません

ドキュメント

README/SKILL.md の文脈が十分です

リスク概要

本番前にレビュー

  • This skill may touch real-money trading, broker, wallet, or exchange operations; use only in a sandbox with explicit approval.
  • Quality score needs review
  • Permission surface needs review: shell or command execution, filesystem or document access
  • Permission surface: shell or command execution, filesystem or document access

インストール準備状況

インストールパスを利用可能

  • インストールパスを利用できます
  • リポジトリの根拠を利用できます
  • ライセンスが明示されています
  • Agent-Proven の成果エビデンスはまだありません

Agent 可読メタデータ

このスキルの機械可読な判断データ。

このブロックまたは埋め込み JSON を使い、Agent がこのスキルをインストールすべきか、代替を選ぶべきか、先に人のレビューを求めるべきかを判断できます。

View technical data+

適したタスク

  • GitHub automation ワークフロー
  • Claude Code チーム
  • GitHub 採用シグナルを重視するチーム
  • Inspect repository metadata

適した Agent

CodexClaude CodeCursorOpenAgentSkill CLICLI

インストール判断

コマンド
npx skills add trailofbits/skills --skill algorand-vulnerability-scanner
ポリシー
ブロック
人によるレビュー
はい

信頼とリスク

信頼
74/100
監査
87/100
リスクレベル
高リスク

成果ループ

エンドポイント
/api/agent/outcome
イベント ID
resolve
成果
5

インストールコマンド

npx skills add trailofbits/skills --skill algorand-vulnerability-scanner

使わない場合

  • ベンダー提供の SLA が必要なチーム
  • 内部セキュリティレビューのない高コンプライアンス環境
  • OpenAgentSkill の利用フィードバックはまだありません
  • Audit risk risky exceeds max_risk=medium
  • 高リスク権限のヒント: Shell またはコマンド実行

Agent セーフティ v2

55/100 · 自動インストールを避ける

Blocked for auto-installブロック

This skill should not be selected by an agent without explicit human security review.

Do not auto-install. Inspect the source, dependencies, and permission surface first.

API で解決

Shell またはコマンド実行

Skill メタデータに端末、CLI、Shell、サブプロセス、またはコマンド実行のワークフローが含まれます。

ネットワークアクセス

Skill はリモートページ、API、リポジトリ、外部サービスにアクセスする可能性があります。

ファイルシステムアクセス

Skill はプロジェクトファイル、ドキュメント、生成物、ローカルワークスペース状態を読み書きする可能性があります。

データベースアクセス

Skill はスキーマを確認し、データベースを照会し、永続ストアを扱う可能性があります。

  • Audit risk risky exceeds max_risk=medium
  • 高リスク権限のヒント: Shell またはコマンド実行
  • Permission surface may require sandboxing

Agent 解決プラン

インストール前に Agent に適合性を検証させます。

Resolve API は第一候補、代替、安全ポリシー、監査メモ、インストール先、Agent がそのまま使えるプロンプトを返します。

テキストプランを開く

Agent が確認すべきこと

  • Resolve API でタスク適合と代替を確認。
  • 監査・信頼スコアと安全ポリシーの警告を確認。
  • Codex、Claude Code、Cursor、CLI のインストール先互換性を確認。

プロンプトをコピー

Task: Use algorand-vulnerability-scanner in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20algorand-vulnerability-scanner%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/trailofbits-algorand-vulnerability-scanner/install
Install command: npx skills add trailofbits/skills --skill algorand-vulnerability-scanner
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.

Agent 引き継ぎ

別のディレクトリではなく、インストール経路を Agent に渡します。

公開インストールエンドポイントからコマンド、安全チェックリスト、対象プロンプト、正規リンクを取得します。

Install API を開く

Agent プロンプト

Use algorand-vulnerability-scanner for this task. Review https://www.openagentskill.com/api/skills/trailofbits-algorand-vulnerability-scanner/install, then install with: npx skills add trailofbits/skills --skill algorand-vulnerability-scanner

Registry メタデータ

自動スキル選択用の Agent 可読プロファイル。

Registry API 経由で判断、信頼、監査、ユースケース、インストールのシグナルを提供し、UI をスクレイピングせずに Agent が順位付けできます。

Manifest を開く

Agent 適合

97/100

GitHub automation

プラットフォーム

Claude Code

監査レポート

高リスク · 87/100

インストール準備、安全メタデータ、保守、採用リスクの機械可読なレビュー。

監査レポートを見る評価レポートを見る

Agent 判断パネル

GitHub automation 向けの第一候補

有力候補として扱い、自分の Agent スタックで README とインストール経路を検証してください。

97
準備状況
採用
段階

スタック内の役割

第一候補

主な適合

GitHub automation

信頼ラベル

本番対応

インストールパス

コマンド準備済み

使う場面

  • GitHub automation ワークフロー
  • Claude Code チーム
  • GitHub 採用シグナルを重視するチーム

根拠

  • GitHub スター 6,823
  • 最近のリポジトリ活動
  • インストールコマンドまたは GitHub リポジトリが利用可能
  • 品質プロファイル 86/100

先にレビュー

  • OpenAgentSkill の利用フィードバックはまだありません

実装パス

  1. 1サンドボックスの Agent にインストールし、GitHub automation タスクを一度最初から最後まで実行します。
  2. 2Compare output quality, latency, and failure behavior against at least one alternative.
  3. 3Promote it into production only after reviewing repository permissions, license, and maintenance signals.

信頼プロファイル

サンドボックス限定

信頼シグナルが不足または混在する有用な候補です。結果ループがタスク適合を示すまで、隔離されたワークスペースで使用してください。

74
OpenAgentSkill Trust Score

GitHub 採用度

合格

GitHub スター 6.8K

スター/フォーク活動

合格

スター 6.8K、フォーク 585; 現在のメタデータでは Issue 活動を利用できません

最近のメンテナンス

合格

本日プッシュ

ライセンスの明確さ

合格

CC-BY-SA-4.0

良いシグナル

  • AI レビュー承認済み
  • インストールパスを利用できます
  • リポジトリの根拠を利用できます
  • 最近保守されたリポジトリ
  • Large GitHub adoption signal
  • インストールコマンドに明確な高リスクパターンはありません
  • 成果ループは準備済みですが、最初の実行が必要です

インストール前にレビュー

  • This skill may touch real-money trading, broker, wallet, or exchange operations; use only in a sandbox with explicit approval.
  • Quality score needs review
  • Permission surface needs review: shell or command execution, filesystem or document access
  • Permission surface: shell or command execution, filesystem or document access
  • 実際の Agent 成果レポートはまだありません
  • 無人インストールの前に人によるレビューが必要です

推奨アクション

実作業で使う前に、サンドボックスでのみ実行し、近い代替と比較してください。

品質プロファイル

優秀 Agent ワークフロー向けの候補

採用度と保守性のシグナルが強い高信頼候補です。

86
GitHub スター
6.8K
鮮度
今日
インストール準備完了
はい
ライセンス
CC-BY-SA-4.0

ワークフロー適合

このスキルを使うシナリオ

ワークフロー適合

完全なワークフローに追加

代替候補

インストール前に比較

このタスクに適する可能性のある類似スキル。

すべて比較

概要

--- name: algorand-vulnerability-scanner description: Scans Algorand smart contracts for 11 common vulnerabilities including rekeying attacks, unchecked transaction fees, missing field validations, and access control issues. Use when auditing Algorand projects (TEAL/PyTeal). ---

# Algorand Vulnerability Scanner

## 1. Purpose

Systematically scan Algorand smart contracts (TEAL and PyTeal) for platform-specific security vulnerabilities documented in Trail of Bits' "Not So Smart Contracts" database. This skill encodes 11 critical vulnerability patterns unique to Algorand's transaction model.

## 2. When to Use This Skill

- Auditing Algorand smart contracts (stateful applications or smart signatures) - Reviewing TEAL assembly or PyTeal code - Pre-audit security assessment of Algorand projects - Validating fixes for reported Algorand vulnerabilities - Training team on Algorand-specific security patterns

## 3. Platform Detection

### File Extensions & Indicators - **TEAL files**: `.teal` - **PyTeal files**: `.py` with PyTeal imports

### Language/Framework Markers ```python # PyTeal indicators from pyteal import * from algosdk import *

# Common patterns Txn, Gtxn, Global, InnerTxnBuilder OnComplete, ApplicationCall, TxnType @router.method, @Subroutine ```

### Project Structure - `approval_program.py` / `clear_program.py` - `contract.teal` / `signature.teal` - References to Algorand SDK or Beaker framework

### Tool Support - **Tealer**: Trail of Bits static analyzer for Algorand - Installation: `uv tool install tealer` (ensure uv's tool bin dir is on PATH) - Usage: `tealer contract.teal --detect all`

---

## 4. How This Skill Works

When invoked, I will:

1. **Search your codebase** for TEAL/PyTeal files 2. **Analyze each file** for the 11 vulnerability patterns 3. **Report findings** with file references and severity 4. **Provide fixes** for each identified issue 5. **Run Tealer** (if installed) for automated detection

---

## 5. Example Output

When vulnerabilities are found, you'll get a report like this:

``` === ALGORAND VULNERABILITY SCAN RESULTS ===

Project: my-algorand-dapp Files Scanned: 3 (.teal, .py) Vulnerabilities Found: 2

---

[CRITICAL] Rekeying Attack File: contracts/approval.py:45 Pattern: Missing RekeyTo validation

Code: If(Txn.type_enum() == TxnType.Payment, Seq([ # Missing: Assert(Txn.rekey_to() == Global.zero_address()) App.globalPut(Bytes("balance"), balance + Txn.amount()), Approve() ]) )

Issue: The contract doesn't validate the RekeyTo field, allowing attackers to change account authorization and bypass restrictions. ```

---

## 6. Vulnerability Patterns (11 Patterns)

I check for 11 critical vulnerability patterns unique to Algorand. For detailed detection patterns, code examples, mitigations, and testing strategies, see [VULNERABILITY_PATTERNS.md](resources/VULNERABILITY_PATTERNS.md).

### Pattern Summary:

1. **Rekeying Vulnerability** ⚠️ CRITICAL - Unchecked RekeyTo field 2. **Missing Transaction Verification** ⚠️ CRITICAL - No GroupSize/GroupIndex checks 3. **Group Transaction Manipulation** ⚠️ HIGH - Unsafe group transaction handling 4. **Asset Clawback Risk** ⚠️ HIGH - Missing clawback address checks 5. **Application State Manipulation** ⚠️ MEDIUM - Unsafe global/local state updates 6. **Asset Opt-In Missing** ⚠️ HIGH - No asset opt-in validation 7. **Minimum Balance Violation** ⚠️ MEDIUM - Account below minimum balance 8. **Close Remainder To Check** ⚠️ HIGH - Unchecked CloseRemainderTo field 9. **Application Clear State** ⚠️ MEDIUM - Unsafe clear state program 10. **Atomic Transaction Ordering** ⚠️ HIGH - Assuming transaction order 11. **Logic Signature Reuse** ⚠️ HIGH - Logic sigs without uniqueness constraints

For complete vulnerability patterns with code examples, see [VULNERABILITY_PATTERNS.md](resources/VULNERABILITY_PATTERNS.md).

## 7. Scanning Workflow

### Step 1: Platform Identification 1. Confirm file extensions (`.teal`, `.py`) 2. Identify framework (PyTeal, Beaker, pure TEAL) 3. Determine contract type (stateful application vs smart signature) 4. Locate approval and clear state programs

### Step 2: Static Analysis with Tealer ```bash # Run Tealer on contract tealer contract.teal --detect all

# Or specific detectors tealer contract.teal --detect unprotected-rekey,group-size-check,update-application-check ```

### Step 3: Manual Vulnerability Sweep For each of the 11 vulnerabilities above: 1. Search for relevant transaction field usage 2. Verify validation logic exists 3. Check for bypass conditions 4. Validate inner transaction handling

### Step 4: Transaction Field Validation Matrix Create checklist for all transaction types used:

**Payment Transactions**: - [ ] RekeyTo validated - [ ] CloseRemainderTo validated - [ ] Fee validated (if smart signature)

**Asset Transfers**: - [ ] Asset ID validated - [ ] AssetCloseTo validated - [ ] RekeyTo validated

**Application Calls**: - [ ] OnComplete validated - [ ] Access controls enforced - [ ] Group size validated

**Inner Transactions**: - [ ] Fee explicitly set to 0 - [ ] RekeyTo not user-controlled (Teal v6+) - [ ] All fields validated

### Step 5: Group Transaction Analysis For atomic transaction groups: 1. Validate `Global.group_size()` checks 2. Review absolute vs relative indexing 3. Check for replay protection (Lease field) 4. Verify OnComplete fields for ApplicationCalls in group

### Step 6: Access Control Review - [ ] Creator/admin privileges properly enforced - [ ] Update/delete operations protected - [ ] Sensitive functions have authorization checks

---

## 8. Reporting Format

### Finding Template ````markdown ## [SEVERITY] Vulnerability Name (e.g., Missing RekeyTo Validation)

**Location**: `contract.teal:45-50` or `approval_program.py:withdraw()`

**Description**: The contract approves payment transactions without validating the RekeyTo field, allowing an attacker to rekey the account and bypass future authorization checks.

**Vulnerable Code**: ```python # approval_program.py, line 45 If(Txn.type_enum() == TxnType.Payment, Approve() # Missing RekeyTo check ) ```

**Attack Scenario**: 1. Attacker submits payment transaction with RekeyTo set to attacker's address 2. Contract approves transaction without checking RekeyTo 3. Account authorization is rekeyed to attacker 4. Attacker gains full control of account

**Recommendation**: Add explicit validation of the RekeyTo field: ```python If(And( Txn.type_enum() == TxnType.Payment, Txn.rekey_to() == Global.zero_address() ), Approve(), Reject()) ```

**References**: - building-secure-contracts/not-so-smart-contracts/algorand/rekeying - Tealer detector: `unprotected-rekey` ````

---

## 9. Priority Guidelines

### Critical (Immediate Fix Required) - Rekeying attacks - CloseRemainderTo / AssetCloseTo issues - Access control bypasses

### High (Fix Before Deployment) - Unchecked transaction fees - Asset ID validation issues - Group size validation - Clear state transaction checks

### Medium (Address in Audit) - Inner transaction fee issues - Time-based replay attacks - DoS via asset opt-in

---

## 10. Testing Recommendations

### Unit Tests Required - Test each vulnerability scenario with PoC exploit - Verify fixes prevent exploitation - Test edge cases (group size = 0, empty addresses, etc.)

### Tealer Integration ```bash # Add to CI/CD pipeline tealer approval.teal --detect all --json > tealer-report.json

# Fail build on critical findings tealer approval.teal --detect all --fail-on critical,high ```

### Scenario Testing - Submit transactions with all critical fields manipulated - Test atomic groups with unexpected sizes - Attempt access control bypasses - Verify inner transaction fee handling

---

## 11. Additional Resources

- **Building Secure Contracts**: `building-secure-contracts/not-so-smart-contracts/algorand/` - **Tealer Documentation**: https://github.com/crytic/tealer - **Algorand Developer Docs**: https://developer.algorand.org/docs/ - **PyTeal Documentation**: https://pyteal.readthedocs.io/

---

## 12. Quick Reference Checklist

Before completing Algorand audit, verify ALL items checked:

- [ ] RekeyTo validated in all transaction types - [ ] CloseRemainderTo validated in payment transactions - [ ] AssetCloseTo validated in asset transfers - [ ] Transaction fees validated (smart signatures) - [ ] Group size validated for atomic transactions - [ ] Lease field used for replay protection (where applicable) - [ ] Access controls on Update/Delete operations - [ ] Asset ID validated in all asset operations - [ ] Asset transfers use pull pattern to avoid DoS - [ ] Inner transaction fees explicitly set to 0 - [ ] OnComplete field validated for ApplicationCall transactions - [ ] Tealer scan completed with no critical/high findings - [ ] Unit tests cover all vulnerability scenarios

技術詳細

バージョン
1.0.0
ライセンス
CC-BY-SA-4.0
最終更新
2026年8月24日
公開日
2026年8月24日

判断の要約

第一候補

97
準備完了
採用
段階

GitHub スター 6,823

監査

インストールレビュー

インストールと採用のレビュー

87
高リスク
セキュリティ
82/100
メンテナンス
100/100
インストール
92/100
完全な監査を開く評価レポートを見る

Agent 実証エビデンス

Agent 実証エビデンス

Resolve、レビュー、インストール、限定実行後の成果レポート。

0
実証済み
Needs first agent run自動インストール: 先にレビュー最新: 不明
成功率
直近の失敗
成果
0
出力品質
失敗
0
非該当
0
インストール数
0
リスクによりブロック
0
設定が必要
0
本番
0

Agent の実行結果はまだありません。最初の実行では /api/agent/outcome を通じて成功、設定要件、リスクによるブロック、失敗、非該当を報告できます。

インストール

Agent ワークフローに追加

無料・オープンソース. 本番 Agent にインストールする前にレポートを確認してください。

成長ループ

共有キット

X

algorand-vulnerability-scanner 用のシナリオベース草案です。X へ手動投稿できます。

キュレーターノート
algorand-vulnerability-scanner: Scans Algorand smart contracts for 11 common vulnerabilities including rekeying attacks, unch...

6.8K stars

https://www.openagentskill.com/skills/trailofbits-algorand-vulnerability-scanner?ref=x
X 下書きを開く
任意:インストールコマンド付きの返信
Listing + install path for algorand-vulnerability-scanner:
https://www.openagentskill.com/skills/trailofbits-algorand-vulnerability-scanner?ref=x

Install: npx skills add trailofbits/skills --skill algorand-vulnerability-scanner
返信の下書きを開く

掲載元

Registry により登録

申請可能

この掲載は公開ソースから登録されており、メンテナー申請が承認されるまで公式として表示されません。

作成者
trailofbits
インデックス作成者
OpenAgentSkill コミュニティインデックス

帰属は公開リポジトリまたは作成者プロフィールにリンクされています。作成者は掲載を申請して所有権シグナルを更新できます。

このスキルを申請

所有者の申請

このスキル掲載を申請

この Registry により登録 掲載は trailofbits に帰属していますが、まだ公式として表示されていません。申請すると、確認済み所有者シグナルが追加され、今後の公開、インストール、監査更新の信頼性が高まります。

クリエイター被リンクキット

README にエビデンスバッジを追加

開発者がリポジトリを評価する場所で、正規掲載、現在の信頼・監査シグナル、実際の Agent-Proven エビデンスを表示します。

[![Listed on OpenAgentSkill](https://www.openagentskill.com/api/badge/trailofbits-algorand-vulnerability-scanner?metric=listed&label=Listed)](https://www.openagentskill.com/skills/trailofbits-algorand-vulnerability-scanner)
[![OpenAgentSkill Trust](https://www.openagentskill.com/api/badge/trailofbits-algorand-vulnerability-scanner?metric=trust&label=Trust)](https://www.openagentskill.com/skills/trailofbits-algorand-vulnerability-scanner)
[![OpenAgentSkill Audit](https://www.openagentskill.com/api/badge/trailofbits-algorand-vulnerability-scanner?metric=audit&label=Audit)](https://www.openagentskill.com/skills/trailofbits-algorand-vulnerability-scanner/audit)
[![Agent Proven](https://www.openagentskill.com/api/badge/trailofbits-algorand-vulnerability-scanner?metric=proven&label=Agent%20Proven)](https://www.openagentskill.com/skills/trailofbits-algorand-vulnerability-scanner)

作者

T

trailofbits

@trailofbits

プラットフォーム適合

健全性シグナル

GitHub スター
6.8K
品質スコア
50/100
最終 GitHub プッシュ
2026年8月24日
フレームワークのヒント
不明
OpenAgentSkill 閲覧数
0
インストールコピー数
0
外部クリック
0

コミュニティシグナル

このスキルが Agent ワークフローに役立つかを共有してください。集約されたフィードバックがランキングを改善します。

信頼と安全性

サンドボックス限定

74
  • GitHub 採用度GitHub スター 6.8K合格
  • スター/フォーク活動スター 6.8K、フォーク 585; 現在のメタデータでは Issue 活動を利用できません合格
  • 最近のメンテナンス本日プッシュ合格
  • ライセンスの明確さCC-BY-SA-4.0合格
  • README/SKILL.md の完全性メタデータには十分な利用・ワークフロー文脈があります合格
  • 依存関係/ランタイムのリスクcommand execution surface, database surface情報