Security audit β 2026-06-24#73
Open
versila22 wants to merge 1 commit into
Open
Conversation
β¦-06-03) First automated pentest report for lima-app. Findings: Critical=1 High=3 Medium=4 Low=3 Info=2 Critical: hardcoded admin credentials in main.py seed data. High: stale debug files in git, JWT in sessionStorage, unauthenticated /health/db. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LNGHcHv84S3qAWEEBAN48L
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.
Pentest mini-report β lima-app β 2026-06-24
Probed URL: https://limaimpro.duckdns.org/
Stack: React 18 + Vite 7 / npm / PWA=yes (vite-plugin-pwa, autoUpdate, SW workbox)
Backend: FastAPI (Python) on Railway β https://api-production-e15b.up.railway.app
Counts: Critical=1 High=3 Medium=4 Low=3 Info=2
Findings
backend/app/main.py:54.env.production,api.ts.orig,api_upload.patch)src/lib/api.ts.orig,.env.productionsessionStorage(XSS-accessible)src/lib/api.ts:45,53/health/dbleaks DB URL prefix and full table listbackend/app/main.py:202-222FRONTEND_URLdefault is stale third-party domain auto-injected into CORS_ORIGINSbackend/app/config.py:37,85-87limaimpro.duckdns.org:443vitest <3.2.6β arbitrary file read/exec via UI server (GHSA-5xrq-8626-4rwp, CVSS 9.8)package.jsondevDependencyreact-router-dom <6.30.4β open redirect via//prefix paths (GHSA-2j2x-hqr9-3h42)package.json/health/migrationsleaks full Alembic traceback on error (unauthenticated)backend/app/main.py:225-240serialize-javascript <=7.0.2β RCE via RegExp/Date during build (GHSA-5c6j-r48x-rmvq, High)package.jsondevDependencyrobots.txtallows all crawlers on a members-only apppublic/robots.txtnginx.confvite.config.tsworkbox configTop 3 fixes
_SEED_MEMBERSpasswords from source; load seed credentials from environment variables or a secrets manager, and enforce a must-change-on-first-login flow./health/dband/health/migrationsβ AddDepends(require_admin)to both endpoints, or restrict to internal network only via Traefik middleware.git rm src/lib/api.ts.orig src/lib/api_upload.patch; evaluate whether.env.production(contains Railway API URL only, no secrets) should remain tracked or be gitignored.Evidence (Critical/High only)
Critical β Hardcoded admin credentials in source
backend/app/main.py:54{"email": "admin@lima-impro.fr", ..., "password": "Admin1234!", "app_role": "admin", ...}SEED_ADMIN_PASSWORD), add amust_change_passwordflag, or remove the seed entirely from production startup.High β Stale debug files tracked in git
src/lib/api.ts.orig,src/lib/api_upload.patch,.env.production,.env.developmentgit ls-filesreturns all four files as tracked.api.ts.origcontains the oldlocalStorage-based token implementation β a weaker auth pattern. Both increase attack surface understanding for an adversary who clones the repo..env.productioncontains the Railway API base URL (no secrets currently), but committing.env.*files establishes a dangerous precedent.git rm src/lib/api.ts.orig src/lib/api_upload.patch; add*.origand*.patchto.gitignore; confirm.env.production/.env.developmentare intentionally tracked.High β JWT token in sessionStorage (XSS-accessible)
src/lib/api.ts:42-53,src/contexts/AuthContext.tsx:74sessionStorage.setItem(_SESSION_KEY, token)β Safari ITP workaround.High β Unauthenticated
/health/dbinfo disclosurebackend/app/main.py:202-222return {"async_url_prefix": settings.async_database_url[:60], "tables": tables}_: Member = Depends(require_admin)tohealth_check_dbandhealth_check_migrations.Verified safe
allow_credentials=Trueis safe in this configuration@limiter.limit("5/minute")on/auth/loginand/auth/activateunsafe-eval;script-src 'self';frame-ancestors 'none';object-src 'none'max-age=31536000; includeSubDomainsconfirmed in nginx.confeval()orFunction()calls in sourcedangerouslySetInnerHTMLin chart.tsx: CSS-only static config, not user inputrehype-raw, HTML tags are escaped/docs,/redoc): disabled in productionnavigate()calls use hardcoded paths)Needs server-side verification
Originheader/health/dband/health/migrationsreachability from public internet on Railway APIadmin@lima-impro.frchanged fromAdmin1234!in production DBFRONTEND_URLRailway env var β confirm overridden fromhttps://improv-cabaret-planner.lovable.app.env,.git/config,backup.zip(network check blocked by egress policy)Tools
ran=npm-audit, openssl-s_client, git-ls-files, grep-secret-scan; skipped=curl-http-headers (egress proxy policy denial), curl-cors-test (same), curl-sensitive-files (same), nmap (not installed)
Generated by Claude Code