Skip to content

fix: patch 4 high-severity bugs from codebase review#65

Merged
dbfx merged 1 commit intomainfrom
t3code/bug-review
Mar 24, 2026
Merged

fix: patch 4 high-severity bugs from codebase review#65
dbfx merged 1 commit intomainfrom
t3code/bug-review

Conversation

@dbfx
Copy link
Contributor

@dbfx dbfx commented Mar 24, 2026

Summary

  • fix(file-utils): isExcluded() hardcoded path normalization to backslash (\), completely breaking exclusion matching on Linux and macOS where / is the path separator. Now uses platform-aware separator.
  • fix(cloud-agent): handleUpdateThreatBlacklist validated the URL hostname for private IP literals but never called assertPublicResolution() to check DNS resolution, leaving a DNS rebinding SSRF vector. Now calls the existing assertPublicResolution() before downloading.
  • fix(service-manager): applyServiceChanges only allowed Manual or Disabled start types — any request to restore a service to Automatic or AutomaticDelayed was silently downgraded to Disabled. Now supports all 4 valid start types via an allowlist.
  • fix(index): Windows Task Scheduler XML was written as UTF-16LE without a BOM. schtasks /Create expects a BOM to correctly identify the encoding; without it, auto-launch registration can silently fail (especially with non-ASCII exe paths). Added \uFEFF BOM.

Test plan

  • All 779 existing tests pass
  • Verify exclusion rules work on Linux/macOS (e.g. add a path exclusion, run a scan, confirm excluded paths are skipped)
  • Verify service manager can restore a service to Automatic start type on Windows
  • Verify auto-launch registration works on Windows with a path containing spaces
  • Verify threat blacklist update rejects domains resolving to private IPs

🤖 Generated with Claude Code

- fix(file-utils): use platform-aware path separator in isExcluded so
  exclusion matching works on Linux/macOS (was hardcoded to backslash)
- fix(cloud-agent): add DNS rebinding protection to blacklist download
  by calling assertPublicResolution before fetching the URL
- fix(service-manager): support Automatic/AutomaticDelayed start types
  instead of silently falling back to Disabled
- fix(index): prepend UTF-16LE BOM to schtasks XML so Windows Task
  Scheduler correctly parses the file

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@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.

Reviewed commit: 2b77c88150

ℹ️ 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".

@dbfx dbfx merged commit 58acebf into main Mar 24, 2026
8 checks passed
@dbfx dbfx deleted the t3code/bug-review branch March 24, 2026 08:39
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