Skip to content

feat(stellar): detect inconsistent Soroban visibility modifiers (#322) - #533

Merged
mijinummi merged 1 commit into
MDTechLabs:mainfrom
Topmatrixmor2014:fix/issue-322-detect-inconsistent-visibility
Jun 23, 2026
Merged

feat(stellar): detect inconsistent Soroban visibility modifiers (#322)#533
mijinummi merged 1 commit into
MDTechLabs:mainfrom
Topmatrixmor2014:fix/issue-322-detect-inconsistent-visibility

Conversation

@Topmatrixmor2014

Copy link
Copy Markdown
Contributor

Adds rules/stellar/security/visibility/detect-inconsistent-visibility.ts which flags pub fn declarations inside #[contractimpl] impl blocks whose name or shape indicates they should be private but whose visibility registers them as a Soroban contract entry point. Detection covers:

  • underscore-prefixed fn names that violate Rust convention
  • helper-style names (helper_, internal_, inner, priv, private_)
  • helper-style fns without an Env first parameter (cannot be entry points)

Includes unit tests, fixture, config registration, and integration with the rule recommendation engine.

closes #322

…chLabs#322)

Adds rules/stellar/security/visibility/detect-inconsistent-visibility.ts
which flags pub fn declarations inside #[contractimpl] impl blocks whose
name or shape indicates they should be private but whose visibility
registers them as a Soroban contract entry point. Detection covers:

  - underscore-prefixed fn names that violate Rust convention
  - helper-style names (helper_, internal_, _inner, priv_, private_)
  - helper-style fns without an Env first parameter (cannot be entry points)

Includes unit tests, fixture, config registration, and integration with
the rule recommendation engine.
@drips-wave

drips-wave Bot commented Jun 23, 2026

Copy link
Copy Markdown

@Topmatrixmor2014 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

@mijinummi
mijinummi merged commit a8ce5fe into MDTechLabs:main Jun 23, 2026
6 checks passed
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 Inconsistent Visibility Modifiers

2 participants