Skip to content

Feat/add implicit capability warning #163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

nozim
Copy link

@nozim nozim commented Jul 8, 2023

Closes #16

Description

Add warning for potential Capability leak via public array field.

pub contract MyContract {
    pub let myCapArray: [Capability]
   init() {
       	self.myCapArray = []
   }
}

  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@nozim nozim marked this pull request as draft July 8, 2023 16:22
@nozim nozim marked this pull request as ready for review July 8, 2023 16:22
inspector := pass.ResultOf[analysis.InspectorAnalyzer].(*ast.Inspector)

location := pass.Program.Location
//elaboration := pass.Program.Elaboration
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be remove the commented code.

@turbolent
Copy link
Member

@nozim given that #176 subsumes this PR, could you please close this PR?

@nozim
Copy link
Author

nozim commented Aug 2, 2023

Closing due to merge to #176

@nozim nozim closed this Aug 2, 2023
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.

[Linter] Warn user about capabilities stored inside public arrays or dictionaries
3 participants