Skip to content

Potential fix for code scanning alert no. 27: Prototype-polluting assignment#42

Open
vNodesV wants to merge 44 commits intovNodesV-patch-1from
alert-autofix-27
Open

Potential fix for code scanning alert no. 27: Prototype-polluting assignment#42
vNodesV wants to merge 44 commits intovNodesV-patch-1from
alert-autofix-27

Conversation

@vNodesV
Copy link
Owner

@vNodesV vNodesV commented Feb 15, 2026

Potential fix for https://github.com/vNodesV/meme/security/code-scanning/27

To fix the problem in general, we must ensure that untrusted strings are not used directly as property names on plain objects when they can be __proto__, constructor, or prototype. Typical approaches are: (1) reject such keys explicitly, (2) prefix keys with a safe constant, or (3) use a Map or a prototype-less object (via Object.create(null)) as the backing store.

The single best minimal-change fix here is to guard the QUERY mutation so it refuses to operate if query is one of the dangerous names. This keeps the data structure (state) and all existing use sites intact, and it does not change the format of stored keys, so it won’t break other code that reads from state[query]. Concretely, in vue/src/store/generated/cosmos/ibc-go/ibc.core.connection.v1/index.ts, inside mutations: { ... QUERY(...) { ... }}, add a small helper to check whether query is "__proto__", "constructor", or "prototype", and early-return if so. The guard should be the first statement in the QUERY body, before any access like state[query]. No new imports are needed.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

vNodesV and others added 30 commits February 12, 2026 12:58
…governance proposal

The node failed to start with 'UPGRADE "sdk50" NEEDED at height: 1000' because
the on-chain upgrade proposal used the name "sdk50" but the code registered the
handler as "v2-sdk50". This name mismatch prevented:
1. The upgrade handler from matching and executing
2. The UpgradeStoreLoader from adding new store keys (Consensus, crisis)
3. The consensus params migration from running (causing "collections: not found" errors)

Co-authored-by: vNodesV <100853686+vNodesV@users.noreply.github.com>
Fix upgrade name mismatch: "v2-sdk50" → "sdk50"
…ion panic

During SDK 0.47→0.50 upgrade, bank Migrate3to4 panics with
"parameter SendEnabled not registered" because initParamsKeeper
created subspaces without WithKeyTable(). Added ParamKeyTable
registration for auth, bank, staking, mint, distribution,
slashing, gov (v1), and crisis modules. Also added govv1 import.

Co-authored-by: vNodesV <100853686+vNodesV@users.noreply.github.com>
Register legacy ParamKeyTable on module subspaces for SDK 0.50 migration
- Added ibcclienttypes import to app/app.go
- Registered IBC client ParamKeyTable in initParamsKeeper
- Fixes panic: parameter AllowedClients not registered
- Build and install verified successfully

Co-authored-by: vNodesV <100853686+vNodesV@users.noreply.github.com>
…erns

- Created IBC_PARAMS_FIX.md with comprehensive issue analysis
- Updated jarvis3.0.agent.md with session summary and findings
- Added critical params subspace registration pattern to agent directive
- Stored memories for IBC client params migration pattern
- Documents why WithKeyTable() is required for modules with legacy params

Co-authored-by: vNodesV <100853686+vNodesV@users.noreply.github.com>
- Created SESSION_SDK50_UPGRADE_FIX.md - Complete session summary
- Created PARAMS_MIGRATION_TROUBLESHOOTING.md - Quick reference guide
- Documents all issues, fixes, patterns, and verification steps
- Provides templates and checklists for future troubleshooting
- Ready for devnet upgrade testing

Co-authored-by: vNodesV <100853686+vNodesV@users.noreply.github.com>
- Created SDK50_FIX_INDEX.md as central navigation hub
- Links to all troubleshooting guides and documentation
- Includes statistics, commit history, and quick reference
- Provides clear documentation structure and next steps
- Session complete: all issues resolved and documented

Co-authored-by: vNodesV <100853686+vNodesV@users.noreply.github.com>
Fix SDK 0.50 upgrade panic: register IBC client params subspace
Co-authored-by: vNodesV <100853686+vNodesV@users.noreply.github.com>
Co-authored-by: vNodesV <100853686+vNodesV@users.noreply.github.com>
Fix consensus params migration panic in SDK 0.50 upgrade handler
Co-authored-by: vNodesV <100853686+vNodesV@users.noreply.github.com>
Remove invalid AddressCodec field assignments from client.Context
Copilot AI and others added 14 commits February 12, 2026 22:31
Co-authored-by: vNodesV <100853686+vNodesV@users.noreply.github.com>
…rror

Configure address codecs in InterfaceRegistry for SDK 0.50 transaction signing
…nfig and update NewRootCmd to set prefixes before encoding config creation
… v2.2.1 migration, including Visual Upgrade Status, Complete Migration Guide, Fixes Applied, and Index files. This cleanup eliminates outdated references and prepares the repository for future updates.
Updated project title and description for clarity.
Revise README title and project description
…ignment

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@vNodesV vNodesV marked this pull request as ready for review February 15, 2026 20:04
Copilot AI review requested due to automatic review settings February 15, 2026 20:04
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.

@vNodesV vNodesV changed the base branch from main to vNodesV-patch-1 February 15, 2026 20:05
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