Skip to content
Merged
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
27 changes: 26 additions & 1 deletion .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Install wait-on for app readiness check
run: npm install -g wait-on

# CodeQL Analysis
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
Expand Down Expand Up @@ -166,6 +169,22 @@ jobs:
fi
echo "✅ Custom security checks completed"

# Start Next.js app for security testing
- name: Start Next.js app
run: |
npm run build
npm run start &
sleep 10
env:
NODE_ENV: production
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }}
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }}
SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }}

- name: Wait for app to be ready
run: |
npx wait-on http://localhost:3000 --timeout 30000 || echo "App may not be ready, continuing with scan"

# OWASP ZAP Baseline Scan
- name: OWASP ZAP Baseline Scan
uses: zaproxy/action-baseline@v0.8.0
Expand Down Expand Up @@ -276,6 +295,9 @@ jobs:
export VERCEL_TOKEN=${{ secrets.VERCEL_TOKEN }}
./scripts/setup-vercel-config.sh

- name: Install dependencies
run: npm ci

- name: Build for Vercel
run: |
npm run build
Expand Down Expand Up @@ -352,6 +374,9 @@ jobs:
export VERCEL_TOKEN=${{ secrets.VERCEL_TOKEN }}
./scripts/setup-vercel-config.sh

- name: Install dependencies
run: npm ci

- name: Build for Vercel
run: |
npm run build
Expand Down Expand Up @@ -458,4 +483,4 @@ jobs:
with:
name: lighthouse-results
path: .lighthouseci/
retention-days: 30
retention-days: 30
Loading