feat(security): harden HTTP, storage, status reading and launches #10

Merged
shinuwa merged 1 commit from develop into main 2026-12-02 11:52:15 +00:00
Owner
  • security headers on every response (strict CSP, nosniff, frame DENY,
    no-referrer, HSTS behind TLS proxy) and no x-powered-by; hero image set
    through the CSSOM so the CSP needs no inline styles
  • error handler: 400 without stack trace for malformed URLs/JSON and multer
    errors, 500 logged in full
  • image uploads: type detected from the file signature (PNG/JPEG/WebP), not
    the client MIME type; multer part limits
  • storage: atomic JSON writes (tmp + rename) with mode 600, dirs 700; refuse
    to start when groups.json is corrupted instead of recreating admin; initial
    admin password written to a 600 file instead of the logs
  • status file read asynchronously in the background and cached, one read at
    a time with a 3 s timeout, so a hung NFS mount never blocks requests;
    cleanup refused when the status is stale or empty
  • launches: 10 min cooldown after a successful start (status lags behind),
    ssh BatchMode/ConnectTimeout/IdentitiesOnly, remote stdout/stderr kept in
    the server log instead of the API response

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

- security headers on every response (strict CSP, nosniff, frame DENY, no-referrer, HSTS behind TLS proxy) and no x-powered-by; hero image set through the CSSOM so the CSP needs no inline styles - error handler: 400 without stack trace for malformed URLs/JSON and multer errors, 500 logged in full - image uploads: type detected from the file signature (PNG/JPEG/WebP), not the client MIME type; multer part limits - storage: atomic JSON writes (tmp + rename) with mode 600, dirs 700; refuse to start when groups.json is corrupted instead of recreating admin; initial admin password written to a 600 file instead of the logs - status file read asynchronously in the background and cached, one read at a time with a 3 s timeout, so a hung NFS mount never blocks requests; cleanup refused when the status is stale or empty - launches: 10 min cooldown after a successful start (status lags behind), ssh BatchMode/ConnectTimeout/IdentitiesOnly, remote stdout/stderr kept in the server log instead of the API response Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
shinuwa added 1 commit 2026-12-02 11:52:12 +00:00
feat(security): harden HTTP, storage, status reading and launches
All checks were successful
Deploy Gameservers Control / check (push) Successful in 6s
Deploy Gameservers Control / deploy (push) Has been skipped
d74f80fbf9
- security headers on every response (strict CSP, nosniff, frame DENY,
  no-referrer, HSTS behind TLS proxy) and no x-powered-by; hero image set
  through the CSSOM so the CSP needs no inline styles
- error handler: 400 without stack trace for malformed URLs/JSON and multer
  errors, 500 logged in full
- image uploads: type detected from the file signature (PNG/JPEG/WebP), not
  the client MIME type; multer part limits
- storage: atomic JSON writes (tmp + rename) with mode 600, dirs 700; refuse
  to start when groups.json is corrupted instead of recreating admin; initial
  admin password written to a 600 file instead of the logs
- status file read asynchronously in the background and cached, one read at
  a time with a 3 s timeout, so a hung NFS mount never blocks requests;
  cleanup refused when the status is stale or empty
- launches: 10 min cooldown after a successful start (status lags behind),
  ssh BatchMode/ConnectTimeout/IdentitiesOnly, remote stdout/stderr kept in
  the server log instead of the API response

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
shinuwa merged commit fac58a52be into main 2026-12-02 11:52:15 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: shinuwa/gameservers-control#10
No description provided.