# ShipAppReady readiness report: Sweet Crumb Bakery

Report: https://ship-app-ready.labs.adanatech.com/reports/sample-bakery  
Source: Sample app (fictional)  
Readiness score: **55/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

Sweet Crumb Bakery appears to be a demonstration website for a bakery, with links to a menu, gallery and custom cake order form. The form asks customers for contact details and cake preferences, and the home page loads Google Maps. The supplied files are a static website; processing orders needs a separate order service. _[AI-generated]_

- Stack: Static website
- Entry point: index.html (port 80)
- Size: 11 files, about 188 lines of code
- Findings: 1 critical, 4 medium, 1 info

## Findings

### Critical (1)

**SEC-01. Google API key written into the code, in a file sent to the browser**  
Area: Secrets · Location: `index.html:37`  
Evidence: Google API key: AIza…0000 (38 characters)  
Why it matters: The Google API key written in index.html is included in files sent to the browser, so it is not private. If the key is active and insufficiently restricted, someone could use it against your Google account and generate charges. Anyone visiting your site can read this.  
Fix: Replace the exposed key and restrict its replacement in Google Cloud to your production website domains and only the Maps APIs you need. Keep any server-only keys out of website files entirely. _[AI-generated]_

### Medium (4)

**SEC-02. No .gitignore file, so secrets files can be committed by accident**  
Area: Secrets  
Evidence: No .gitignore at the top of the project  
Why it matters: The project has no top-level .gitignore to help keep private settings out of saved code history. A future file containing passwords or keys could be committed accidentally.  
Fix: Add a top-level .gitignore containing .env and .env.*, with !.env.example to allow the empty settings template. This does not remove files already committed; remove any tracked secret files and replace exposed keys separately. _[AI-generated]_

**DATA-01. The app collects personal data: email addresses, phone numbers**  
Area: Data storage · Location: `order.html:19`  
Evidence: Fields found: email addresses, phone numbers  
Why it matters: The order form asks for email addresses and phone numbers, which need careful handling. The supplied website code does not establish how an order service would store or protect that information.  
Fix: Collect only necessary details and explain their use and retention period beside the form. Before accepting orders, arrange encrypted storage in a managed database, restrict staff access and establish a deletion process. _[AI-generated]_

**CFG-01. The page calls a localhost address that will break once deployed**  
Area: Configuration · Location: `js/order.js:9`  
Evidence: const res = await fetch("http://localhost:5000/api/orders", {  
Why it matters: The JavaScript sends orders to localhost, which means the computer running the browser, not your AWS service. On a deployed site, this would send the request to the wrong destination.  
Fix: Change the fetch address in js/order.js to /api/orders. Arrange for your production website to route that address to the order service, then test successful and failed submissions. _[AI-generated]_

**CFG-02. The page calls a localhost address that will break once deployed**  
Area: Configuration · Location: `order.html:17`  
Evidence: <form id="cake-order" action="http://localhost:5000/api/orders" method="post">  
Why it matters: The form's own submission address also points to localhost. If the browser submits through this address, it would target the customer's computer rather than your order service.  
Fix: Change the action in order.html to /api/orders as well. Ensure the order service supports the form's submission format if this path is intended to work without JavaScript. _[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: There is no Dockerfile describing how to package and serve the website consistently on AWS. A container definition gives deployment a repeatable starting point.  
Fix: Add the supplied Dockerfile and .dockerignore, then build and test the linux/amd64 image. The container serves website files and /health; it does not provide the order service. _[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/nginx/nginx:stable-alpine

# Update OS packages and allow non-root nginx to bind port 80.
RUN apk upgrade --no-cache \
    && apk add --no-cache libcap \
    && setcap 'cap_net_bind_service=+ep' /usr/sbin/nginx

# Keep runtime files in locations writable by the non-root user.
RUN printf '%s\n' \
    'worker_processes auto;' \
    'pid /tmp/nginx.pid;' \
    'error_log /dev/stderr warn;' \
    'events { worker_connections 1024; }' \
    'http {' \
    '  include /etc/nginx/mime.types;' \
    '  default_type application/octet-stream;' \
    '  access_log /dev/stdout;' \
    '  client_body_temp_path /tmp/client_temp;' \
    '  proxy_temp_path /tmp/proxy_temp;' \
    '  fastcgi_temp_path /tmp/fastcgi_temp;' \
    '  uwsgi_temp_path /tmp/uwsgi_temp;' \
    '  scgi_temp_path /tmp/scgi_temp;' \
    '  server {' \
    '    listen 0.0.0.0:80;' \
    '    server_name _;' \
    '    root /usr/share/nginx/html;' \
    '    index index.html;' \
    '    location = /health { default_type application/json; return 200 "{\"status\":\"ok\"}"; }' \
    '    location / { try_files $uri $uri/ =404; }' \
    '  }' \
    '}' > /etc/nginx/nginx.conf \
    && rm -rf /usr/share/nginx/html/*

COPY . /usr/share/nginx/html/
USER nginx
EXPOSE 80
ENTRYPOINT ["nginx"]
CMD ["-g", "daemon off;"]
```

### .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.

```
# This static website reads no environment variables.
# Creating a .env file will not change its HTML or JavaScript.
# The browser Maps key is written in index.html; restrict it in Google Cloud.
# Never put server-only secrets in website files.
```

### .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/
.DS_Store
Dockerfile
.dockerignore
README*
```

### health file (static site) _[AI-generated]_

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

```
# Included in the Dockerfile's nginx server block.
# Returns a basic web-server health response, not an order-service check.
location = /health {
    default_type application/json;
    return 200 '{"status":"ok"}';
}
```

## Cost estimate

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

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

Assumptions:

- One always-on copy on AWS ECS Express Mode in your own AWS account, sized for a static site or simple 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 (256 CPU units, 512 MB) in your AWS account, behind HTTPS.
- Health check: /health.
- Secrets: None detected. Google API key in pages sent to the browser: public by design, so restrict it to your domain rather than storing it.

Before launch _[AI-generated]_:

- Choose the production domain, configure DNS to point to the AWS entry point and enable HTTPS.
- Replace and restrict the exposed Google Maps key to the intended domains and APIs. This static website needs no server-side environment secrets.
- Choose and deploy the order service, and route /api/orders to it before accepting orders; the static container does not process submissions.
- Decide who may read customer orders, how long to retain them and whether any existing orders need migration to encrypted storage.
- Build the linux/amd64 container and test /health, Maps and order submission through the production address. Retain permission for the non-root server to bind port 80.

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