Skip to content
Open
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
24 changes: 24 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## Goal
<!-- 1 sentence: what this PR delivers -->

## Changes
<!-- Bullet list of artifacts added/modified -->
-
-
-

## Testing
<!-- Commands + observed output -->
```bash
# <command>
# <output>
```

## Artifacts & Screenshots
<!-- Links to files in this PR, image embeds where useful -->
-

## Checklist
- [ ] Title is clear (`feat(labN): <topic>` style)
- [ ] No secrets/large temp files committed
- [ ] Submission file at `submissions/labN.md` exists
49 changes: 49 additions & 0 deletions .github/workflows/lab1-smoke.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Lab 1 — Juice Shop Smoke Test

on:
pull_request:
branches: [main]

permissions:
contents: read

jobs:
smoke-test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Pull and run Juice Shop
run: |
docker run -d --name juice-shop \
-p 127.0.0.1:3000:3000 \
bkimminich/juice-shop:v20.0.0

- name: Wait for Juice Shop to be healthy
run: |
echo "Waiting for Juice Shop to start..."
for i in $(seq 1 30); do
if curl --silent --fail http://127.0.0.1:3000/rest/admin/application-version >/dev/null; then
echo "Juice Shop is up!"
exit 0
fi
echo "Attempt $i/30 — not ready yet, sleeping 2s..."
sleep 2
done
echo "Juice Shop failed to start within 60s"
docker logs juice-shop
exit 1

- name: Verify homepage returns HTTP 200
run: |
curl -I -s http://127.0.0.1:3000 | head -5
curl -s -o /dev/null -w "HTTP Status: %{http_code}\n" http://127.0.0.1:3000

- name: Verify product API
run: |
curl -s http://127.0.0.1:3000/api/Products | jq '.data | length'

- name: Verify version endpoint
run: |
curl -s http://127.0.0.1:3000/rest/admin/application-version | jq
11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
repos:
- repo: https://github.com/gitleaks/gitleaks
rev: v8.30.1
hooks:
- id: gitleaks

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: detect-private-key
- id: check-added-large-files
Loading
Loading