Skip to main content
labs.list() returns only indicators, such as hasGuide, hasResources, hasVideos, and hasWriteups. Fetch the lab itself for the content:
Every lab also has provider, aws or azure. Use it where your wording or links differ by cloud.

Guide

lab.guide is the lab’s walkthrough, or null when it has none. Each task has an id, title, Markdown body, question or null, and flag. flag: true marks the one task where the learner submits the CTF flag. Show the objectives, scenario, tasks, and closing section in order. Render the Markdown with your own renderer, and sanitize it.

Knowledge checks

A question has text, and may have a hint and a placeholder. Its type is text, for a typed answer, or true_false, for True and False buttons. A missing type means text. Questions arrive without their answers. Grade on the server:
For text, send what the learner typed. For true_false, send a boolean, or the string true or false. An unknown task ID throws not_found with backendCode TASK_NOT_FOUND. Correct answers do not record lab completion. The completion guide covers flags and completion.

Videos

lab.videos lists video walkthroughs in display order. Each has a provider (vimeo or youtube), a videoId, and an optional title and startSeconds. Build the player and watch links with the video helpers:
videoEmbedUrl returns an iframe src on the provider’s privacy-enhanced player. videoWatchUrl links to the provider’s own site, which suits small screens. Both return null for a provider this SDK version does not know, so skip that video. @cybr/labs-sdk/video is safe to bundle into a web page. The same functions are also exported from @cybr/labs-sdk.

Diagrams

lab.diagrams lists architecture diagrams in display order. Read kind rather than guessing from the URL:
  • image: a plain picture.
  • html: a self-contained interactive file. Show it in a sandboxed iframe.

Resources and writeups

lab.resources is a list of supporting links, or null. Each link has an id, title, url, and optional description. lab.writeups lists community articles and videos, each with a kind, title, author, and url. lab.bannerUrl is an optional banner image.