Skip to content

fix(fs,ci): validate path length and improve cross-platform compatibility#16

Open
RinZ27 wants to merge 1 commit intoembeddedos-org:masterfrom
RinZ27:fix-filesystem-path-logic-27829
Open

fix(fs,ci): validate path length and improve cross-platform compatibility#16
RinZ27 wants to merge 1 commit intoembeddedos-org:masterfrom
RinZ27:fix-filesystem-path-logic-27829

Conversation

@RinZ27
Copy link
Copy Markdown
Member

@RinZ27 RinZ27 commented Apr 21, 2026

Summary

Validating path lengths in the filesystem service prevents inode allocation for truncated paths. I also addressed several CI/CD bottlenecks, specifically MSVC build failures on Windows and CodeQL path injection alerts in regression tests.

Type of Change

  • fix — Bug fix
  • test — Add or fix tests
  • build — Build system or dependency changes
  • ci — CI/CD pipeline changes

Changes

  • Implemented eos_fs_validate_path to centralize path length and integrity checks.
  • Replaced POSIX dirent.h with native Windows FindFirstFile / FindNextFile for cross-platform test compatibility.
  • Added strict path whitelisting in test runners to satisfy CodeQL taint analysis.
  • Fixed C4146 (unary minus on unsigned) and C4101 (unused variables) warnings.
  • Corrected array range-check order in test utilities.

Testing

  • Unit tests pass (Verified on Linux and Windows via CI)
  • Integration tests pass
  • Manual testing performed
  • New tests added for new functionality (Path length edge cases)

Pre-Submission Checklist

  • Code compiles without warnings
  • All existing tests pass
  • New tests added for new functionality
  • Documentation updated if API changed
  • Commit messages follow (): convention
  • Branch is rebased on latest master

Related Issues

N/A

Screenshots / Logs

All CI checks (MSVC Build, Ubuntu Tests, CodeQL) are now passing.

Additional Notes

These changes ensure the filesystem service is robust against malformed inputs while maintaining a healthy, warning-free build environment across all supported platforms.

@RinZ27 RinZ27 requested a review from a user April 21, 2026 12:49
@RinZ27 RinZ27 force-pushed the fix-filesystem-path-logic-27829 branch 2 times, most recently from d202b48 to d3ca896 Compare April 21, 2026 13:04
Comment thread services/filesystem/src/filesystem.c Fixed
Comment thread services/filesystem/src/filesystem.c Fixed
@RinZ27 RinZ27 force-pushed the fix-filesystem-path-logic-27829 branch 7 times, most recently from 4ef918a to fdd38e5 Compare April 21, 2026 14:23
Comment thread tests/test_board_configs.c Fixed
Comment thread tests/test_board_configs.c Fixed
Comment thread tests/test_profiles.c Fixed
Comment thread tests/test_profiles.c Fixed
@RinZ27 RinZ27 force-pushed the fix-filesystem-path-logic-27829 branch from fdd38e5 to 4afbc55 Compare April 21, 2026 14:36
Comment thread tests/test_profiles.c Fixed
@RinZ27 RinZ27 force-pushed the fix-filesystem-path-logic-27829 branch from 4afbc55 to f1ec447 Compare April 21, 2026 14:46
Comment thread tests/test_board_configs.c Fixed
Comment thread tests/test_board_configs.c Fixed
Comment thread tests/test_profiles.c Fixed
@RinZ27 RinZ27 force-pushed the fix-filesystem-path-logic-27829 branch from f1ec447 to 036a632 Compare April 21, 2026 14:57
Comment thread tests/test_board_configs.c Fixed
Comment thread tests/test_profiles.c Fixed
@RinZ27 RinZ27 force-pushed the fix-filesystem-path-logic-27829 branch from 036a632 to f34c11b Compare April 21, 2026 15:03
Comment thread tests/test_board_configs.c Fixed
Comment thread tests/test_board_configs.c Fixed
Comment thread tests/test_profiles.c Fixed
Comment thread tests/test_board_configs.c Fixed
Comment thread tests/test_profiles.c Fixed
Comment thread tests/test_profiles.c Fixed
@RinZ27 RinZ27 force-pushed the fix-filesystem-path-logic-27829 branch from f34c11b to 42d499a Compare April 21, 2026 15:09
@RinZ27 RinZ27 force-pushed the fix-filesystem-path-logic-27829 branch from 42d499a to f23ee02 Compare April 21, 2026 15:14
@RinZ27 RinZ27 changed the title fix: validate path length before inode allocation in filesystem service fix(fs,ci): validate path length and improve cross-platform compatibility Apr 21, 2026
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.

3 participants