Custom Labs lets you build tailored Code Review labs in just a few clicks, using your own demonstrative code or snippets. They help challenge developers with vulnerabilities that reflect the technologies and patterns they use every day.
In Code Review Labs, participants are guided through analyzing a given scenario, understanding the code and its associated vulnerability, and identifying the specific lines that lead to the security weakness.
These labs can be fully customized to meet an organization’s specific training needs.
Ask your Customer Success Manager (CSM) to set up a new GitHub or GitLab repository for your Custom Labs. If you prefer to use your own existing repository, your CSM can also guide you through configuring it to work seamlessly with our platform.
As part of the setup, your Customer Success Manager will provide a unique Customer ID for your organization (for example, 123-org-name-1a2b3c4d). CI automation uses this ID to deploy your Custom Labs, and you will reference it later when writing the lab instructions.
If needed, AWS authentication tokens can also be configured to ensure secure communication between your repository and our platform.
Each lab's code lives in its own directory and represents a specific vulnerability scenario tailored to your team.
For each lab, the code must be placed under “labs/<flag name>/” either in GitLab or GitHub.
Flag name rules:
You don’t need Git installed locally to use Custom Labs. The system works with any Git-based repository that supports CI automation, making it easy to use with your existing GitHub, GitLab, or other Git platforms.
You can upload or edit code directly online using GitLab Web IDE.
Add the code to the relevant repository by opening the file in the GitLab Web IDE and committing your changes there.
Below is an example of the directory structure for reference:
Once your code is uploaded, you can either commit it directly to the repository or create a merge request to review and merge the changes.
You can upload or edit code directly online using GitHub’s VSCode Web Editor.
Add the code to the relevant repository by opening the file in the GitHub Web IDE and committing your changes there.
Below is an example of the directory structure for reference:
Once your code is uploaded, you can either commit it directly to the repository or create a pull request to review and merge the changes.
After uploading or editing your lab code, tag your repository.
Once you’ve added or updated your code, you’ll need to tag your repository and create a release.
You can tag the repository by following the steps below:
If the run/job completes successfully, it means all your labs in the repository have been uploaded to the SecureFlag system, and the changes can take up to 15 minutes to be reflected in the platform.
Once you’ve added or updated your code, you’ll need to tag your repository and create a release.
You can tag the repository by following the steps below:
If the run/job completes successfully, it means all your labs in the repository have been uploaded to the SecureFlag system, and the changes can take up to 15 minutes to be reflected in the platform.
After you have created the code, you’ll need to define the lab metadata in the SecureFlag platform to complete your custom lab setup.
To do this, navigate to the Management Portal, open the Labs tab, and click the Add Lab button.
Start by adding the title and other key details for your custom lab. You will need to provide:
The Information tab explains how to run the code review labs. It serves as a setup guide to help you navigate the code, select a line, and submit your findings.
To add a Lab Flag, navigate to the Flags tab and click on Add New Flag.
From there, you can define the flag title, select the Knowledge Base article related to your lab, set the maximum score, and provide the lab instructions.
Next, specify the offending line in your code where the vulnerability exists in the Vulnerability Code Ranges section.
You can also add a hint for the lab and configure the score deduction applied when the hint is used.
Once done, click Add Flag to save your changes.
You can assign tags to the lab by entering them in the Tags text box.
In the Repository tab, enter the Customer ID provided by your Customer Success Manager, along with the flag name you configured for your lab in GitHub or GitLab.
Once everything is completed, click Add Lab to create the lab. You can then find your custom lab by searching in the Labs tab.
Now that your Custom Labs are set up, you’re ready to engage your entire development community. Combine your own code, videos, and vulnerability references with SecureFlag’s content to create limitless learning paths. Custom Labs make the possibilities endless. Build, share, and challenge your developers in ways that best align with your organization’s goals.