-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Build multipel test containers for codejail.
Before we can test on the newer versions of python we need to build the new images. This PR updates the Dockerfile to Ubuntu 22.04 instead of 20.04 and uses deadksnakes to be able to install any relevant python versions we might need. We also update the publsh workflow to allow publishing multiple images. We create new sudoers and apparmor profiles to be able to run with the new version of python as well.
- Loading branch information
Showing
5 changed files
with
54 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
apparmor-profiles/home.sandbox.codejail_sandbox-python3.11.bin.python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#include <tunables/global> | ||
|
||
profile apparmor_profile /home/sandbox/codejail_sandbox-python3.11/bin/python { | ||
#include <abstractions/base> | ||
#include <abstractions/python> | ||
|
||
/home/sandbox/codejail_sandbox-python3.11/** mr, | ||
/tmp/codejail-*/ rix, | ||
/tmp/codejail-*/** wrix, | ||
|
||
# Whitelist particiclar shared objects from the system | ||
# python installation | ||
# | ||
/usr/lib/python3.11/lib-dynload/_json.so mr, | ||
/usr/lib/python3.11/lib-dynload/_ctypes.so mr, | ||
/usr/lib/python3.11/lib-dynload/_heapq.so mr, | ||
/usr/lib/python3.11/lib-dynload/_io.so mr, | ||
/usr/lib/python3.11/lib-dynload/_csv.so mr, | ||
/usr/lib/python3.11/lib-dynload/datetime.so mr, | ||
/usr/lib/python3.11/lib-dynload/_elementtree.so mr, | ||
/usr/lib/python3.11/lib-dynload/pyexpat.so mr, | ||
# | ||
# Allow access to selections from /proc | ||
# | ||
/proc/*/mounts r, | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
ubuntu ALL=(sandbox) SETENV:NOPASSWD:/home/sandbox/codejail_sandbox-python3.8/bin/python | ||
ubuntu ALL=(sandbox) SETENV:NOPASSWD:/usr/bin/find | ||
ubuntu ALL=(ALL) NOPASSWD:/usr/bin/pkill | ||
|
||
Defaults!/home/sandbox/codejail_sandbox-python3.8/bin/python !requiretty | ||
Defaults!/usr/bin/find !requiretty | ||
Defaults!/usr/bin/pkill !requiretty |