Skip to content
This repository was archived by the owner on Sep 4, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 44 additions & 26 deletions .github/workflows/test-pr.yaml
Original file line number Diff line number Diff line change
@@ -1,32 +1,50 @@
name: "CI - Test Templates"
on:
pull_request:
pull_request:

jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
templates: ${{ steps.filter.outputs.changes }}
steps:
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
color: ./**/color/**
hello: ./**/hello/**
detect-templates:
runs-on: ubuntu-latest
outputs:
templates: ${{ steps.set-matrix.outputs.templates }}
steps:
- uses: actions/checkout@v3

test:
needs: [detect-changes]
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
templates: ${{ fromJSON(needs.detect-changes.outputs.templates) }}
steps:
- uses: actions/checkout@v3
- name: Find template directories
id: set-matrix
run: |
# Find all directories in src/ - these are our templates
templates=$(find src -mindepth 1 -maxdepth 1 -type d -exec basename {} \; | sort)

- name: Smoke test for '${{ matrix.templates }}'
id: smoke_test
uses: ./.github/actions/smoke-test
with:
template: "${{ matrix.templates }}"
# Convert to JSON array format for matrix
json_array="["
first=true
for template in $templates; do
if [ "$first" = true ]; then
json_array="$json_array\"$template\""
first=false
else
json_array="$json_array,\"$template\""
fi
done
json_array="$json_array]"

echo "Found templates: $json_array"
echo "templates=$json_array" >> $GITHUB_OUTPUT

test:
needs: [detect-templates]
if: ${{ fromJSON(needs.detect-templates.outputs.templates)[0] != null }}
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
template: ${{ fromJSON(needs.detect-templates.outputs.templates) }}
steps:
- uses: actions/checkout@v3

- name: Smoke test for '${{ matrix.template }}'
id: smoke_test
uses: ./.github/actions/smoke-test
with:
template: "${{ matrix.template }}"
11 changes: 11 additions & 0 deletions src/playwright-kali/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "Kali Linux Development",
"image": "kalilinux/kali-rolling",
"customizations": {
"vscode": {
"extensions": ["ms-python.python"]
}
},
"postCreateCommand": "apt-get update && apt-get install -y curl git python3 python3-pip sudo",
"remoteUser": "root"
}
67 changes: 67 additions & 0 deletions src/playwright-kali/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Kali Linux Development Container

A basic Kali Linux development environment that can be extended with security tools as needed.

## What's Included

- **Base Image**: Official Kali Linux Rolling Release
- **Basic Tools**: curl, git, python3, python3-pip, sudo
- **VS Code Extension**: Python support

## Getting Started

1. Open this template in VS Code with the Dev Containers extension
2. VS Code will build and start the Kali Linux container
3. Install additional tools as needed for your specific use case

## Installing Additional Tools

Since this is a minimal setup, you can install Kali's security tools on demand:

```bash
# Update package list
sudo apt update

# Install specific tools
sudo apt install nmap burpsuite sqlmap nikto

# Or install tool collections
sudo apt install kali-tools-web
sudo apt install kali-tools-forensics
sudo apt install kali-tools-wireless
```

## Common Security Tools

Some popular tools you might want to install:

- **Web Testing**: `burpsuite`, `zaproxy`, `sqlmap`, `nikto`
- **Network**: `nmap`, `masscan`, `wireshark`, `netcat`
- **Forensics**: `autopsy`, `volatility`, `sleuthkit`
- **Wireless**: `aircrack-ng`, `kismet`, `reaver`

## Why This Approach?

This template provides a clean Kali Linux base without pre-installing hundreds of tools. This means:

- Faster container startup
- Smaller image size
- Install only what you need
- Easier troubleshooting
- More reliable builds

## Extending the Template

To customize this template for your specific needs:

1. Fork this repository
2. Modify `.devcontainer/devcontainer.json`
3. Add your required tools to `postCreateCommand`
4. Add VS Code extensions to the `extensions` array

Example customization:
```json
{
"postCreateCommand": "apt-get update && apt-get install -y nmap burpsuite sqlmap"
}
```
8 changes: 8 additions & 0 deletions src/playwright-kali/devcontainer-template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"id": "kali-linux",
"version": "1.0.0",
"name": "Kali Linux",
"description": "A basic Kali Linux development environment that can be extended with security tools",
"documentationURL": "https://github.com/public-rant/template-starter/tree/main/src/playwright-kali",
"options": {}
}
14 changes: 14 additions & 0 deletions test/playwright-kali/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
cd $(dirname "$0")
source test-utils.sh

# Template specific tests
check "distro" cat /etc/os-release | grep -i kali
check "python3" python3 --version
check "pip3" pip3 --version
check "curl" curl --version
check "git" git --version
check "sudo" sudo --version

# Report result
reportResults