Skip to content

fix: close security and compatibility gaps - #10

Merged
kalepail merged 4 commits into
mainfrom
fix/final-closeout-2026-09-08
Sep 8, 2026
Merged

fix: close security and compatibility gaps#10
kalepail merged 4 commits into
mainfrom
fix/final-closeout-2026-09-08

Conversation

@kalepail

@kalepail kalepail commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Cap Stellar SDK support at ^16.3.0.
  • Require user verification and validated P-256 registration keys.
  • Separate generic signing from bound administrative signing.
  • Fix Soroban map ordering, expiry, and XDR accessors.
  • Harden relayer validation, CORS, hashes, and fee limits.
  • Update dependencies, CI gates, documentation, and demos.
  • Install the Stellar CLI before the binding parity gate.

Verification

  • pnpm install --frozen-lockfile
  • pnpm test --run passes 457 tests.
  • Relayer tests pass 39 tests.
  • Indexer demo tests pass 4 tests.
  • Both demo builds pass.
  • pnpm verify:bindings passes locally and in CI.
  • pnpm pack --dry-run passes.
  • Muse gives a final PASS.

Known low advisory

The optional wallet kit includes elliptic@6.6.1 through Hot Wallet.
No patched elliptic release exists.
SECURITY.md documents this advisory.
CI rejects advisories at moderate severity or higher.

Copilot AI balanced review requested due to automatic review settings September 8, 2026 17:50
@socket-security

socket-security Bot commented Sep 8, 2026

Copy link
Copy Markdown

@socket-security

socket-security Bot commented Sep 8, 2026

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
License policy violation: npm @img/sharp-libvips-darwin-arm64 under LGPL-3.0-or-later

Location: Package overview

From: pnpm-lock.yamlnpm/wrangler@4.130.0npm/@img/sharp-libvips-darwin-arm64@1.3.0

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@img/sharp-libvips-darwin-arm64@1.3.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm @img/sharp-libvips-darwin-x64 under LGPL-3.0-or-later

Location: Package overview

From: pnpm-lock.yamlnpm/wrangler@4.130.0npm/@img/sharp-libvips-darwin-x64@1.3.0

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@img/sharp-libvips-darwin-x64@1.3.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm @img/sharp-libvips-linux-arm under LGPL-3.0-or-later

Location: Package overview

From: pnpm-lock.yamlnpm/wrangler@4.130.0npm/@img/sharp-libvips-linux-arm@1.3.0

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@img/sharp-libvips-linux-arm@1.3.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm @img/sharp-libvips-linux-arm64 under LGPL-3.0-or-later

Location: Package overview

From: pnpm-lock.yamlnpm/wrangler@4.130.0npm/@img/sharp-libvips-linux-arm64@1.3.0

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@img/sharp-libvips-linux-arm64@1.3.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm @img/sharp-libvips-linux-ppc64 under LGPL-3.0-or-later

Location: Package overview

From: pnpm-lock.yamlnpm/wrangler@4.130.0npm/@img/sharp-libvips-linux-ppc64@1.3.0

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@img/sharp-libvips-linux-ppc64@1.3.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm @img/sharp-libvips-linux-riscv64 under LGPL-3.0-or-later

Location: Package overview

From: pnpm-lock.yamlnpm/wrangler@4.130.0npm/@img/sharp-libvips-linux-riscv64@1.3.0

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@img/sharp-libvips-linux-riscv64@1.3.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm @img/sharp-libvips-linux-s390x under LGPL-3.0-or-later

Location: Package overview

From: pnpm-lock.yamlnpm/wrangler@4.130.0npm/@img/sharp-libvips-linux-s390x@1.3.0

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@img/sharp-libvips-linux-s390x@1.3.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm @img/sharp-libvips-linux-x64 under LGPL-3.0-or-later

Location: Package overview

From: pnpm-lock.yamlnpm/wrangler@4.130.0npm/@img/sharp-libvips-linux-x64@1.3.0

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@img/sharp-libvips-linux-x64@1.3.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm @img/sharp-libvips-linuxmusl-arm64 under LGPL-3.0-or-later

Location: Package overview

From: pnpm-lock.yamlnpm/wrangler@4.130.0npm/@img/sharp-libvips-linuxmusl-arm64@1.3.0

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@img/sharp-libvips-linuxmusl-arm64@1.3.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm @img/sharp-libvips-linuxmusl-x64 under LGPL-3.0-or-later

Location: Package overview

From: pnpm-lock.yamlnpm/wrangler@4.130.0npm/@img/sharp-libvips-linuxmusl-x64@1.3.0

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@img/sharp-libvips-linuxmusl-x64@1.3.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm @img/sharp-wasm32

Location: Package overview

From: pnpm-lock.yamlnpm/wrangler@4.130.0npm/@img/sharp-wasm32@0.35.0

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@img/sharp-wasm32@0.35.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm @img/sharp-win32-arm64

Location: Package overview

From: pnpm-lock.yamlnpm/wrangler@4.130.0npm/@img/sharp-win32-arm64@0.35.0

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@img/sharp-win32-arm64@0.35.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm @img/sharp-win32-ia32

Location: Package overview

From: pnpm-lock.yamlnpm/wrangler@4.130.0npm/@img/sharp-win32-ia32@0.35.0

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@img/sharp-win32-ia32@0.35.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm @img/sharp-win32-x64

Location: Package overview

From: pnpm-lock.yamlnpm/wrangler@4.130.0npm/@img/sharp-win32-x64@0.35.0

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@img/sharp-win32-x64@0.35.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: npm @trezor/connect-plugin-stellar under LicenseRef-T-RSL

License: LicenseRef-T-RSL - The applicable license policy does not permit this license (5) (package/LICENSE.md)

From: pnpm-lock.yamlnpm/@trezor/connect-plugin-stellar@10.0.0-alpha.1

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@trezor/connect-plugin-stellar@10.0.0-alpha.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR tightens the SDK and relayer security model while locking compatibility to Stellar SDK 16.3.x (avoiding the Stellar SDK 17 auth API changes). It introduces stricter WebAuthn requirements, separates “generic” signing from “administrative/mutation” signing, and hardens relayer-proxy validation and fee limits.

Changes:

  • Enforce stricter passkey/WebAuthn behavior (user verification required; require and validate browser-provided P-256 public keys).
  • Split transaction signing into non-admin vs admin flows and bind admin authorization roots to the exact transaction host function.
  • Harden relayer client/proxy validation (explicit success flag, validated tx hash, missing-account parsing, total-fee ceiling) and update dependency/CI/documentation accordingly.

Reviewed changes

Copilot reviewed 53 out of 55 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/validation.ts Rejects default deployer as a delegated signer.
src/validation.test.ts Adds coverage for delegated default deployer rejection.
src/utils.ts Hardens WebAuthn public-key extraction (require response.publicKey, validate P-256 point).
src/utils.test.ts Adds tests for missing/publicKey validation and malformed/off-curve keys.
src/types.ts Clarifies semantics of omitted isPrimary.
src/relayer.ts Requires explicit { success: true } relayer responses.
src/relayer.test.ts Updates relayer response expectations to fail-closed without success.
src/managers/multi-signer-manager.ts Adds admin vs generic multi-signer paths and wallet-mutation binding/expiry handling.
src/managers/multi-signer-manager.test.ts Tests generic refusal of wallet mutations and admin host-function binding.
src/managers/context-rule-manager.ts Sorts policy maps before submitting rule mutations.
src/managers/context-rule-manager.test.ts Updates test data for policy map ordering expectations.
src/kit/webauthn-ops.ts Requires user verification; enforces wallet-mutation intent checks and contract binding during signing.
src/kit/webauthn-ops.test.ts Verifies userVerification enforcement and expiration handling behavior.
src/kit/wallet-ops.ts Requires user verification during connect/auth flows.
src/kit/tx-ops.ts Validates relayer tx hash; adds admin host-function binding options to signing paths.
src/kit/tx-ops.test.ts Adds relayer hash validation coverage and admin-signing operation constraints.
src/kit/policies-ops.ts Adds sortPolicyMap() and typed invalid-policy-address validation.
src/kit/policies-ops.test.ts Adds ordering tests and ValidationError coverage for invalid addresses.
src/kit/context-rules.ts Updates CreateContract/CreateContractV2 WASM hash extraction to SDK 16 accessors.
src/kit/context-rules.test.ts Adds CreateContractV2 WASM-hash extraction test coverage.
src/kit/auth-payload.ts Adds wallet-mutation detection/binding (assertWalletMutationIntent).
src/kit/auth-payload.test.ts Tests refusal/acceptance rules for mutation intent binding.
src/kit.ts Adds signAdmin / signAndSubmitAdmin; routes internal signing through signAuthEntryInternal.
src/kit.test.ts Adds admin host-function binding tests and verifies internal options are not accepted via public API.
src/indexer.ts Updates indexer provider wording (Mercury) and token expectations text.
src/index.ts Adjusts export grouping comment (display helpers).
src/execute.test.ts Updates execute helper expectations to use admin submit method.
src/builders.ts Renames comment section to “Display Helper Functions”.
SECURITY.md Documents known low-severity elliptic@6.6.1 advisory and CI audit policy.
relayer-proxy/wrangler.toml Adds MAX_TOTAL_FEE_STROOPS config.
relayer-proxy/worker-configuration.d.ts Adds MAX_TOTAL_FEE_STROOPS typing for Worker env.
relayer-proxy/src/index.ts Adds total-fee ceiling enforcement, improves CORS allow-headers, and hardens missing-account extraction.
relayer-proxy/src/index.test.ts Adds tests for total-fee ceiling, preflight headers, and missing-account parsing validity.
relayer-proxy/src/constants.ts Updates address length constant and adds default total-fee ceiling.
relayer-proxy/README.md Updates feature list and config docs for total-fee ceiling and wording.
relayer-proxy/package.json Pins Stellar SDK ^16.3.0 and updates dependencies.
relayer-proxy/.dev.vars.example Adds MAX_TOTAL_FEE_STROOPS local override.
README.md Updates installation + API docs for SDK 16.3 cap and new admin signing methods.
packages/smart-account-kit-bindings/README.md Pins Stellar SDK install guidance to ^16.3.0.
packages/smart-account-kit-bindings/package.json Caps peer dependency on Stellar SDK to ^16.3.0.
package.json Caps Stellar SDK, updates toolchain deps, tightens wallet-kit peer range, adds override pins.
indexer/README.md Updates schema wording (schema-1 rejection and schema-2 completeness).
indexer/demo/package.json Pins Stellar SDK to 16.3.0 and updates test/build deps.
docs/security-deterministic-deployer.md Updates terminology around “unverified” predictions and schema handling.
docs/migration-v0.7.0.md Updates migration wording about schema-1/incomplete credential responses.
docs/migration-smart-account-kit-v0.7.0-rc.2.md Removes obsolete historical migration record.
demo/src/hooks/useMultiSignerSubmit.ts Routes mutation submissions through admin signing paths.
demo/src/components/index.ts Stops re-exporting deprecated demo helper.
demo/src/components/ContextRulesPanel.tsx Uses admin signing paths for rule mutations.
demo/src/components/ContextRuleBuilder.tsx Removes local policy sorting (now handled by SDK).
demo/src/components/ActiveSignerDisplay.tsx Removes backwards-compat re-export.
demo/package.json Pins Stellar SDK and wallet kit versions; updates React/tooling versions.
CHANGELOG.md Documents breaking security changes, fixes, and maintenance work under Unreleased.
.github/workflows/ci.yml Adds audit gate, bindings verification, pack dry-run, and diff whitespace checks; narrows permissions.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/kit/webauthn-ops.ts
Copilot AI review requested due to automatic review settings September 8, 2026 17:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 53 out of 55 changed files in this pull request and generated no new comments.

Suppressed comments (2)

Previously missed (2) — in code that hasn't changed since the last review.

src/kit/webauthn-ops.ts:145

  • signAuthEntry() throws a generic Error when the provided auth entry is not for the connected smart account. Since this is user-controlled input on a public API surface, consider throwing a typed ValidationError (e.g. INVALID_INPUT) so callers can branch on error codes consistently.
    src/utils.ts:209
  • extractPublicKeyFromAttestation() throws generic Errors for invalid/missing keys and missing WebCrypto. The rest of this module already uses ValidationError/SmartAccountErrorCode; using a typed error here would make failures consistent and machine-checkable for callers (and matches the README claim that non-submission methods throw typed errors).

Copilot AI review requested due to automatic review settings September 8, 2026 18:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 53 out of 55 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings September 8, 2026 18:06
@kalepail
kalepail merged commit 249d80f into main Sep 8, 2026
7 checks passed
@kalepail
kalepail deleted the fix/final-closeout-2026-09-08 branch September 8, 2026 18:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 53 out of 55 changed files in this pull request and generated no new comments.

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.

2 participants