- Keep
.env,storage/, database files, backups, imports, scripts, migrations, tests, and.gitblocked from HTTP. The included root.htaccessenforces this for the direct cPanel checkout layout. - Set
APP_ENV=production,APP_URL=https://thc-li.com, a unique randomAPP_KEYof at least 32 characters, and a separate one-timeAPP_SETUP_TOKENbefore first setup. - Remove
APP_SETUP_TOKENafter the owner exists./setupcloses after the first owner is created. - Use HTTPS only. Confirm the live response includes HSTS, CSP,
nosniff, frame protection, referrer policy, and aSecure; HttpOnly; SameSite=Laxsession cookie. - In cPanel File Manager, use
700forstorage,storage/backups, andstorage/imports; use600for.env, SQLite files, imports, and backup files. The application also applies restrictive permissions when it creates these files. - Keep the five-minute email worker and nightly backup commands CLI-only.
- Use a dedicated mailbox password for SMTP, not the cPanel account password. The Admin settings page encrypts the saved SMTP password with AES-256-GCM derived from
APP_KEY; the value is never rendered back into HTML or written to audit logs. - Prefer SSL/TLS port 465 or STARTTLS port 587 with certificate verification. Use the rate-limited Test saved SMTP connection action after configuration and after any mailbox-password change.
- Sign in and open Security → My security.
- Replace any temporary password.
- Enroll an authenticator app and store the one-time recovery codes offline.
- Confirm you can sign out and sign back in with MFA.
- Open Settings → Staff security and enable Require MFA for all staff.
- Open Security center and resolve every item marked Action needed.
- Give staff only the permissions required for their job. Staff must change temporary passwords on first use.
- If an account may be compromised, disable it under Staff. Role, status, permission, and password-reset changes invalidate its existing sessions.
- The owner can set a new temporary staff password from Staff. The staff member must replace it at next sign-in.
- Preserve
storage/shop.sqlite,.env, and the latest backup before incident investigation. Do not email the database or customer export. - Review Security center for recent sign-ins, lockouts, MFA changes, staff changes, setup attempts, and customer exports.
- Rotate
APP_KEYonly with a planned MFA reset and SMTP password re-entry: existing encrypted MFA secrets, SMTP credentials, and import previews depend on it.
The GitHub workflow runs PHP linting, an isolated SQLite smoke suite, Gitleaks secret scanning, Semgrep SAST, and Trivy filesystem scanning. Third-party actions are pinned to immutable commit SHAs and Dependabot monitors action updates.
Automated scans supplement but do not replace periodic manual authorization and business-logic testing.