SurfaceCheck is a small defensive web application that reviews one authorized page's server-delivered HTML and response headers, then explains which interface boundaries deserve protection.
ICCS423 Computer Security - A02 Mini Open Source Cybersecurity Tool
Student: Varadirek Sethichaiyen
Student ID: 6480287
Repository: github.com/direksethi/surfacecheck
Live application: surfacecheck-psi.vercel.app
Security advice is often separated from the interface developers are building. A form, iframe, third-party script, or missing response header can create risk, but a developer may not know why that area matters or what a practical protection looks like.
SurfaceCheck turns static page evidence into a short defensive review. Each finding includes severity, confidence, evidence, an explanation of how attackers may use the condition, and a recommended protection.
- Web developers reviewing a page they own or maintain.
- Security learners studying browser-side protections.
- Instructors or analysts demonstrating defensive HTML and header checks.
Only scan pages you own or have explicit permission to assess.
- Fetches one exact HTTP or HTTPS page through a protected server function.
- Reviews forms, sensitive inputs, uploads, iframes, scripts, and mixed content.
- Reviews CSP, framing, HSTS, MIME, referrer, CORS, disclosure, and cookie headers.
- Produces an interactive and print-friendly report.
- Includes a safe, built-in demonstration that sends no external request.
- It does not execute JavaScript, submit forms, authenticate, exploit findings, or crawl linked pages.
- It does not inspect the client-rendered DOM after JavaScript runs.
- It does not save scan input or reports.
- It is not proof that a vulnerability is exploitable and is not a replacement for a complete security assessment.
- Node.js 22.12 or newer.
- pnpm 10 or newer (pnpm 11.9 is recommended).
- A current Chromium, Firefox, or Safari browser.
git clone https://github.com/direksethi/surfacecheck.git
cd surfacecheck
corepack enable
pnpm install --frozen-lockfile
pnpm dev
Open http://localhost:3000. Choose Try the safe demo for an offline demonstration, or enter an authorized public page, confirm permission, and choose Scan page.
Example input:
https://your-site.example/login
Example finding:
High - Sensitive form uses GET
Evidence: <form method="get">...</form>
Attacker use: submitted values may enter history, logs, analytics, or referrer data.
Protection: use POST and keep secrets out of URLs.
The repository includes three safe fixtures under examples/ and expected summaries in examples/EXPECTED_RESULTS.md.
| Command | Purpose |
|---|---|
pnpm dev |
Run the development application on port 3000. |
pnpm build |
Create production client and server bundles. |
pnpm preview |
Preview the production build locally. |
pnpm test |
Run analyzer, network, and component tests. |
pnpm test:e2e |
Run browser tests with Playwright. |
pnpm typecheck |
Check TypeScript types. |
pnpm check |
Run Biome formatting and lint checks. |
pnpm verify |
Run the main type, style, unit-test, and build checks. |
SurfaceCheck has no environment variables, API keys, paid APIs, database, authentication, or configuration file. Network safety limits are intentionally fixed: 10-second timeout, 2 MB response body, five redirects, and ports 80/443 only.
- Severity: high, medium, low, or informational priority.
- Confidence: how directly the condition can be inferred from static evidence.
- Evidence: a shortened, escaped element or response-header example.
- How attackers may use it: the defensive threat context.
- How to protect it: the recommended development action.
- Only one server-delivered HTML response is analyzed.
- JavaScript-created elements and runtime data flows are not visible.
- Authenticated pages cannot be scanned because SurfaceCheck sends no cookies or credentials.
- Some controls, such as CSRF protections and server-side upload validation, cannot be proven from HTML alone.
- Header results reflect the scanner's response path and may differ across CDN regions or user sessions.
- DNS is checked before each request and redirect; a production public deployment should also use platform-level egress controls and rate limiting.
SurfaceCheck is defensive and educational. Do not use it to scan systems without authorization. It blocks local, private, link-local, reserved, and metadata-service destinations; accepts only standard web ports; does not run active payloads; and never returns raw fetched HTML to the browser.
- See
MANUAL.mdfor detailed usage and troubleshooting. - See
TEST_REPORT.pdffor the executed test evidence.
SurfaceCheck is released under the MIT License. See LICENSE.