# ShipAppReady readiness report: BrightPath Tutoring

Report: https://ship-app-ready.labs.adanatech.com/reports/sample-tutoring  
Source: Sample app (fictional)  
Readiness score: **37/100** (Not safe to launch yet)

> The score, the findings and the cost estimate are computed by fixed rules. Text marked [AI-generated] was written by an AI model from the scan results; [Built-in rules] marks the scanner's own text. Reports expire after 24 hours.

## Scorecard

BrightPath Tutoring appears to be a demo booking app for parents and students arranging tutoring sessions in math, reading and science. It shows available time slots and records student names, parent emails and optional phone numbers. A password-protected page lets tutors view bookings. _[AI-generated]_

- Stack: Node.js / Express
- Entry point: server.js (port 3000)
- Size: 8 files, about 108 lines of code
- Findings: 1 critical, 2 high, 2 medium, 2 low, 1 info

## Findings

### Critical (1)

**AUTH-01. A password is checked against a value written into the code**  
Area: Sign-in and access · Location: `server.js:50`  
Evidence: Compared with a literal: …2024 (21 characters)  
Why it matters: The admin password is written directly into server.js, so anyone with access to that code can see the value used for the check. Changing it also requires changing the code.  
Fix: Replace the embedded password with a salted password hash supplied through an environment variable and stored in AWS Secrets Manager. Use a password-verification library with constant-time comparison and choose a new admin password before launch. _[AI-generated]_

### High (2)

**DATA-01. A JSON or CSV file is used as the database**  
Area: Data storage · Location: `server.js:23`  
Evidence: fs.writeFileSync(BOOKINGS_FILE, JSON.stringify(bookings, null, 2));  
Why it matters: Bookings are saved to a local JSON file rather than a managed database. Without separate persistent storage and backups, replacing the container could lose bookings.  
Fix: Move booking records to Amazon RDS or DynamoDB and enable backups. Import any existing bookings before switching the app over. _[AI-generated]_

**DEP-01. lodash 4.17.15 has 5 known security advisories**  
Area: Dependencies · Location: `package.json:12`  
Evidence: GHSA-29mw-wpgm-hmr9, GHSA-35jh-r3h4-6jhm, GHSA-p6mc-m468-83gw, GHSA-r5fr-rjxr-66jc, GHSA-xxjr-mmjv-4gpg. First fixed version: 4.18.0  
Why it matters: The scanner lists five published security advisories for the lodash version in package.json. Keeping that version leaves known weaknesses in the app's dependencies.  
Fix: Upgrade lodash to 4.18.0 or later and update the dependency lock file. Re-test booking creation, occupied-slot checks and the admin booking list. _[AI-generated]_

### Medium (2)

**DATA-02. The app collects personal data: phone numbers**  
Area: Data storage · Location: `public/index.html:16`  
Evidence: Fields found: phone numbers  
Why it matters: The booking form collects phone numbers alongside student names and parent emails. This personal information needs clear handling rules and restricted access.  
Fix: Collect only the details you need, explain their purpose and retention period, and delete them when no longer needed. Store records encrypted in a managed database and limit access to authorized staff. _[AI-generated]_

**AUTH-02. Nothing slows down repeated password guesses**  
Area: Sign-in and access · Location: `server.js:50`  
Evidence: No rate limiting or lockout found for sign-in  
Why it matters: The admin password check has no limit on repeated attempts. Anyone who can reach the address could automate password guesses.  
Fix: Temporarily block further attempts after a small number of failures, such as five failures for 15 minutes. Configure the app to use the visitor address supplied by your trusted AWS load balancer, rather than trusting arbitrary forwarded addresses. _[AI-generated]_

### Low (2)

**CFG-01. Any website is allowed to call this app's API (CORS *)**  
Area: Configuration · Location: `server.js:12`  
Evidence: app.use(cors());  
Why it matters: The code allows browser pages from any website to call and read responses from the app's API. That is broader access than this booking site appears to need.  
Fix: Replace the unrestricted CORS setting with an explicit list of your approved website addresses. Treat this as a browser restriction, not a replacement for password protection. _[AI-generated]_

**OPS-02. No health check address**  
Area: Deployability · Location: `server.js`  
Evidence: No /health route found  
Why it matters: The code has no dedicated health-check address. A simple endpoint gives AWS a predictable way to check whether the app is responding.  
Fix: Add the supplied /health route before app.listen. Configure the AWS load balancer to check that path on port 8080 and expect HTTP 200. _[AI-generated]_

### Info (1)

**OPS-01. No Dockerfile yet (a draft is on the Fixes tab)**  
Area: Deployability  
Evidence: No Dockerfile in the project  
Why it matters: The project has no Dockerfile to define how it should be packaged and started on AWS. A consistent container setup makes deployment repeatable.  
Fix: Add the supplied Dockerfile and .dockerignore, then build and test a linux/amd64 image. Confirm that the app responds on port 8080 before deploying it. _[AI-generated]_

## Fixes: packaging files

### Dockerfile _[AI-generated]_

Packages the app as one container: an official slim base image with security updates applied, an unprivileged user, and the app listening on 0.0.0.0.

```
FROM --platform=linux/amd64 public.ecr.aws/docker/library/node:22-slim

ENV NODE_ENV=production \
    PORT=8080

RUN apt-get update && apt-get upgrade -y && rm -rf /var/lib/apt/lists/*

WORKDIR /app
COPY package*.json ./
RUN if [ -f package-lock.json ]; then npm ci --omit=dev; else npm install --omit=dev; fi

COPY --chown=node:node . .
# Temporary support for the existing file store; migrate bookings before launch.
RUN mkdir -p /app/data && chown node:node /app/data
USER node

# server.js reads PORT; its listen call accepts connections on all interfaces.
EXPOSE 8080
CMD ["node", "server.js"]
```

### .env.example _[AI-generated]_

Lists every setting the app reads, marked secret or setting, required or optional. Secrets go in AWS Secrets Manager, never in the code.

```
# The current code reads only PORT. Set environment values through your local
# runner or AWS deployment; the app does not load .env files itself.
# NODE_ENV is also set by the Dockerfile for the Node/Express runtime.
# setting, optional
PORT=8080
# setting, optional
NODE_ENV=production

# Required after implementing AUTH-01: change server.js to read this salted
# hash and verify submitted passwords. It has no effect in the current code.
# Store it in AWS Secrets Manager and inject it at deployment.
# secret, required
ADMIN_PASSWORD_HASH=
```

### .dockerignore _[AI-generated]_

Keeps secrets, Git history and generated folders out of the container image.

```
.env
.env.*
!.env.example
.git
.gitignore
node_modules
__pycache__
.venv
*.log
logs/
npm-debug.log*
.DS_Store
coverage/
```

### health route (Express) _[AI-generated]_

A /health address that answers 200, so the load balancer can tell the app is alive.

```
// Add in server.js before app.listen(...).
app.get('/health', (req, res) => {
  res.status(200).json({ status: 'ok' });
});
```

## Cost estimate

About **$38.40 to $44.40 per month** on AWS ECS Express Mode in your own account.

| Item | Monthly | Detail |
|---|---|---|
| Container (ECS Express Mode) | $22 | One copy always on, 512 CPU units / 1024 MB memory, with its public IP |
| Load balancer with HTTPS | $16–$22 | One per AWS account, shared by every app in it |
| Secrets Manager (1 secret) | $0.40 | ADMIN_PASSWORD_HASH |

Assumptions:

- One always-on copy on AWS ECS Express Mode in your own AWS account, sized for a typical web app.
- Light to moderate traffic; data transfer, logs and backups add a few dollars at most at this scale.
- If your account already runs other apps behind the same load balancer, that line is shared.
- Your domain name and DNS are not included.
- Outside API usage (for example an AI or email service the app calls) is billed separately by that provider.
- Approximate US East prices; AWS prices change, and this is an estimate, not a quote.

## Launch plan

- Deploy one container (512 CPU units, 1024 MB) in your AWS account, behind HTTPS.
- Health check: /health.
- Secrets: ADMIN_PASSWORD_HASH, in AWS Secrets Manager.

Before launch _[AI-generated]_:

- Choose the production domain, point its DNS to the AWS load balancer, and configure HTTPS and the exact allowed website addresses.
- Choose RDS or DynamoDB, enable backups, and migrate any bookings from data/bookings.json before replacing the file store.
- Choose a new admin password, implement hash verification, and store the hash in AWS Secrets Manager; the example variable alone does not change authentication.
- Set a retention period for student and parent details, publish a privacy notice, and decide which staff may view bookings.
- Upgrade lodash, add sign-in attempt limits, and test the booking and admin flows before launch.
- Build the linux/amd64 container, set PORT=8080, and configure the load balancer health check to use /health.

---
Generated by ShipAppReady, a pilot from AdanaTech Labs (https://labs.adanatech.com).
