Repository navigation
feat(sep): add SEP-5, SEP-17, Soroban arg-flow, auth config inspectors - #252
Merged
Merged
Conversation
Adds four read-only inspection commands: - sep5-derivation-audit (ISSUE-148): validates SEP-5 BIP-44 derivation paths (m/44'/148'/...) against the spec, with optional wallet-profile comparison (stellar-default, ledger, trezor). Never derives, requests, or echoes private keys or mnemonics. Wallet compatibility is always reported as inconclusive. - sep17-metadata-inspect (ISSUE-149): SEP-17 has no published schema in the Stellar SEP numbering. Always emits SEP17_UNPUBLISHED_SPEC (inconclusive), performs structural sanity only, and redirects to asset-metadata-audit (SEP-1) / contract-spec-audit (SEP-41). Never claims authenticity. - soroban-arg-audit (ISSUE-150): summarizes nested ScVal argument structure (depth, breadth, per-level types), detects excessive nesting, and optionally compares against a contract interface loaded via contract-spec-audit. Type-level validation is delegated to the existing soroban-arg-validator (reported as TYPE_VALIDATION_DELEGATED inconclusive finding on every run). - auth-config-audit (ISSUE-151): inspects Horizon and Soroban RPC connection configuration. Validates URL syntax, flags HTTP under production policy, detects embedded URL credentials (redacted), reports CLI/env conflicts, and reports whether an API key is configured (value never echoed). Never makes a network request; missing credentials are never treated as misconfiguration (AUTH_REQUIREMENT_UNKNOWN inconclusive finding). All four commands are read-only. Findings use the severity classification (error | warning | info | inconclusive) established in the previous SEP compliance packs. Redaction of sensitive values is enforced by unit tests. Closes Dantama022#193 Closes Dantama022#192 Closes Dantama022#191 Closes Dantama022#190
|
@Izebby Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds four read-only inspection commands covering SEP-5 derivation paths, SEP-17 metadata (unpublished spec), Soroban argument structure, and Horizon/Soroban RPC authentication configuration.
sep5-derivation-auditsep17-metadata-inspectSEP17_UNPUBLISHED_SPEC(inconclusive) and redirects to SEP-1 / SEP-41.soroban-arg-auditsoroban-arg-validatorandsimulate-tx. Reports nested ScVal structure only.auth-config-auditCloses #193
Closes #192
Closes #191
Closes #190
Files
New (17):
src/services/sep5-derivation-path-audit.tssrc/services/sep17-metadata-audit.tssrc/services/soroban-arg-flow-audit.tssrc/services/auth-config-audit.tssrc/output/sep5-derivation-path-audit-report.tssrc/output/sep17-metadata-audit-report.tssrc/output/soroban-arg-flow-audit-report.tssrc/output/auth-config-audit-report.tssrc/cli/commands/sep-compliance-3.tstests/sep5-derivation-path-audit.test.tstests/sep17-metadata-audit.test.tstests/soroban-arg-flow-audit.test.tstests/auth-config-audit.test.tsdocs/sep5-derivation-path-audit.mddocs/sep17-metadata-audit.mddocs/soroban-arg-flow-audit.mddocs/auth-config-audit.mdModified (1):
src/cli/index.ts— 2-line addition (import+registerSepCompliance3Commands(program)).Design decisions worth highlighting
1. SEP-5 derivation audit — no key material processed
The service operates only on the supplied path STRING. It emits
NO_KEY_MATERIAL_PROCESSED(info) on every run to make this explicit, and the test suite asserts that the serialized output contains noprivate_key,mnemonic,seed phrase, orsecretsubstrings.Wallet compatibility is always reported as
WALLET_COMPATIBILITY_NOT_VERIFIED(inconclusive) — a valid path does not prove that any wallet can derive or access a specific account.2. SEP-17 — same pattern as SEP-3, SEP-11, SEP-13, SEP-14
SEP-17 has no published schema. The command exists, runs, performs structural sanity, and emits a top-level
SEP17_UNPUBLISHED_SPECinconclusive finding on every invocation. It redirects users to the two actual specs that cover the intent:stellar.toml[[CURRENCIES]]→asset-metadata-auditcontract-spec-auditASSET_AUTHENTICITY_NOT_VERIFIEDis always emitted as inconclusive. The test suite asserts the output does not contain"compliant":true,"trustworthy":true, or"authorized":true.3. Soroban arg-flow audit — explicit non-duplication
The service does not re-implement any of
soroban-arg-validator's logic (type checks, missing/extra argument findings, encoding failures). It reports nested ScVal structure only and emitsTYPE_VALIDATION_DELEGATED(inconclusive) on every run to make the delegation explicit. The docs and the PR description both spell out the delegation boundary.Only one RPC call is made (via
contract-spec-audit→getLedgerEntries), and only when--contract-id+--function-nameare supplied.4. Auth config audit — no network, no credential echo
The service reads env vars (default
process.env) and optional CLI overrides. It never callsfetch. Embedded URL credentials are detected vianew URL(...).username/.passwordand only their PRESENCE is reported; the values are never included in any finding, and the test suite asserts the raw values don't appear in the serialized output.Under
--policy production(the default), HTTP endpoints and embedded credentials areerror. Under--policy development, they arewarning. A missing credential is never treated as a misconfiguration — many Horizon and Soroban RPC deployments are public.AUTH_REQUIREMENT_UNKNOWNis always emitted as inconclusive.Testing
npm run typecheck npm run lint npm test npm run build