|
| 1 | +# OASIS Challenges - Deployment Checklist |
| 2 | + |
| 3 | +**Purpose:** Enable PR #22 (Challenge Registry + Docker) in the main OASIS repo |
| 4 | + |
| 5 | +--- |
| 6 | + |
| 7 | +## ✅ Prerequisites (Already Done) |
| 8 | + |
| 9 | +- [x] 7 challenges created and tested |
| 10 | +- [x] GitHub Actions workflows for building images (`build-challenges.yml`, `publish-images.yml`) |
| 11 | +- [x] Open-source readiness complete |
| 12 | +- [x] `index.json` generator script created (`scripts/generate-index.js`) |
| 13 | +- [x] Auto-generate workflow created (`.github/workflows/generate-index.yml`) |
| 14 | + |
| 15 | +--- |
| 16 | + |
| 17 | +## 🚀 Deployment Steps |
| 18 | + |
| 19 | +### Step 1: Make Repository Public ⚠️ REQUIRED FIRST |
| 20 | + |
| 21 | +```bash |
| 22 | +# Via GitHub UI |
| 23 | +# Settings → General → Danger Zone → Change visibility → Make public |
| 24 | +``` |
| 25 | + |
| 26 | +**Why:** |
| 27 | +- GHCR packages must be public for unauthenticated pulls |
| 28 | +- index.json must be accessible via raw.githubusercontent.com |
| 29 | +- GitHub Actions GITHUB_TOKEN can publish packages |
| 30 | + |
| 31 | +**Verify:** |
| 32 | +```bash |
| 33 | +curl https://github.com/KryptSec/oasis-challenges |
| 34 | +# Should not require authentication |
| 35 | +``` |
| 36 | + |
| 37 | +--- |
| 38 | + |
| 39 | +### Step 2: Generate index.json |
| 40 | + |
| 41 | +```bash |
| 42 | +cd /path/to/oasis-challenges |
| 43 | +node scripts/generate-index.js |
| 44 | +git add index.json |
| 45 | +git commit -m "chore: add challenge registry index" |
| 46 | +git push |
| 47 | +``` |
| 48 | + |
| 49 | +**Verify:** |
| 50 | +```bash |
| 51 | +curl https://raw.githubusercontent.com/KryptSec/oasis-challenges/main/index.json |
| 52 | +# Should return JSON with challenges array |
| 53 | +``` |
| 54 | + |
| 55 | +--- |
| 56 | + |
| 57 | +### Step 3: Build & Publish Challenge Images to GHCR |
| 58 | + |
| 59 | +**Option A: Manual trigger (recommended for first run)** |
| 60 | +```bash |
| 61 | +# Via GitHub UI |
| 62 | +# Actions → Build and Push Challenge Images → Run workflow |
| 63 | +``` |
| 64 | + |
| 65 | +**Option B: Push to trigger** |
| 66 | +```bash |
| 67 | +# Workflows trigger on push to main affecting challenge files |
| 68 | +git push # If there are pending changes |
| 69 | +``` |
| 70 | + |
| 71 | +**Verify:** |
| 72 | +```bash |
| 73 | +# Check GHCR packages page |
| 74 | +open https://github.com/orgs/KryptSec/packages |
| 75 | + |
| 76 | +# Try pulling an image |
| 77 | +docker pull ghcr.io/kryptsec/substring-bypass:latest |
| 78 | +``` |
| 79 | + |
| 80 | +--- |
| 81 | + |
| 82 | +### Step 4: Build & Publish oasis-kali Image |
| 83 | + |
| 84 | +**Create Dockerfile for oasis-kali:** |
| 85 | +```bash |
| 86 | +# In oasis-kali repo root |
| 87 | +cat > Dockerfile <<'EOF' |
| 88 | +FROM kalilinux/kali-rolling:latest |
| 89 | +
|
| 90 | +RUN apt-get update && apt-get install -y \ |
| 91 | + curl \ |
| 92 | + nmap \ |
| 93 | + sqlmap \ |
| 94 | + gobuster \ |
| 95 | + nikto \ |
| 96 | + python3 \ |
| 97 | + python3-pip \ |
| 98 | + netcat-traditional \ |
| 99 | + && rm -rf /var/lib/apt/lists/* |
| 100 | +
|
| 101 | +WORKDIR /workspace |
| 102 | +CMD ["/bin/bash"] |
| 103 | +EOF |
| 104 | +``` |
| 105 | + |
| 106 | +**Add GitHub Actions workflow:** |
| 107 | +```yaml |
| 108 | +# .github/workflows/publish-kali.yml |
| 109 | +name: Publish oasis-kali Image |
| 110 | + |
| 111 | +on: |
| 112 | + push: |
| 113 | + branches: [main] |
| 114 | + paths: ['Dockerfile', '.github/workflows/publish-kali.yml'] |
| 115 | + workflow_dispatch: |
| 116 | + |
| 117 | +env: |
| 118 | + REGISTRY: ghcr.io |
| 119 | + IMAGE_NAME: ghcr.io/kryptsec/oasis-kali |
| 120 | + |
| 121 | +jobs: |
| 122 | + build-and-push: |
| 123 | + runs-on: ubuntu-latest |
| 124 | + permissions: |
| 125 | + contents: read |
| 126 | + packages: write |
| 127 | + steps: |
| 128 | + - uses: actions/checkout@v4 |
| 129 | + - uses: docker/setup-buildx-action@v3 |
| 130 | + - uses: docker/login-action@v3 |
| 131 | + with: |
| 132 | + registry: ${{ env.REGISTRY }} |
| 133 | + username: ${{ github.actor }} |
| 134 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 135 | + - uses: docker/build-push-action@v6 |
| 136 | + with: |
| 137 | + context: . |
| 138 | + push: true |
| 139 | + platforms: linux/amd64 |
| 140 | + tags: ${{ env.IMAGE_NAME }}:latest |
| 141 | + labels: | |
| 142 | + org.opencontainers.image.source=https://github.com/KryptSec/oasis-kali |
| 143 | + org.opencontainers.image.description=Kali Linux agent for OASIS benchmarking |
| 144 | +``` |
| 145 | +
|
| 146 | +**Verify:** |
| 147 | +```bash |
| 148 | +docker pull ghcr.io/kryptsec/oasis-kali:latest |
| 149 | +``` |
| 150 | + |
| 151 | +--- |
| 152 | + |
| 153 | +### Step 5: Make GHCR Packages Public |
| 154 | + |
| 155 | +**For each package:** |
| 156 | +```bash |
| 157 | +# Via GitHub UI |
| 158 | +# Packages → <package-name> → Package settings → Change visibility → Public |
| 159 | +``` |
| 160 | + |
| 161 | +**Packages to make public:** |
| 162 | +- ghcr.io/kryptsec/oasis-kali |
| 163 | +- ghcr.io/kryptsec/substring-bypass |
| 164 | +- ghcr.io/kryptsec/sqli-auth-bypass |
| 165 | +- ghcr.io/kryptsec/sqli-union-session-leak |
| 166 | +- ghcr.io/kryptsec/gatekeeper |
| 167 | +- ghcr.io/kryptsec/idor-access-control |
| 168 | +- ghcr.io/kryptsec/jwt-forgery |
| 169 | +- ghcr.io/kryptsec/insecure-deserialization |
| 170 | + |
| 171 | +**Verify:** |
| 172 | +```bash |
| 173 | +# Should work without docker login |
| 174 | +docker pull ghcr.io/kryptsec/substring-bypass:latest |
| 175 | +``` |
| 176 | + |
| 177 | +--- |
| 178 | + |
| 179 | +### Step 6: Test End-to-End |
| 180 | + |
| 181 | +**In OASIS repo (with PR #22 branch):** |
| 182 | +```bash |
| 183 | +cd /path/to/oasis |
| 184 | +git checkout feat/challenge-registry-docker |
| 185 | + |
| 186 | +# Should fetch from registry and run |
| 187 | +npm run build |
| 188 | +./bin/oasis.js run -c substring-bypass --provider anthropic |
| 189 | + |
| 190 | +# Verify it: |
| 191 | +# ✅ Fetches index.json from GitHub |
| 192 | +# ✅ Pulls ghcr.io/kryptsec/substring-bypass:latest |
| 193 | +# ✅ Pulls ghcr.io/kryptsec/oasis-kali:latest |
| 194 | +# ✅ Starts containers on oasis-net |
| 195 | +# ✅ Runs benchmark successfully |
| 196 | +``` |
| 197 | + |
| 198 | +--- |
| 199 | + |
| 200 | +## 🔍 Verification Checklist |
| 201 | + |
| 202 | +Before merging PR #22, confirm: |
| 203 | + |
| 204 | +- [ ] **Repo is public** |
| 205 | + `curl https://github.com/KryptSec/oasis-challenges` (no auth required) |
| 206 | + |
| 207 | +- [ ] **index.json accessible** |
| 208 | + `curl https://raw.githubusercontent.com/KryptSec/oasis-challenges/main/index.json` (returns valid JSON) |
| 209 | + |
| 210 | +- [ ] **Challenge images on GHCR** |
| 211 | + `docker pull ghcr.io/kryptsec/substring-bypass:latest` (succeeds without login) |
| 212 | + |
| 213 | +- [ ] **oasis-kali image on GHCR** |
| 214 | + `docker pull ghcr.io/kryptsec/oasis-kali:latest` (succeeds without login) |
| 215 | + |
| 216 | +- [ ] **All packages public** |
| 217 | + Visit https://github.com/orgs/KryptSec/packages and verify visibility = Public |
| 218 | + |
| 219 | +- [ ] **End-to-end test passes** |
| 220 | + `oasis run -c substring-bypass` fetches and runs successfully |
| 221 | + |
| 222 | +--- |
| 223 | + |
| 224 | +## 📝 Notes |
| 225 | + |
| 226 | +- **First publish may take 10-15 minutes** (7 images + kali image) |
| 227 | +- **GHCR packages inherit repo visibility** by default (private if repo is private) |
| 228 | +- **Auto-generate workflow** will keep index.json up-to-date on every challenge.json change |
| 229 | +- **Images are tagged with `latest` and commit SHA** for versioning |
| 230 | + |
| 231 | +--- |
| 232 | + |
| 233 | +## 🆘 Troubleshooting |
| 234 | + |
| 235 | +**Problem:** GHCR pull fails with 401/403 |
| 236 | +- **Solution:** Make GHCR packages public (they default to private) |
| 237 | + |
| 238 | +**Problem:** index.json returns 404 |
| 239 | +- **Solution:** Make repo public OR generate index.json and commit it |
| 240 | + |
| 241 | +**Problem:** Workflows not running |
| 242 | +- **Solution:** Check Actions tab, enable workflows, trigger manually |
| 243 | + |
| 244 | +**Problem:** Images not building |
| 245 | +- **Solution:** Check Actions logs for build errors, verify Dockerfiles are valid |
| 246 | + |
| 247 | +--- |
| 248 | + |
| 249 | +## 🔗 Related |
| 250 | + |
| 251 | +- PR #22: https://github.com/KryptSec/oasis/pull/22 |
| 252 | +- OASIS docs: https://github.com/KryptSec/oasis#readme |
0 commit comments