fix: correct duplicate section numbering in solana-vulnerability-scanner (#160)

* fix: correct duplicate section numbering in solana-vulnerability-scanner

Three sections shared number 5. Renumbered:
- Section 5: Vulnerability Patterns (unchanged)
- Section 6: Scanning Workflow (was 5)
- Section 7: Example Output (was 5)
- Section 8: Reporting Format (was 6)
- Section 9: Priority Guidelines (was 7)
- Section 10: Testing Recommendations (was 8)

* Renumber all H2 sections sequentially in document order

The earlier renumber attempt only addressed the three '## 5.' duplicates
flagged in #159, but introduced two new pairs ('## 9. Priority Guidelines' /
'## 9. Additional Resources' and '## 10. Testing Recommendations' /
'## 10. Quick Reference Checklist') and left the section numbers
non-monotonic ('7, 5, 6' in document order).

This commit renumbers all 12 H2 sections strictly in document order so the
numbers are unique AND increasing: 1..4 unchanged, Example Output now 5,
Vulnerability Patterns 6, Scanning Workflow 7, Reporting Format 8 (no
change), Priority Guidelines 9 (no change), Testing Recommendations 10
(no change), Additional Resources 11, Quick Reference Checklist 12.

Also adds the missing blank line before '## 7. Scanning Workflow' so the
heading does not abut the preceding paragraph.

Bumps building-secure-contracts plugin version 1.1.0 → 1.1.1 in both
plugin.json and marketplace.json so clients pick up the fix.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Dan Guido <dan@trailofbits.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Leon.C
2026-05-06 05:36:48 +08:00
committed by GitHub
parent 870955f1af
commit a56045e9ae
3 changed files with 10 additions and 9 deletions
+1 -1
View File
@@ -31,7 +31,7 @@
},
{
"name": "building-secure-contracts",
"version": "1.1.0",
"version": "1.1.1",
"description": "Comprehensive smart contract security toolkit based on Trail of Bits' Building Secure Contracts framework. Includes vulnerability scanners for 6 blockchains and 5 development guideline assistants.",
"author": {
"name": "Omar Inuwa && Paweł Płatek"
@@ -1,6 +1,6 @@
{
"name": "building-secure-contracts",
"version": "1.1.0",
"version": "1.1.1",
"description": "Comprehensive smart contract security toolkit based on Trail of Bits' Building Secure Contracts framework. Includes vulnerability scanners for 6 blockchains and 5 development guideline assistants.",
"author": {
"name": "Omar Inuwa && Paweł Płatek",
@@ -91,7 +91,7 @@ When invoked, I will:
---
## 5. Vulnerability Patterns (6 Patterns)
## 6. Vulnerability Patterns (6 Patterns)
I check for 6 critical vulnerability patterns unique to Solana. For detailed detection patterns, code examples, mitigations, and testing strategies, see [VULNERABILITY_PATTERNS.md](resources/VULNERABILITY_PATTERNS.md).
@@ -105,7 +105,8 @@ I check for 6 critical vulnerability patterns unique to Solana. For detailed det
6. **Improper Instruction Introspection** ⚠️ MEDIUM - Absolute indexes allowing reuse
For complete vulnerability patterns with code examples, see [VULNERABILITY_PATTERNS.md](resources/VULNERABILITY_PATTERNS.md).
## 5. Scanning Workflow
## 7. Scanning Workflow
### Step 1: Platform Identification
1. Verify Solana program (native or Anchor)
@@ -182,7 +183,7 @@ solana-program = "1.17" # Use latest version
---
## 6. Reporting Format
## 8. Reporting Format
### Finding Template
```markdown
@@ -259,7 +260,7 @@ pub fn withdraw(ctx: Context<Withdraw>, amount: u64) -> Result<()> {
---
## 7. Priority Guidelines
## 9. Priority Guidelines
### Critical (Immediate Fix Required)
- Arbitrary CPI (attacker-controlled program execution)
@@ -275,7 +276,7 @@ pub fn withdraw(ctx: Context<Withdraw>, amount: u64) -> Result<()> {
---
## 8. Testing Recommendations
## 10. Testing Recommendations
### Unit Tests
```rust
@@ -338,7 +339,7 @@ anchor test
---
## 9. Additional Resources
## 11. Additional Resources
- **Building Secure Contracts**: `building-secure-contracts/not-so-smart-contracts/solana/`
- **Trail of Bits Solana Lints**: https://github.com/trailofbits/solana-lints
@@ -348,7 +349,7 @@ anchor test
---
## 10. Quick Reference Checklist
## 12. Quick Reference Checklist
Before completing Solana program audit: