Skip to content

Code audit hardening: backend input validation and frontend error handling#12

Closed
Batuhan4 wants to merge 2 commits intomainfrom
cursor/project-code-audit-6966
Closed

Code audit hardening: backend input validation and frontend error handling#12
Batuhan4 wants to merge 2 commits intomainfrom
cursor/project-code-audit-6966

Conversation

@Batuhan4
Copy link
Copy Markdown
Owner

Summary

  • replace shell-constructed backend helper execution with argument-safe fork/exec invocation
  • reject invalid fan ids and malformed fan speed payloads at the backend command boundary
  • harden backend keyboard handling by validating RGB triplets and clamping brightness writes to 0..255
  • fix frontend fatal-error dialog path so the temporary loop exits cleanly instead of hanging
  • improve frontend preset home-directory resolution when $HOME is unset

Verification

  • g++ -std=c++20 -Wall -Wextra -pedantic backend/src/main.cpp backend/src/fan.cpp backend/src/keyboard.cpp backend/src/util.cpp -o /tmp/victus-backend-test -pthread
  • bash -n install.sh arch-install.sh fedora-install.sh backend/src/set-fan-speed.sh backend/src/set-fan-mode.sh backend/src/set-rgb-zone.sh backend/victus-healthcheck.sh

Notes

  • Full Meson build could not run in this environment because meson and GTK4 dev packages are unavailable (meson: command not found, pkg-config gtk4 not found).
Open in Web Open in Cursor 

cursoragent and others added 2 commits March 22, 2026 21:44
Co-authored-by: Batuhan Bayazit <Batuhan4@users.noreply.github.com>
Co-authored-by: Batuhan Bayazit <Batuhan4@users.noreply.github.com>
@cursor
Copy link
Copy Markdown

cursor Bot commented Mar 22, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@github-actions
Copy link
Copy Markdown

🤖 Hi @Batuhan4, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

@github-actions
Copy link
Copy Markdown

🤖 I'm sorry @Batuhan4, but I was unable to process your request. Please see the logs for more details.

@Batuhan4
Copy link
Copy Markdown
Owner Author

Closing as superseded by the consolidated local fix branch and follow-up testing.

@Batuhan4 Batuhan4 closed this Mar 22, 2026
@Batuhan4 Batuhan4 deleted the cursor/project-code-audit-6966 branch March 22, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants