This document completes the security work of epic #166, alongside the adversarial test suite (running in CI since #191) and the STRIDE threat model (#170). It records what three security tools found against the codebase on 2026-09-02 and gives every critical, high, and medium finding a resolution or an explicit accepted-risk rationale, never a silent backlog entry. Self-assessed. Written by the LumenWipe maintainers, not by an outside reviewer. Published security reports are listed at lumenwipe.com/security/reports.
Status as of 2026-10-30. Sections 1 to 6 record the 2026-09-02 pass, Section 7 the 2026-09-29
refresh, Section 8 the 2026-10-13 pass (commit d1ab2cb) and Section 9 the 2026-10-30 dependency refresh; findings, counts and versions are as of
those dates, not live. Next refresh: see Section 10.
1. Scope and method
Three tool categories, run againstchore/security-tooling-remediation-171 (branched from
feature/phase-2 at commit 28287a6):
- Dependency audit -
bun audit(Bun 1.3.11’s native advisory scanner) across the full workspace lockfile. - Static analysis -
semgrep1.175.0, rule packsp/security-audit,p/typescript,p/javascript,p/secrets, againstapps/andpackages/(excludingnode_modules,.next,dist). - Secret scanning -
gitleaks8.30.1 against the full git history (352 commits), not just the working tree, since a since-rotated secret in an old commit is still an exposure.
bun pm why), and where the code could plausibly
ship to a browser, the production bundle was inspected directly for its presence. This mirrors the
method the threat model uses for its own residual-risk table (now Section 11) - a
mitigation or an acceptance is only as good as the evidence behind it.
Out of scope: a third-party penetration test or formal audit, which has not been done.
2. Dependency audit
bun audit started at 78 advisories across 25 packages (1 critical, 36 high, 34 moderate, 7
low). Three rounds of remediation:
Fixed.
bun update, run per workspace (the root-level command alone does not descend into
nested workspaces), absorbed already-compatible patched versions with no package.json change:
this alone cleared the critical finding (protobufjs, see below) and every next.js advisory
(^15.5.19 → resolved 15.5.25, past the 15.5.21 fix line). A further round added five targeted
entries to the root overrides map (the same mechanism already pinning @stellar/stellar-sdk and
postcss), because these packages are pulled in by dependencies that pin them exactly rather than
by range:
Verified safe:
bun run type-check && bun run lint && bun run test all pass across the full
workspace after every change (1,181 tests, 0 failures, as of 2026-09-02; the count changes with every commit), and bun run format:check is clean (the
prettier devDependency bump pulled in by the same bun update reflowed six files’ comments -
purely cosmetic, no logic changed, included in this PR).
Accepted risk, with evidence. Every remaining package was traced to its actual reachability,
not assumed safe by severity:
Ongoing cadence.
renovate.json runs a weekly dependency scan, and a fix for a Dependabot alert
on any datasource skips that schedule: Renovate always opens vulnerability PRs at once, and the
top-level vulnerabilityAlerts object gives them their own unlimited concurrency budget
(prConcurrentLimit: 0), outside the limit of one regular PR. So this isn’t a one-off - future
advisories on these same packages get picked up automatically. This document
records a point-in-time baseline the ongoing cadence builds on, not a substitute for it.
3. Static analysis
semgrep with p/security-audit, p/typescript, p/javascript, p/secrets (127 rules, 311
files) found one finding, fixed in this PR:
javascript.node-crypto.security.gcm-no-tag-length in apps/playground/lib/crypto.ts:38
(now line 44) - createDecipheriv("aes-256-gcm", ...) was called without an explicit
authTagLength, which the rule flags on principle: an implicit tag length can, in some
configurations, allow a truncated-tag forgery. In this specific case Node’s implicit default for
GCM is already 16 bytes (the correct, secure value) and setAuthTag already rejects any tag that
isn’t exactly that length, so this was not an active vulnerability - but making it explicit
removes any ambiguity for a future refactor and closes the finding outright. Fixed by passing
{ authTagLength: 16 } to both createCipheriv and createDecipheriv in
apps/playground/lib/crypto.ts; the existing round-trip test suite
(apps/playground/tests/unit/crypto.test.ts) still passes unchanged. Re-run after the fix: 0
findings.
No security-specific ESLint rules exist in this repo today (.eslintrc.json files use only
eslint:recommended + @typescript-eslint/recommended), so this scan is new signal rather than
overlap with CI’s existing lint job - worth re-running on a similar cadence going forward
(Section 6).
4. Secret scanning
gitleaks against the full 352-commit history found 32 raw hits, collapsing to a handful of
distinct values after triage:
Finding, fixed - traced to its source. A syntactically valid Stellar secret key
(SCZANGBA5YHTNYVVV4C3U252E2B6P6F5T3U6MM63WBSBZATAQI3EBTQ4) was committed as test-fixture
plaintext in apps/playground/tests/unit/crypto.test.ts (and an earlier path,
tests/unit/playground-crypto.test.ts). It derives to
GC2BKLYOOYPDEFJKLKY6FNNRQMGFLVHJKQRGNSSRRGSMPGF32LHCQVGF, which - verified via a read-only
Horizon query, no on-chain action taken - holds real balances on both mainnet (~16.13 XLM plus a
second asset) and testnet (~10,088 XLM plus two assets), with a pattern of recurring inbound
payments through mid-2026.
Traced the source before treating this as an incident: this is not a private key of unknown
origin. GitHub code search puts the exact same secret key in 142 files across at least 11 public
repositories, including stellar/stellar-docs itself - it is the “AstroDollar” issuer account
hardcoded into the official “How to Issue an
Asset” tutorial’s full code
sample (JS, Python, and Java versions alike), copied from there into SDK examples and demo projects
across the ecosystem (Soneso’s multi-language SDKs, a Kuknos fork, a Kinesis SDK fork, and several
independent tutorial-following projects). It was never a secret - it is deliberately public,
widely-republished documentation material, which is almost certainly why it accumulated real
balances on both networks over time (people running the tutorial, not a personal wallet being
compromised).
That provenance changes the framing but not the fix: using a real, checksum-valid keypair - even a
publicly-known one - as test fixture data was still the wrong move, for the same reason
CLAUDE.md’s new convention (below) states plainly - a secret scanner can’t tell “famous public
example key” from “leaked production secret” from the string alone, and neither should a reviewer
have to. The test never needed a valid Stellar key at all - encryptSecret/decryptSecret
round-trip arbitrary strings - so the fixture is now a plaintext string that is deliberately not
a valid strkey (playground-crypto-test-fixture-not-a-real-secret-000000), removing any future
ambiguity. This fixes the fixture going forward; the key remains visible in the specific historical
commits that introduced and later moved it in this repository’s own history. Given it’s a
publicly-known documentation example rather than a private exposure, a git history rewrite to strip
it isn’t warranted on security grounds - those historical fingerprints are recorded, not hidden, in
.gitleaksignore (with a comment explaining exactly why), so a future scan stays actionable for
genuinely new findings instead of re-surfacing this one every time.
False positives, reviewed and allowlisted (.gitleaks.toml):
- Six high-entropy
"C..."strings inapps/api/tests/unit/fixtures/octopos/empty-portfolio.json(tokenShareAddress,token0,token1,tokenA,tokenB,shareToken) are Soroban contract/asset addresses - public identifiers by construction, not secrets - inside an entirely synthetic OctoPos DeFi-position fixture. Allowlisted by path. polar=key_xyzin a doc comment (apps/api/src/auth/api-key.service.ts) and its matching test is a worked example of theAPI_KEYS=label=keyenv-var format, not a real credential. Allowlisted by pattern.- Stellar account (
G...) and contract (C...) addresses in tests and fixtures, flagged bygeneric-api-keyonce the exit-adapter work added many of them (45 hits on 2026-09-29, all 56- character public identifiers). Allowlisted by an anchored pattern that matches only a wholeG/Caddress, never a secret seed (S...).
gitleaks detect --config .gitleaks.toml reports no leaks found.
Separately, and independent of any code fix in this PR: this public repository had GitHub’s
native secret scanning, secret scanning push protection, and Dependabot security updates all
disabled when this run started. All three are now enabled (confirmed via
gh api repos/LumenWipe/lumenwipe - security_and_analysis.secret_scanning.status: "enabled",
secret_scanning_push_protection.status: "enabled", dependabot_security_updates.status: "enabled"), giving this point-in-time scan a continuous counterpart going forward.
5. Cross-reference against the STRIDE threat model
Every accepted risk above was checked against the four surfaces the threat model already identifies as sensitive: client-side key handling, the client-side session layer, API transaction construction, and the two backend signing keys (mediator co-sign, fee-bump sponsor). None of this run’s findings touch those surfaces:- The wallet-connector chain (
protobufjs/elliptic/uuid) is adjacent to - but outside - Surface 1 (key handling): it’s optional wallet-kit modules never imported, not the signing path itself. js-yaml,multer,file-type,sharp,ajv,qs, and the build-tooling group sit entirely outside API transaction construction and the session layer.- The leaked test key belongs to
apps/playground, a deliberately separate, isolated demo app (CLAUDE.md: “never imports [production’s] closing modules”) - it is not one of the two production backend signing keys the threat model covers.
6. Follow-up
What this run changed beyond code, and what’s still open:- GitHub-native secret scanning, push protection, and Dependabot security updates are now enabled on this repository (Section 4) - confirmed and applied as part of this run, giving this point-in-time scan a continuous counterpart going forward.
@nestjs/coremoderate injection advisory (Section 2) is resolved: the API now runs Nest 11 (@nestjs/core11.2.3, past the<=11.1.17range). See Section 7.- Static analysis and secret scanning now run in CI (#315). Every PR and every push to
mainruns Semgrep with the same four rule packs as Section 3, gitleaks over the full history as in Section 4, and CodeQL (javascript-typescriptandactions,security-extendedqueries), all feeding the requiredtype-check · lint · testgate. A Semgrep or gitleaks finding fails the PR; CodeQL findings land in the repository’s Security tab. The dependency audit is a gate too: theauditjob fails on any high or critical advisory not inscripts/audit-allowlist.json, where each accepted entry carries a reason and an expiry. - Test fixtures never use a real, checksum-valid secret key - even a publicly-known one, per
the finding in Section 4 - is now a standing convention in
CLAUDE.md, so this class of finding doesn’t recur.
7. Refresh (2026-09-29)
Same three tools, re-run onfeature/phase-3 at 980aae4, which adds the Phoenix and FxDAO exit
adapters and the Nest 11 migration since Section 1.
Static analysis and secrets. Semgrep (same four packs): 0 findings. gitleaks over the history
reachable from HEAD: no leaks, after allowlisting public Stellar G/C addresses in tests and
fixtures (Section 4). Both now run in CI on every PR (Section 6, item 3), as does CodeQL: 0 alerts.
Dependency audit. bun audit went from 39 advisories across 15 packages (25 high, 10
moderate, 4 low) to 2 (1 moderate, 1 low). Ten packages were fixed with root overrides,
because each is pinned exactly or held back by a dependency’s range:
Three more were only held back by the lockfile, inside ranges their dependents already accept, and
were moved to the patched release in
bun.lock directly (a plain bun update re-resolves the whole
tree, far beyond this change): js-yaml 3.14.2 → 3.15.2 (gray-matter) and 4.1.1 → 4.3.2 (ESLint,
cosmiconfig), brace-expansion 1.1.14 → 1.1.21 and 5.0.6 → 5.0.12 (minimatch), and the two
ajv 8.12.0 copies under webpack’s schema-utils → 8.20.0. bun install --frozen-lockfile
verifies every edited entry against its published integrity hash.
None of these was reachable before the fix (same method as Section 2: the API registers only
express.json(), Express 5 parses query strings without qs, no route accepts uploads, no code
resolves a stellar.toml, and the rest is build tooling or code absent from the web bundle). They
were fixed because the fix was a compatible bump. Type-check, lint, all 1,917 unit tests, every
workspace build and the SDK’s API report pass after the change, and the API image boots and answers
/health.
Accepted risk. Two advisories remain, neither with a usable fix:
8. Tooling pass (2026-10-13)
The first pass run withbun run security:scan (Section 10). It ran on commit d1ab2cb, which is main at
7f07aeb plus the script itself, in the pull request that added it; the squash merge gives that change a
different hash on main. The counts and every finding below come from that run’s report; reports stay local
(Section 10), so re-running the script on that commit reproduces it, apart from rule packs and advisories
published since.
Semgrep reported one analysis error: a partial parse of
packages/sdk/src/index.ts at line 12,
export type * from "@lumenwipe/types". The file holds only re-exports, so no rule had logic to miss there. The
js-yaml advisories of Section 7 no longer appear: the lockfile moves recorded there cleared them.
Every high and medium finding. No override can fix any of them: each one either has no patched release or
needs a major version its only consumer does not accept. So nothing in package.json or bun.lock changed in
this pass. Each was traced with bun pm why, and the web app’s production build (next build on this commit)
was searched for the package and its identifiers. None of them appears in the client or server output. None reaches the API image either: the only paths into apps/api run through
development dependencies (tsc-alias), which the production install leaves out.
The low finding,
elliptic GHSA-848j-6mx2-7j84, is unchanged from Section 7: no patched release, reached only
through the optional NEAR wallet modules, absent from the production build.
Cross-reference. None of these findings touches a surface of the threat model: key
handling, the session layer, transaction construction, the two signing keys, the DeFi exit and conversion
surfaces, or the integrator access layer. Its residual-risk table (Section 11) needs no change.
9. Dependency refresh (2026-10-30)
The audit gate reported 13 high or critical advisories published after Section 8. All but one are fixed by upgrading:next 16.4.3 (including two critical remote code execution advisories, GHSA-2464-fhr4-w9xw and GHSA-673q-mjm6-r5xr),
undici 8.12.3, multer 2.5.0, body-parser 2.4.0, follow-redirects 1.16.2, happy-dom 21.0.4 and the top-level
zod 4.6.7.
zod GHSA-mrhx-c7xc-m3w5 is accepted for the two 3.x copies the wallet kit pins (3.22.4 under @reown/appkit-wallet,
3.25.76 under @coinbase/cdp-sdk). No 3.x release is patched, a global override to 4.x would change a library inside the
signing path’s dependencies, and neither copy ships: next build output has no zod in its client or server chunks, and
the API does not depend on them. It is allowlisted in scripts/audit-allowlist.json until 2027-01-28, which forces a
re-check.
picomatch GHSA-fc5q-39xc-vjpf, accepted on 2026-11-17, was withdrawn by GitHub on 2026-11-18 and no longer
appears in the audit, so its allowlist entry is gone.
braces GHSA-vfj7-8cjw-p6xm from Section 8 no longer appears in the audit, so its allowlist entry is gone.
10. How to refresh this plan
- Install the two pinned tools, at the versions in
scripts/security-tools.json(the same file CI reads):pipx install semgrep==<version>, and gitleaks<version>from its release page (Homebrew works only while its formula is at that version). The script refuses to run on another version and prints the install command. - Run
bun run security:scanon a clean checkout ofmain, or of the pull request that changes the scan. It writessecurity-reports/YYYY-MM-DD.mdand.jsonwith the tool versions, the commit and every finding by severity. A finding never fails it; it fails only when a tool cannot run, and the gates are theaudit,semgrepandgitleaksCI jobs. Semgrep’s rule packs and the advisory database are fetched live, so a later run can differ on the same commit. - For every critical, high and medium finding, either fix it (a compatible bump or a root
overridesentry, thenbun install --frozen-lockfileand the full test suite) or record an accepted-risk decision here with the evidence: thebun pm whypath and whether the package reaches a production bundle. - Append a dated section like Section 8 and update the status line at the top. The report itself stays local
(
security-reports/is ignored by git); this page carries the counts, the findings and the decisions.
verify(), transaction construction, the signing keys).