Frontend: verify cosmes fork patches in CI (#367) #871
No reviewers
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic!871
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-367-cosmes-patch-ci-verify"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds a committed SHA-256 gate for the
@goblinhunt/cosmespatch-package file and documents fork/postinstall requirements (#367, parent gap M9 from #361).frontend-dapp/patches/.cosmes-patch-sha256— expected hash ofpatches/@goblinhunt+cosmes+*.patchcosmesPatch127.test.ts— new hash test plus existing symbol checks on patchednode_modulesdist filesdocs/frontend.md— fork rationale, invariants, patch upgrade checklistdocs/testing.mdandskills/AGENTS_*make test-frontendalready runsvitest run, which includescosmesPatch127.test.ts; no separate CI job added.Acceptance checklist
make test-frontend(hash test fails)node_modules/@goblinhunt/cosmeslacks patched symbolssedremovesassertExtensionSignedFeeMeetsExpectedfromKeplrExtension.js→make test-frontendpostinstalland patch upgrade stepsdocs/frontend.md§ Forked cosmesmake test-frontendincludes cosmes patch verificationmake test-frontend(926 tests;cosmesPatch127.test.ts×3)Verification checklist (third parties)
cd frontend-dapp && npm ci— must runpostinstall/patch-package(do not use--ignore-scripts).make test-frontend— all tests pass; confirmcosmesPatch127.test.tsreports 3 passing tests.echo " " >> frontend-dapp/patches/@goblinhunt+cosmes+0.0.71-ghunt.21.patchthen re-run step 2 — expect hash mismatch failure;git checkout --the patch afterward.docs/frontend.md§ Forked cosmes for upgrade procedure when changing the patch or dependency version.changed the description
changed the description
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issue.
Reviewed by Cursor Bugbot for commit
2850dc8296. Configure here.Stale patch may satisfy hash
Medium Severity
findCosmesPatchFilepicks the first@goblinhunt+cosmes*.patchfromreaddirSync, whose order is not guaranteed. After a version bump, an older patch file often remains whilepatch-packageapplies the new one. The SHA-256 test can then hash the untouched stale file and pass even when the active patch changed without updatingpatches/.cosmes-patch-sha256.Reviewed by Cursor Bugbot for commit
2850dc8296. Configure here.Security review — MR !871
Commit reviewed:
2850dc8296a45b6be2f4ad3417f5393c8e2666caScope: Added
patches/.cosmes-patch-sha256, SHA-256 gate incosmesPatch127.test.ts, and operator/docs cross-links for forked@goblinhunt/cosmespatch verification (#367).Outcome:
FINDINGS: 0medium+Summary
This MR is test- and documentation-only relative to production wallet/signing behavior. It strengthens supply-chain integrity by binding the committed patch file to a SHA-256 pin and reusing existing symbol assertions on patched
node_modulesoutput afterpostinstall/patch-package.Reviewed attack surfaces
npm ci)npm ci(no--ignore-scripts); docs correctly warn against skippingpostinstall— pre-existing operational risk, not introduced herePrior review thread (Bugbot — stale patch selection): Re-evaluated.
findCosmesPatchFile()uses non-deterministicreaddirSync().find()and could hash a stale sibling patch during a version bump whilepatch-packageapplies the version-matched file. That is a CI gate robustness gap, not a medium+ exploitable vulnerability on this diff: it requires merge access, a multi-patch upgrade mistake reviewers should catch, and an attacker with write access can update.cosmes-patch-sha256directly. Existing symbol substring checks in the same test file remain the backstop for fee-guard presence. Below the medium+ bar for this security review.Inline threads: None (no medium+ findings).
changed this line in version 2 of the diff
added 1 commit
c0ba255d- fix(frontend): resolve cosmes patch path from lockfile versionCompare with previous version
changed the description
resolved all threads
mentioned in issue #367
mentioned in commit
a88cdb2370