Skip to content

[Connector] Env var validation (NaN on undefined), CPU parsing, symlink race, typo #411

@Flegma

Description

@Flegma

Summary

Minor configuration and code quality issues.

Findings

  • configs/api.ts — parseInt(process.env.X as string) returns NaN if undefined.
  • system.service.ts — CPU governor path parsing returns NaN if format changes.
  • network.service.ts — NIC name interpolated into bash command (safe now but dangerous pattern).
  • network.service.ts — typo: Error running processs (triple s).
  • file-operations.service.ts — path validation does not follow symlinks.

Impact

NaN values cause silent failures. Potential future risks.

Suggested Fix

Add fallbacks to parseInt. Fix typo. Use Node.js APIs. Add fs.realpathSync after normalization.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2-mediumCode quality & robustnessaudit-2026-03From March 2026 codebase auditconfigConfiguration or environment issueservice:connector5stackgg/game-server-node-connector service

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions