diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..f0e8b1a --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,37 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/universal +{ + "name": "Default Linux Universal", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/universal:2-linux", + "customizations": { + "vscode": { + "extensions": [ + "GitHub.copilot", + "GitHub.copilot-chat", + "vscjava.vscode-java-pack", + "sonarsource.sonarlint-vscode", + "dbaeumer.vscode-eslint", + "esbenp.prettier-vscode", + "ms-python.python" + ] + } + } + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "uname -a", + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" + //"postCreateCommand": "chmod +x .devcontainer/setup.sh && /bin/bash .devcontainer/setup.sh", + //"remoteUser": "vscode" +} diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh new file mode 100644 index 0000000..01bc7a1 --- /dev/null +++ b/.devcontainer/setup.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# Install SonarCloud CLI +npm install -g sonarsource/sonar-scanner-cli + +# Install GitHub CodeQL CLI +gh extension install github/gh-codeql + +# Install git-secrets +git clone https://github.com/awslabs/git-secrets.git /tmp/git-secrets +cd /tmp/git-secrets +sudo make install + +# Install Talisman +npm install -g talisman + +# Install BFG Repo-Cleaner +wget -O /usr/local/bin/bfg https://repo1.maven.org/maven2/com/madgag/bfg/1.13.0/bfg-1.13.0.jar +chmod +x /usr/local/bin/bfg + +# Clean up +rm -rf /tmp/git-secrets