Skip to content

Conversation

@GrahamDumpleton
Copy link
Collaborator

@GrahamDumpleton GrahamDumpleton commented Jan 20, 2026

My variant of improvements to examiner test script handling.

  • Don't allow traversal outside of examiner tests directories.
  • Allow programs in sub directories of examiner tests directories.
  • Allow examiner tests to be bundled with extension packages.

closes #837
closes #838
closes #847

Copy link
Collaborator

@jorgemoralespou jorgemoralespou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think everything is ok, but there's one comment with potential conflict from examiner extensions.

const test_program_directory_patterns = [
"/home/eduk8s/workshop/examiner/tests",
"/opt/workshop/examiner/tests",
"/opt/packages/*/examiner/tests",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be provide for some confusion if multiple extensions provided same examiner test file_name, but I guess it's low probability.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is part of why one can now put them in sub directories. So a package for Kubernetes can have test names prefixed by kubernetes/ where they would be located in /opt/packages/kubernetes/examiner/tests/kubernetes when unpacked.

This sort of conflict already existed due to it checking multiple directories. So was always a case of user beware.

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.

child_process.spawn in examiner could potentially be an attack vector

2 participants