Skip to content

Github Codespaces

Hare Sudhan edited this page Dec 23, 2023 · 5 revisions

What are Github Codespaces ?

From GitHub docs, A codespace is a development environment that's hosted in the cloud. GitHub Codespaces run on a variety of VM-based compute options hosted by GitHub.com, which you can configure from 2 core machines up to 32 core machines. You can connect to your codespaces from the browser or locally using an IDE like Visual Studio Code or IntelliJ.

Right now, GitHub Codespaces support only Linux containers as development environments. This codespace environment installs powershell, invoke-atomicredteam and powershell-yaml modules and sets up user profiles to quickly run atomic tests. You can add new atomic tests from your browser(codespaces), test them and then create PRs from your browser without creating a VM.

Pricing

GitHub Codespaces are free upto 60 hours per month if you are using a 2 core machine. More pricing information can be found below.

Usage

You can find the Open in GitHub Codespaces button at the bottom of README.md. This will open a new page to create your codespace environment.

  • Repository: Choose your forked repository instead of redcanaryco/atomic-red-team
  • Branch: Choose the branch that you want to test
  • Region: Optional, choose the region closest to your location to avoid any latency issues.
  • Machine type: 2-core(8GB RAM) or 4-core(16GB RAM). Note that, choosing 4-core would reduce your number of free hours to 30 hours per month instead of 60.

How it works ?

After you click, Open in Codespace, GitHub pulls down the image specified on .devcontainer/devcontainer.json and installs all the modules specified. It also installs VSCode extensions and create home profiles.

After the container is built, it displays a VSCode IDE within the browser window. Here you can run any commands like you run on a VM.

Note: Terminate your codespace instance once you finish your tests. Doing so will conserve your Codespace hours. To stop your instance, visit the provided link, select the running instance, and click "Stop your Codespace." This action will temporarily halt the instance while preserving any changes made within the container. You can resume this instance at a later time if necessary.

Screenshot 2023-12-22 at 11 56 51 PM
Clone this wiki locally