Skip to content

feat: detect excessive Soroban event topics#453

Open
Joeloo1 wants to merge 2 commits into
MDTechLabs:mainfrom
drips-projects:Detect-Excessive-Soroban-Event-Topics
Open

feat: detect excessive Soroban event topics#453
Joeloo1 wants to merge 2 commits into
MDTechLabs:mainfrom
drips-projects:Detect-Excessive-Soroban-Event-Topics

Conversation

@Joeloo1
Copy link
Copy Markdown

@Joeloo1 Joeloo1 commented Jun 2, 2026

Summary

  • Adds detectExcessiveEventTopics() detector in rules/stellar/events/
  • Flags env.events().publish() calls whose topic tuple exceeds 4 entries or embeds large payload types (Bytes, BytesN, String, Vec, Map) directly in topics
  • Uses brace-counting to correctly parse nested function calls inside topic tuples

Test plan

  • Events with more than 4 topics are flagged
  • Events with Bytes, String, Vec, or Map in the topic tuple are flagged
  • Events with ≤ 4 plain topics are not flagged
  • Contracts with no event calls return detected: false
  • Fixture stellar-excessive-event-topics.json matches detector output

Closes #372

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 2, 2026

@Joeloo1 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Detect Excessive Soroban Event Topics

1 participant