From 460135314e1c405a4dd1216d1cefa8e67cb2e3c8 Mon Sep 17 00:00:00 2001 From: Hare Sudhan Date: Fri, 22 Dec 2023 16:43:02 -0500 Subject: [PATCH] Github Codespace added (#2644) * Create devcontainer.json * devcontainers added * devcontainers added * add setup files * Update README.md --- .devcontainer/devcontainer.json | 26 ++++++++++++++++++++++++++ .devcontainer/setup.ps1 | 7 +++++++ README.md | 3 +++ 3 files changed, 36 insertions(+) create mode 100644 .devcontainer/devcontainer.json create mode 100644 .devcontainer/setup.ps1 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..ab768269f1 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,26 @@ +{ + "image": "mcr.microsoft.com/devcontainers/universal:2", + "features": { + "ghcr.io/devcontainers/features/powershell:1": {}, + "ghcr.io/natescherer/devcontainers-custom-features/powershell-resources:1": { + "resources": "powershell-yaml,invoke-atomicredteam" + } + }, + "remoteUser": "root", + "onCreateCommand": "pwsh /workspaces/atomic-red-team/.devcontainer/setup.ps1", + "customizations": { + "vscode": { + "extensions": [ + "ms-vscode.powershell" + ], + "settings": { + "terminal.integrated.defaultProfile.linux": "pwsh", + "terminal.integrated.profiles.linux": { + "pwsh": { + "path": "/usr/bin/pwsh" + } + } + } + } + } +} \ No newline at end of file diff --git a/.devcontainer/setup.ps1 b/.devcontainer/setup.ps1 new file mode 100644 index 0000000000..a12efa6110 --- /dev/null +++ b/.devcontainer/setup.ps1 @@ -0,0 +1,7 @@ +New-Item $PROFILE -Force +Set-Variable -Name "InvokePath" -Value (Get-Item /usr/local/share/powershell/Modules/Invoke-AtomicRedTeam/**/Invoke-AtomicRedTeam.psd1).FullName +Write-Output @" +Import-Module $InvokePath -Force +`$PSDefaultParameterValues`["Invoke-AtomicTest:PathToAtomicsFolder"] = "/workspaces/atomic-red-team/atomics"; +`$PSDefaultParameterValues`["Invoke-AtomicTest:ExecutionLogPath"]="$HOME/AtomicRedTeam/execution.csv"; +"@ > $PROFILE \ No newline at end of file diff --git a/README.md b/README.md index d2d86a2b95..fa5b7cf204 100644 --- a/README.md +++ b/README.md @@ -51,3 +51,6 @@ becoming a contributor, check out these resources: for more information about contributing directly to this repository. - Check the [license](LICENSE.txt) for information regarding the distribution and modification of Atomic Red Team. +- Contribute to linux atomics quickly from Github Codespaces. For more details, click [here](https://github.com/redcanaryco/atomic-red-team/wiki/Github-Codespaces) + +[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/redcanaryco/atomic-red-team)