Security audit β 2026-06-18#66
Open
versila22 wants to merge 1 commit into
Open
Conversation
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 β versila22/lima-app β 2026-06-18
Probed URL: https://limaimpro.duckdns.org/
Stack: React 18 (Vite + SWC) + FastAPI (Python) + PostgreSQL / npm / PWA=yes
Counts: Critical=0 High=2 Medium=1 Low=1 Info=2
Findings
backend/app/main.py:52style-src 'unsafe-inline'enables style injectionnginx.conf:14//paths (GHSA-2j2x-hqr9-3h42)package.jsonβ PROD depadd_headerin/assets/suppresses all parent security headersnginx.conf:28-31backend/app/config.py:7package.jsondevDependenciesTop 3 fixes
_SEED_MEMBERSadmin entry to a one-shot CLI script; never commit plaintext passwords for real accounts.npm audit fixto upgrade react-router-dom past 6.30.3.add_headersecurity directives inside the/assets/location block, or extract them into aninclude security_headers.conf.Evidence (High only)
High β Hardcoded admin credentials in production seed
backend/app/main.py:52{"email": "admin@lima-impro.fr", "app_role": "admin", "password": "Admin1234!", ...}_ensure_seed_data()runs at every startup; creates admin account if DB is empty (no env-guard).High β CSP
style-src 'unsafe-inline'nginx.conf:14style-src 'self' 'unsafe-inline''unsafe-inline'with a build-time hash list or nonce; Tailwind's JIT output is static and hashable.Verified safe
httponly=True,secure=True(HTTPS),samesite="none"(needed for cross-domain API)/docs,/redoc) disabled in production viasettings.is_developmentmax-age=31536000; includeSubDomainspresent in backend SecurityHeadersMiddleware and nginxX-Frame-Options: DENYpresent in both nginx and backend middlewareX-Content-Type-Options: nosniffpresent.git/and.env*paths all returned 403 (not exposed)model_validatorinconfig.pydangerouslySetInnerHTML,eval,innerHTMLsinks in frontend/, handlerNetworkFirst(API), not caching auth tokens in SWallow_credentials=Truepaired with explicitallow_originslist (not wildcard)Needs server-side verification
SecureandSameSiteflags as seen by browser (need live request)/auth/login(slowapi configured but untested remotely)CORS_ORIGINSin prod env matches expected list (only default visible in source)Tools
ran=npm-audit, grep-secret-scan, openssl-tls-check; skipped=curl-http-headers (network policy blocked outbound to target host), yarn-audit (not installed), pnpm-audit (no pnpm lockfile in this repo)
Generated by Claude Code