Skip to content

fix: scheduler-audit-fixes — fix audit findings in src/scheduler - #352

Merged
avoidwork merged 5 commits into
mainfrom
feat/scheduler-audit-fixes
Jun 21, 2026
Merged

fix: scheduler-audit-fixes — fix audit findings in src/scheduler#352
avoidwork merged 5 commits into
mainfrom
feat/scheduler-audit-fixes

Conversation

@avoidwork

Copy link
Copy Markdown
Owner

Description

Fix two audit findings in the scheduler module: a high-severity security vulnerability where job.command is interpolated directly into crontab entries without sanitization (allowing crontab format injection via newlines), and a medium-severity bug where persistJobFile ignores its cwd parameter.

Type of Change

  • Bugfix (non-breaking change which fixes an issue)

Testing

  • Unit tests for sanitizeCrontabCommand helper: normal commands pass through, commands with newlines/carriage returns are sanitized, shell special characters preserved, empty commands handled
  • Integration test for persistJobFile cwd parameter usage
  • All existing scheduler tests verified to still pass

Coverage

  • 100% line coverage maintained

Checklist

  • npm run lint passes
  • Tests pass with 100% line coverage
  • No forbidden patterns used
  • Conventional Commit style applied

@avoidwork
avoidwork enabled auto-merge (squash) June 21, 2026 12:58
@avoidwork
avoidwork merged commit 1632873 into main Jun 21, 2026
2 checks passed
@avoidwork
avoidwork deleted the feat/scheduler-audit-fixes branch June 21, 2026 12:58
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.

1 participant