Chuyển đến nội dung
Skillpedia
Bảo mật8.0k · #12662

secure-workflow-guide

Skill này làm gì

Đưa nhóm smart contract qua một quy trình bảo mật lặp lại được, từ quét tự động đến review thủ công. Dành cho lập trình viên muốn kiểm tra contract của mình ở mỗi thay đổi hoặc trước khi triển khai.

Khi nào nên dùng

  • ✓Khi lập trình viên muốn bảo mật một smart contract từ đầu đến cuối trước khi triển khai.
  • ✓Khi nhóm muốn kiểm tra bảo mật ở mỗi thay đổi code smart contract.
  • ✓Khi lập trình viên muốn sơ đồ trực quan về kế thừa và kiểm soát truy cập của contract.

Liên kết skill

https://github.com/trailofbits/skills/blob/main/plugins/building-secure-contracts/skills/secure-workflow-guide/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/trailofbits/skills/blob/main/plugins/building-secure-contracts/skills/secure-workflow-guide/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Đưa smart contract của tôi qua một kiểm tra bảo mật đầy đủ trước khi tôi triển khai.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill chạy quét Slither, kiểm tra mọi tính năng đặc biệt như khả năng nâng cấp hoặc chuẩn token, và tạo sơ đồ cho contract. Nó cũng giúp ghi lại các thuộc tính bảo mật và review các khu vực cần con người chú ý.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Secure Workflow Guide

Purpose

Guides through Trail of Bits' secure development workflow - a 5-step process to enhance smart contract security throughout development.

Use this: On every check-in, before deployment, or when you want a security review


The 5-Step Workflow

Covers a security workflow including:

Step 1: Check for Known Security Issues

Run Slither with 70+ built-in detectors to find common vulnerabilities:

  • Parse findings by severity
  • Explain each issue with file references
  • Recommend fixes
  • Help triage false positives

Goal: Clean Slither report or documented triages

Step 2: Check Special Features

Detect and validate applicable features:

  • Upgradeability: slither-check-upgradeability (17 upgrade risks)
  • ERC conformance: slither-check-erc (6 common specs)
  • Token integration: Recommend token-integration-analyzer skill
  • Security properties: slither-prop for ERC20

Note: Only runs checks that apply to your codebase

Step 3: Visual Security Inspection

Generate 3 security diagrams:

  • Inheritance graph: Identify shadowing and C3 linearization issues
  • Function summary: Show visibility and access controls
  • Variables and authorization: Map who can write to state variables

Review each diagram for security concerns

Step 4: Document Security Properties

Help document critical security properties:

  • State machine transitions and invariants
  • Access control requirements
  • Arithmetic constraints and precision
  • External interaction safety
  • Standards conformance

Then set up testing:

  • Echidna: Property-based fuzzing with invariants
  • Manticore: Formal verification with symbolic execution
  • Custom Slither checks: Project-specific business logic

Note: Most important activity for security

Step 5: Manual Review Areas

Analyze areas automated tools miss:

  • Privacy: On-chain secrets, commit-reveal needs
  • Front-running: Slippage protection, ordering risks, MEV
  • Cryptography: Weak randomness, signature issues, hash collisions
  • DeFi interactions: Oracle manipulation, flash loans, protocol assumptions

Search codebase for these patterns and flag risks

For detailed instructions, commands, and explanations for each step, see WORKFLOW_STEPS.md.


How I Work

When invoked, I will:

  1. Explore your codebase to understand structure
  2. Run Step 1: Slither security scan
  3. Detect and run Step 2: Special feature checks (only what applies)
  4. Generate Step 3: Visual security diagrams
  5. Guide Step 4: Security property documentation
  6. Analyze Step 5: Manual review areas
  7. Provide action plan: Prioritized fixes and next steps

Adapts based on:

  • What tools you have installed
  • What's applicable to your project
  • Where you are in development

Rationalizations (Do Not Skip)

Rationalization Why It's Wrong Required Action
"Slither not available, I'll check manually" Manual checking misses 70+ detector patterns Install and run Slither, or document why it's blocked
"Can't generate diagrams, I'll describe the architecture" Descriptions aren't visual - diagrams reveal patterns text misses Execute slither --print commands, generate actual visual outputs
"No upgrades detected, skip upgradeability checks" Proxies and upgrades are often implicit or planned Verify with codebase search before skipping Step 2 checks
"Not a token, skip ERC checks" Tokens can be integrated without obvious ERC inheritance Check for token interactions, transfers, balances before skipping
"Can't set up Echidna now, suggesting it for later" Property-based testing is Step 4, not optional Document properties now, set up fuzzing infrastructure
"No DeFi interactions, skip oracle/flash loan checks" DeFi patterns appear in unexpected places (price feeds, external calls) Complete Step 5 manual review, search codebase for patterns
"This step doesn't apply to my project" "Not applicable" without verification = missed vulnerabilities Verify with explicit codebase search before declaring N/A
"I'll provide generic security advice instead of running workflow" Generic advice isn't actionable, workflow finds specific issues Execute all 5 steps, generate project-specific findings with file:line references

Example Output

When I complete the workflow, you'll get a

Câu hỏi thường gặp

Quét Slither làm gì?

Slither chạy các bộ phát hiện có sẵn để tìm lỗi phổ biến, và skill giúp bạn giải thích và phân loại từng kết quả.

Nó có kiểm tra mọi tính năng không?

Không. Nó chỉ chạy các kiểm tra áp dụng cho codebase của bạn.

Nó có thay thế review thủ công không?

Không. Skill có một bước review các khu vực bảo mật thủ công, nên vẫn cần người kiểm tra những phần quan trọng.

Chi tiết

Mô tả gốc của tác giả

Guides through Trail of Bits' 5-step secure development workflow. Runs Slither scans, checks special features (upgradeability/ERC conformance/token integration), generates visual security diagrams, helps document security properties for fuzzing/verification, and reviews manual security areas. Use when securing a smart contract end to end rather than hunting one bug, checking a project on every check-in or before deployment, triaging a Slither report, or asking where to start on smart contract security.

repo: trailofbits/skills

Độ phổ biến

Sao GitHub
8.0k
Vị trí xếp hạng
#12662
Giấy phép
CC-BY-SA-4.0
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự