Project | Security

Security Testing with OWASP ZAP

OWASP ZAP baseline and full scans of a hardened and a vulnerable build on a private Docker network, a rules file with FAIL/WARN/IGNORE decisions, a verdict job in CI, and API tests for IDOR, mass assignment and brute force.

Ten vulnerabilities are planted in a second build of the app: ZAP catches the seven it can see, API tests catch the three access-control flaws no scanner can, and the hardened build must scan clean.

Evidence checked 17 Oct 2026 | CI run #1 on main

GitHub Actions workflow badge
On this page
  1. Problem and purpose
  2. Architecture
  3. Technology and tools
  4. Engineering decisions and approach
  5. Test scope and execution approach
  6. Results with dated evidence
  7. Evidence explorer
  8. Local setup and execution
  9. Workflow and reports
  10. Known limitations

Problem and purpose

A scan that has only ever been clean has not shown that it can find anything. This project proves its setup: ten vulnerabilities are planted in a second build of the same app, each mapped to the tool that must report it, and a verdict job fails the build if one is missed or if the hardened build has a new warning.

Architecture

docker network notevault-scan
  notevault-hardened ──┐
  notevault-vulnerable ┴─◄ ZAP baseline + full scan ──► JSON reports
verify.ts: hardened = no FAIL / WARN · vulnerable = every planted defect as its rule id
npm test:  IDOR · mass assignment · brute force (what ZAP cannot know)

Technology and tools

AreaTools
AppNoteVault, Node 24 running TypeScript directly, no dependencies; hardened and vulnerable build from one code base
DASTOWASP ZAP 2.17.0 in Docker: baseline scan (passive) and full scan (active attacks), rules file with FAIL, WARN and IGNORE
Testsnode:test API tests for IDOR, mass assignment, brute force, CSRF on login, session fixation, user enumeration; unit tests for the verdict logic
Isolationboth builds and ZAP on a private Docker network, no ports published, repository mounted read-only
CIGitHub Actions: checks, one scan job per build in parallel, a verdict job that writes the result table into the job summary

Engineering decisions and approach

  • Defects are switches in one code base (has("defect-id")), so the two builds cannot drift apart; a unit test fails if one disappears
  • The rules file is the policy: FAIL for the planted defects and classic high-impact problems, IGNORE only with a written reason
  • A small verdict script decides from the JSON reports instead of relying on ZAP exit codes
  • Access control is tested with knowledge of who owns what, because a scanner cannot know it
  • The vulnerable build never leaves a private Docker network

Test scope and execution approach

Project-specific checks and execution details documented in the repository:

  • Six header and cookie defects caught by the baseline scan, reflected XSS by the full scan, three access-control defects by API tests
  • The scan found two real weaknesses in the hardened build (a CSRF error page with an empty token, ambiguous paths accepted) and one false positive, all documented
  • Hardened build: Content-Security-Policy, frame protection, nosniff, cross-origin isolation, HttpOnly/Secure/SameSite cookie, scrypt hashes, rate limit, new session id at sign-in
  • Verdict table in the GitHub job summary; ZAP HTML and JSON reports as artifacts
  • Design notes and 66 interview questions on security testing with ZAP, linked to the code (Markdown + PDF)

Results with dated evidence

Historical repository or workflow evidence · older evidence; recheck the linked source

CI run #1 on main

Ten vulnerabilities are planted in a second build of the app: ZAP catches the seven it can see, API tests catch the three access-control flaws no scanner can, and the hardened build must scan clean.

Evidence checked: | Open dated evidence

Evidence explorer

Static screenshots are labelled as images; dated workflow links identify the execution evidence and its check date.

Test report screenshot. A CI run: the hardened build has no alerts beyond the two documented informational ones; every planted vulnerability is caught. Static image; capture date is not recorded in the portfolio data.
ZAP verdict of a CI run

Test report screenshot. A CI run: the hardened build has no alerts beyond the two documented informational ones; every planted vulnerability is caught. Static image; capture date is not recorded in the portfolio data.

Static material from the public repository. The linked verification record was checked 2026-10-17; that date is not a screenshot capture date.

Dated workflow record

Evidence checked 2026-10-17. Open CI run #1 on main

Local setup and execution

npm ci
npm test                 :: API security tests, no Docker
npm run scan:full        :: ZAP baseline + full scan of both builds (Docker)
npm run verify -- --full :: the verdict

Workflow and reports

View workflow definition.

Known limitations

  • Unauthenticated scans: signed-in pages are covered by the API tests, not by ZAP
  • HTTP on a private network: HSTS and TLS need a scan of a deployed environment; DAST does not replace SAST, dependency scanning or a penetration test
  • The evidence is limited to the public repository and linked run; it does not establish customer production impact.

Back to Projects