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.

#

GitHub Codespaces are free upto 60 hours per month if you are using a 2 core machine. More # 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. This will save your codespace hours. You can stop your instance by visiting this link here. Choose the instance that's running and click Stop your codespace to temporarily stop them. Stopping the instance will persist your changes made within the container. You can again resume this instance later if needed.

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