SLIM PREP: FREE FIRST CHAPTER
Slim Prep original logoSLIM PREP

Course overview and prerequisites

Vibe Coding Security

Map what your coding agent can touch

Map assets and trust boundaries, write abuse stories and limit the coding agent’s task.

35 minutes.

By the end of this chapter

  • Identify assets and realistic misuse in a small SaaS.
  • Trace trust boundaries across the complete feature.
  • Constrain coding-agent tools, data, and authority.
  • Prioritise controls using a concrete failure story.

List assets and what could happen to them

A private note is an asset because disclosure can harm the client. A session token can let someone act as an account. Billing state controls paid access. Source code, deployment permissions, signing secrets and backups also matter. For each asset, explain what harm its loss or misuse could cause. A list of database tables is not enough.

Include these actors and their capabilities:

Do not assume every attacker starts with administrator access. Include accidental harm too: a generated migration deletes notes, or a debugging response includes private records.

Map the request and who controls each step

PocketDesk request and access map

  1. 1
    Browser

    Untrusted request fields and the user’s session.

  2. 2
    Application server

    Checks the request before granting access.

  3. 3
    Private storage

    Tenant-scoped notes, files, and operational records.

  4. 4
    External services

    Stripe, email, and optional AI processing.

  5. 5
    Build and deploy

    Coding agent, dependencies, CI runner, and limited credentials.

Every arrow is a question about data, authority, and failure. A polished screen does not establish the checks behind it.

The application server checks:

A trust boundary is a point where control or authority changes. The browser can propose a note ID. It cannot declare itself the note’s owner. Stripe can supply a signed payment event. The app must still map it to the correct internal account and product. A coding agent can suggest code. Tool permissions determine whether it can run a destructive command.

Restrict the coding agent’s tools and access

Give the agent a narrow task, a disposable branch, synthetic fixtures and only the tools it needs. Keep live customer exports, production secrets, cloud administrator credentials and unrestricted database access outside its workspace. The execution environment must enforce network and filesystem permissions. A prompt saying “do not read secrets” does not withhold access to them.

Tempting instructionSafer task boundary
Fix everything and deploy when it looks good.Implement one note-read path; show the diff and local test results.
Use this production database to reproduce the bug.Use two synthetic workspaces in a disposable database.
Run any installation script needed to make tests pass.Explain each new dependency and inspect commands before execution.
Ignore failing checks so the demo works.Keep the failed check visible and explain the underlying assumption.

Review what the patch changes. Look for:

A passing build shows that the build succeeded under its test conditions. It does not show that Cy cannot read Ada’s notes.

Turn an access failure into a test

Write: “Cy can change a note ID and retrieve a note in workspace A because the read endpoint checks sign-in but not membership.” Add a server-side authorisation check for the note’s workspace. Test it with two owned synthetic accounts. Confirm that the wrong-workspace request returns no private note. This gives you a specific control and test, rather than a task called “add enterprise security.”

Prioritise by consequence, reachability, exposure and the test results or records you have. A public cross-workspace read needs attention before a cosmetic warning. Record unknowns and restrict release where needed. Review the threat model when a new connector, role, payment action or AI tool changes what the feature can do.

Optional isolated practice

Optional independent practice

Draw the PocketDesk threat map

Optional solo lab: Sketch the note-read and AI-summary flows. Add one attacker story and one accidental-agent failure, then identify where each must be stopped. Use only an application you own on localhost or an explicitly isolated test environment, synthetic accounts, and disposable data. A written walkthrough is sufficient if you have no running app. Keep your practice notes locally.

  • Asset and boundary map.
  • Two failure stories with controls and observable tests.
Self-checkEvidence in your notes
AssetsExplain consequences for notes, sessions, billing, secrets, and backups.
BoundariesMark browser, application, storage, external services, and agent tooling.
AuthoritySeparate proposed input from server-derived permission.
TestState a failing condition and the evidence that would show it is blocked.

Chapter assessment

Take the chapter assessment on assets, trust boundaries, agent access and threat-model tests.

Sources and further reading

  1. OWASP: Threat Modeling

    Model the system, threats, mitigations, and whether the mitigations work. Checked 16 November 2026.

  2. OWASP Application Security Verification Standard

    Security requirements framework; official site currently offers ASVS 5.0.0. Select and version relevant requirements; this course is not an ASVS assessment or certification. Checked 16 November 2026.

  3. Docker: Compose uses

    Optional disposable local services; not a required course dependency. Checked 16 November 2026.

  4. Mailpit: Test email capture

    Optional local SMTP capture and inbox for synthetic email tests. Checked 16 November 2026.

  5. Stripe: CLI

    Optional Stripe test tooling; use its current installation and webhook-forwarding instructions. Checked 16 November 2026.

Original Slim Prep teaching.

Required project checkpoint

Map the PocketDesk trust boundaries

Set up the dossier and identify what the app and coding agent can access.

Start with

Read the PocketDesk case and choose source-inspection or your own isolated-app route. Open the Security field pack at /courses/vibe-coding-security#course-resources. It is a workbook and template pack, not a runnable starter.

  1. Record your route

    Create a dossier front page. Name the case, source chapter, and route. If inspecting a learner-owned app, record its local version and disposable environment. Otherwise write source inspection and leave execution not run.

    Expected result. An evidence label that prevents later plans being mistaken for executed tests.

  2. Draw users and assets

    Place Ada and Ben in workspace A and Cy in B. Draw browser, app server, database, billing service, optional summariser, and the coding agent. Mark private notes, credentials, sessions, subscriptions, and code as assets.

    Expected result. A boundary diagram that distinguishes the app’s users from the tool building it.

  3. Follow a private-note request

    Trace a signed-in request through session, membership, permission, and record scope. Mark where a browser-supplied workspace or note identifier must be checked rather than trusted.

    Expected result. A numbered request path with authority checks at the server boundary.

  4. Limit the coding agent

    Write what the agent needs for a local change and what it should not receive, such as production credentials or unrestricted cloud access. Identify when a new package, MCP tool, network access, or deployment needs a separate review.

    Expected result. An agent-permission proposal linked to actual development tasks.

  5. Save the review questions

    Write the promises you will inspect across the course: permitted note access, denied cross-workspace access, safe recovery, verified billing, and bounded optional summaries. Link each promise to its later milestone.

    Expected result. The first indexed record and a list of questions the project must resolve.

Save these outputs

  • Dossier scope, trust-boundary diagram, private-note request path, and coding-agent permission proposal.

If you get stuck

My diagram says “authenticated = allowed.”
Separate session identity from workspace membership, permission, and record-level access.
I have no local app.
Use the provided case and snippets. Write expected outcomes and keep execution not run; the source-inspection route is supported.

Your checkpoint template

Record: PocketDesk scope and boundaries
Route: source inspection / learner-owned isolated app
Source or app version:
Users and workspace membership:
Assets and components:
Private-note request path:
Server authority checks:
Coding-agent permitted capabilities:
Capabilities requiring separate review:
Promises to inspect:
Observed evidence / not run:

In the student classroom, save this checkpoint in the project workspace. After the final chapter, send the complete project for instructor review. This owner review shows the instructions; it does not save or send learner work.

Back to the course contents

Continue with Vibe Coding Security

The full course includes 14 chapters, automatically graded chapter assessments and a required final project reviewed by the instructor. Self-paced access is USD 49 per course or USD 99 for all three. Paid enrollment remains closed pending launch approval. Existing students can request instructor-granted access to their assigned courses with a verified email address.

Read the complete curriculum

This public sample is the first chapter only. It does not grant classroom access.