Skip to content

Remove the dead frontend build chain, repair the CSRF PoC - #24

Merged
krishnareddypadala merged 1 commit into
masterfrom
chore/remove-dead-frontend
Jul 30, 2026
Merged

Remove the dead frontend build chain, repair the CSRF PoC#24
krishnareddypadala merged 1 commit into
masterfrom
chore/remove-dead-frontend

Conversation

@krishnareddypadala

Copy link
Copy Markdown
Owner

Removed: the Vite/npm toolchain

Never wired up. welcome.blade.php was the only file referencing @vite, and nothing referenced welcome — no route maps to it.

Removed Why
resources/views/welcome.blade.php 72K Laravel default page with Tailwind inlined. Unreachable.
vite.config.js, package.json Only needed by that page
resources/css/app.css, resources/js/app.js Only @vite inputs

Their presence implied a build step this project deliberately doesn't have. docs/api-refactor.md §10.2 argues for a framework-free client precisely so the innerHTML sinks the XSS lessons depend on stay visible rather than hidden behind a bundler — leaving a half-configured Vite setup next to that reasoning was actively misleading.

Also fixes a comment in AccountController pointing at resources/js for the render helper, which lives in layouts/app.blade.php.

Repaired, not deleted: payload/csrf/offer.html

It's exercise material worth keeping — but it was broken, and how it was broken is worth reading.

It posted a field named bacno. The endpoint has always read tacno. So the request arrived, was accepted, and transferred nothing — silent success, which is the same failure shape as the lesson it's meant to demonstrate. It also pointed at krishnarp.guru, which isn't the lab.

Now posts the correct parameter to /api/v2/transfers with a configurable TARGET, and documents why the attack works: session-cookie auth, no VerifyCsrfToken on the api group, and form-encoded acceptance — all three required, since a JSON-only API isn't CSRF-able.

docs/legacy-mapping.md §7.5 updated from "needs repair" to resolved.

Deliberately kept

Worth stating so nobody removes them later thinking they're stale:

  • src/ — the legacy flat-PHP app, preserved for before/after scanner comparison (legacy-mapping.md §8)
  • dbscript/banktable.sql — the source the migration was derived from
  • root Dockerfile + dock/ — build the legacy image, documented in the README
  • the archived DAST PDF — the pre-port scanner baseline

82 tests still pass.

🤖 Generated with Claude Code

Deletes the Vite/npm toolchain, which was never wired up:

  resources/views/welcome.blade.php   72K, the Laravel default page with
                                      Tailwind inlined. Unreachable -- no
                                      route maps to it.
  vite.config.js, package.json        only needed by that page
  resources/css/app.css               only @Vite input
  resources/js/app.js                 only @Vite input

welcome.blade.php was the ONLY file referencing @Vite, and nothing
referenced `welcome`. Their presence implied a build step this project
deliberately does not have: docs/api-refactor.md §10.2 argues for a
framework-free client precisely so the innerHTML sinks the XSS lessons
depend on stay visible instead of being hidden behind a bundler.

Also fixes a comment in AccountController that pointed at resources/js
for the render helper, which actually lives in layouts/app.blade.php.

Repairs payload/csrf/offer.html rather than deleting it -- it is exercise
material worth having. It posted `bacno` where the endpoint reads
`tacno`, so it never worked even against the legacy app: the request
arrived, was accepted, and moved nothing. Silent success, which is the
same failure shape as the lesson it is meant to demonstrate. It also
targeted a domain that is not the lab.

It now posts the right parameter to /api/v2/transfers with a
configurable TARGET, and documents why the attack works -- session
cookie auth, no VerifyCsrfToken on the api group, and form-encoded
acceptance, all three of which are required, since a JSON-only API is
not CSRF-able.

docs/legacy-mapping.md §7.5 updated from "needs repair" to resolved.

82 tests still pass.
@krishnareddypadala
krishnareddypadala merged commit 90f55f5 into master Jul 30, 2026
@krishnareddypadala
krishnareddypadala deleted the chore/remove-dead-frontend branch July 30, 2026 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant