Skip to content

Put compilation actions into Sandbox #82

Open
@natsukagami

Description

@natsukagami

Is your feature request related to a problem? Please describe.
See here for why.
Basically you don't want to have people #include "/etc/shadow" or something similar.

Describe the solution you'd like
Run compile commands in a sandbox. Most changes are just going to be within https://github.com/natsukagami/kjudge/blob/391b164e07c5e2fcbe17aa0a77bbc9f519ea1627/worker/compile.go#L134:L165.
Check https://github.com/natsukagami/kjudge/blob/391b164e07c5e2fcbe17aa0a77bbc9f519ea1627/worker/run.go#L116:L127 for an example of how to use the sandboxes.
We might need to mount some additional stuff, see https://github.com/cms-dev/cms/blob/4aa39c18a87f20ff0cd3e9efe023b9b4e19ddc4c/cms/grading/steps/compilation.py#L98.

Metadata

Metadata

Labels

cat:workerRelated to the back-end workerenhancementNew feature or requestgoPull requests that update Go codepriority:highHigh priority: Mostly for next cycle

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions