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

ctf challenge test #56

Open
ColdHeat opened this issue Jun 19, 2021 · 2 comments
Open

ctf challenge test #56

ColdHeat opened this issue Jun 19, 2021 · 2 comments
Milestone

Comments

@ColdHeat
Copy link
Member

We should have a ctf challenge test command. Some ideas:

  • Test that Dockerfiles build
  • Test the created image
  • Test chal is solveable
@ColdHeat ColdHeat added this to the 0.2.0 milestone Jun 19, 2021
@Aurillium
Copy link

Aurillium commented Apr 4, 2024

I'm working on something like this at the moment, it needs a lot of testing and Docker support needs to be finished off (plus some of my additions to challenge.yml could be improved), but would you be interested in a PR and if so are there any specific requirements?
Right now what mine does is:

  • Builds the docker image
  • Runs the docker image
  • For each test defined:
    • Copies all files in the files field of challenge.yml into a temp folder
    • Copies the script into the folder as well
    • Runs the script (depending on the test type, either the script should print a valid flag, or return status code 0)

It does kind of have the caveat that you need to be able to trust the test scripts though. That hasn't really been a major problem in my case because I was always going to virtualise the process anyway

@pve
Copy link

pve commented May 13, 2024

Can you add an example of a challenge.yml file that you wanted tested, in particular with a docker image to be build? I have some ideas and resources.

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

No branches or pull requests

3 participants