| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sonar c:S2612: mark_database_to_recover() created the .netdata-meta.db.recover / .delete marker with `open(..., O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, 444)`. The literal `444` is decimal, which is octal 0o674 (rw-rwxr--) -- group rwx + others r. Same decimal-not-octal typo as the previous api_v1_manage.c commit. The file is a marker created and immediately closed (no body written); only its existence matters at next-startup recovery detection. It does not need group or other access. Use mode 0600 -- minimum permissions needed by the owning netdata process, eliminates the c:S2612 violation.
|
Sorry, something went wrong.
|
@cubic-dev-ai review this PR |
Sorry, something went wrong.
@stelfrag I have started the AI code review. It will take a few minutes to complete. |
Sorry, something went wrong.
There was a problem hiding this comment.
Updates the SQLite recovery marker file creation to use secure, owner-only permissions, aligning with audit-driven hardening from the ongoing Coverity/Sonar fix series.
Changes:
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
sqlite: fix decimal mode literal on recovery marker file Sonar c:S2612: mark_database_to_recover() created the .netdata-meta.db.recover / .delete marker with `open(..., O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, 444)`. The literal `444` is decimal, which is octal 0o674 (rw-rwxr--) -- group rwx + others r. Same decimal-not-octal typo as the previous api_v1_manage.c commit. The file is a marker created and immediately closed (no body written); only its existence matters at next-startup recovery detection. It does not need group or other access. Use mode 0600 -- minimum permissions needed by the owning netdata process, eliminates the c:S2612 violation. Co-authored-by: Costa Tsaousis <costa@netdata.cloud> (cherry picked from commit ed6e8eb)
| Back | FazBrowse Home | New Git URL |
Summary