crypto-com / cosmos-sdk-codeql Goto Github PK
View Code? Open in Web Editor NEWA query suite for common bug patterns in Cosmos SDK-based applications
License: Apache License 2.0
A query suite for common bug patterns in Cosmos SDK-based applications
License: Apache License 2.0
Hi,
Thanks for this great repo!
I was recently looking into the beginendblock-panic.ql
and trying to understand it.
In particular, the query uses mayPanic()
as an indicator that the function would panic.
The problem is, however, that mayPanic()
will return true almost always, the only exception being a couple of built-in functions (as discussed in this codeQL issue).
This also means that the beginendblock-panic.ql
will not be precise (because mayPanic()
is not precise).
I believe there is a second problem in the query: namely, calling getParent*
, which repeatedly calls the function getParent
.
The problem is that getParent
is not returning a function call parent, but an AST node parent (where the top ancestor is a file in which the call resides) .
Does this make sense?
In case I got things wrong, please let me know.
The beginendblock rule checks for panics in these ABCI calls. Is there a reason that this check is only performed in these 2 situations? For example, why not in the CheckTx ABCI call?
Thanks!
Hey,
As a part of my thesis I'm scanning live cosmos-sdk chains for possible vulnerabilities, and one way is using these CodeQl rules. However, I am unsure on why using variables called Bech32...
is a vulnerability (like this rule suggests).
A more concrete example: this line in the osmosis repo is being flagged as a warning. I cannot seem to figure out why this would be insecure.
Would you mind explaining it a bit?
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.