Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create codejail test procedure #896

Open
1 task
robrap opened this issue Jan 13, 2025 · 0 comments
Open
1 task

Create codejail test procedure #896

robrap opened this issue Jan 13, 2025 · 0 comments

Comments

@robrap
Copy link
Contributor

robrap commented Jan 13, 2025

Acceptance Criteria:

  • Create draft of the Codejail service test procedure

Notes:

  • Cover functional testing
  • Cover security testing
  • Should be useful across all environments (e.g. devstack to Prod), but could have details specific to certain environments (e.g. checking that containers in Prod do not have access to any LMS DB, cache, etc.).
  • Is there anything useful to take from https://2u-internal.atlassian.net/wiki/spaces/AT/pages/16385128/Code-jail+Upgrade+and+Testing?
  • See codejail repo README for some instructions.
  • See edxapp pipeline for a smoke test of codejail.

Things to test

Just building up some local notes.

Should succeed

  • Basics
    • Define a function, call it
    • Read globals that were passed in
    • Return data via globals
  • Disk:
    • Working directory read and write (allow this one)
    • Attached files
  • Import modules
    • numpy or anything else that's in the standard codejail package list

Should fail

  • Network:
    • Public internet
    • Other servers in deployment (may be difficult to configure this in a meaningful way)
    • Localhost
    • TCP (HTTP call to 1.1.1.1), UDP (DNS resolution of example.com)
  • Disk:
    • Read, write, and list:
      • Parent directory, which contains other people's codejail
      • /etc/passwd (as stand-in for more sensitive files)
      • /proc/1/cmdline (as a stand-in for more sensitive process values)
  • Long-running task
  • Processes
    • Child process
    • Fork
  • Memory
    • Allocate huge objects

Other

  • Abuse of python_path
  • Read environment variables
  • Confirm Python version
  • /proc/*/mounts
@robrap robrap added this to Arch-BOM Jan 13, 2025
@robrap robrap converted this from a draft issue Jan 13, 2025
@robrap robrap removed the status in Arch-BOM Jan 29, 2025
@robrap robrap moved this to Ready For Development in Arch-BOM Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready For Development
Development

No branches or pull requests

1 participant