Skip to content

Add operational security documentation#100

Merged
Sciosdev merged 1 commit intomainfrom
codex/redactar-checklist-de-seguridad-owasp
Oct 21, 2025
Merged

Add operational security documentation#100
Sciosdev merged 1 commit intomainfrom
codex/redactar-checklist-de-seguridad-owasp

Conversation

@Sciosdev
Copy link
Copy Markdown
Owner

Summary

  • document an OWASP-aligned security checklist for recurring audits
  • add a detailed database restore runbook for SQLite and MySQL
  • expand deployment guide with operational security practices and cross-links to new docs

Testing

  • not run

https://chatgpt.com/codex/tasks/task_e_68f77cf6cfc08323a540d545f442d05c

@Sciosdev Sciosdev merged commit 79aa575 into main Oct 21, 2025
1 of 4 checks passed
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +22 to +24
2. **Restore**
- Stop the Laravel queue workers and any scheduled jobs: `php artisan queue:restart` and `php artisan schedule:finish`.
- Replace the active database: `cp storage/backups/sqlite/<timestamp>.sqlite database/database.sqlite`.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Stop queue workers instead of restarting them during SQLite restore

The runbook says to “Stop the Laravel queue workers” by running php artisan queue:restart, but that command does not stop workers—it instructs them to reload and they will come back online immediately under Supervisor. During a restore this means background jobs can keep mutating the SQLite database while files are being overwritten, risking corrupted state. The guide should direct operators to actually pause the workers (e.g., php artisan queue:stop or disabling the Supervisor service) before copying the backup.

Useful? React with 👍 / 👎.

Comment on lines +38 to +41
2. **Prepare environment**
- Place the application in maintenance mode: `php artisan down --render="errors::503-maintenance"`.
- Ensure there is sufficient disk space in the target data directory.
- Create a manual snapshot of the current database before overwriting (`mysqldump --single-transaction`). Store it for 30 days.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Pause MySQL background jobs before applying database backup

In the MySQL recovery procedure the environment is placed in maintenance mode, but the runbook never instructs operators to stop queue workers or scheduled tasks. Laravel queues run outside the HTTP layer, so they will continue writing to MySQL while mysql imports are in progress, potentially reintroducing inconsistent data or causing job failures. Consider adding an explicit step to disable queue workers and scheduled jobs before starting the restore and to re‑enable them afterward.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant