Skip to content

feat(x/gov): reject proposals with self-executing authz.MsgExec messages (granter == grantee == authority) - #106

Merged
giunatale merged 2 commits into
mainfrom
giunatale/submit-proposal-authz-msgexec
Jun 29, 2026
Merged

feat(x/gov): reject proposals with self-executing authz.MsgExec messages (granter == grantee == authority)#106
giunatale merged 2 commits into
mainfrom
giunatale/submit-proposal-authz-msgexec

Conversation

@giunatale

Copy link
Copy Markdown
Collaborator

This PR adds inspection of proposals at SubmitProposal time to detect and reject nested authz.MsgExec msgs that are "self-executing" i.e. where granter == grantee == authority.

The authz module accepts MsgExec where granter == grantee automatically without the need for an existing grant. In the case of gov proposals, where authority is the only designated account that can execute proposal msgs, such proposals serve no purpose and can actually result in a bypass of existing rules and logic that inspect proposals such as pass threshold determination based on the proposal kind (amendment, law, ...)

A maximum depth constant (set at 8 at the time of this PR) bounds the maximum nesting depth and result in rejection if this threshold is exceeded.

Comment thread x/gov/types/v1/msgs.go
@giunatale
giunatale merged commit e4628cd into main Jun 29, 2026
21 checks passed
@giunatale
giunatale deleted the giunatale/submit-proposal-authz-msgexec branch June 29, 2026 06:58
giunatale added a commit to atomone-hub/atomone that referenced this pull request Jun 29, 2026
This PR removes the dependency on atomone `x/gov` wrapper from
`x/coredaos` in favor of using the atomone-sdk `x/gov`.

This work alongside atomone-hub/atomone-sdk#106
is a prerequisite for a future-coming PR that does some further
cleaning/refactoring.
giunatale added a commit to atomone-hub/atomone that referenced this pull request Jun 30, 2026
…oredaos gov hook (#354)

Now that the atomone-sdk rejects self-executing `authz.MsgExec`
proposals at submission (atomone-hub/atomone-sdk#106), the AtomOne-side
logic that existed to catch `MsgExec`-wrapped governance abuse is
redundant. This PR consolidates the AtomOne-side proposal-submission
checks accordingly:

- moves the **oversight-DAO bundling prevention** out of the ante and
into a coredaos gov `AfterProposalSubmission` hook
- deletes the `GovSubmitProposalDecorator` ante
- drops the dead `MsgExec`-flattening helper that only existed to see
through wrapped proposal messages
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.

3 participants