← All insights

Security engineering

Security checks before launching code built with Cursor or GitHub Copilot

A practical security-review checklist for Cursor and GitHub Copilot users: customer permissions, uploads, secrets, safe configuration and verified fixes.

Key takeaways

  • Check the behaviour behind the feature: who can reach it, whose data it touches and which limits apply.
  • Use Cursor and GitHub Copilot review features alongside an independent Dokima review of the codebase.
  • For each fix, test the unauthorised request and the legitimate customer journey before release.

Cursor or GitHub Copilot can help you turn an idea into a working feature quickly. Before launch, give the resulting application a security review that follows its permissions, data and server-side behaviour. Clean code and a passing happy-path test tell you that a feature works; a security check asks what else a caller can make it do.

Start with the operations that matter most: reading another customer’s records, uploading files, changing account privileges and reaching paid features. The same checklist is useful for code written with Claude Code, Codex or another assistant.

1. Write down the rules the code must preserve

Before asking an agent to inspect the code, give it concrete rules. For a customer portal, these might be:

  • Members can access only their own organisation’s projects and invoices.
  • Only administrators may invite members or change roles.
  • Uploaded documents stay private and have a defined size limit.
  • Paid operations require server-verified entitlement.

Put relevant architecture and security assumptions in DOKIMA.md for Dokima, and use the coding tool’s supported repository instructions for development. Keep the reviewed commit and deployment settings identifiable. A reviewer can then follow each operation through the components that enforce these rules.

2. Check a request for another customer's record

Illustrative example: an assistant adds GET /api/invoices/:id. The route checks for a signed-in user and loads the invoice by its ID. The interface only links to that user’s invoices, but the server does not check ownership.

In a staging environment with synthetic records, sign in as a customer from organisation A and request an invoice owned by organisation B. The server should refuse access without returning the other customer’s details. Also confirm that organisation A’s own invoice still works and that a signed-out request is refused.

A focused instruction for Cursor or Copilot is:

Trace this invoice route through authentication, membership lookup and data access. Check whether the server binds the requested invoice to the caller’s permitted organisation. Use the existing permission helper for a focused fix. Add tests for another organisation’s invoice, a permitted invoice and a signed-out request. Preserve unrelated changes and show the diff before release.

Repeat the check for exports, previews, search and administrative routes. The repair may belong in a shared helper used by several routes. Hiding a button or filtering records in the browser cannot enforce server-side permissions.

3. Check uploads and expensive operations

For uploads, inspect how the server chooses the destination, who may read the result and how much work it accepts. A generated handler can look reasonable while missing one of those application rules.

Check these cases in an isolated test environment:

  • An ordinary user requesting a file belonging to another customer.
  • A filename containing path separators or a name that collides with an existing file.
  • A request exceeding the intended upload limit, and an archive or image whose expanded size exceeds the processing budget.
  • Repeated requests to an expensive export, conversion or AI endpoint.

Use controlled test sizes and limits. A safe repair usually combines access checks, server-chosen storage locations and limits before expensive processing begins. Follow the application’s established storage and confinement helpers instead of adding a one-off filename filter.

4. Check secrets and permissive fallbacks

Inspect committed configuration, generated frontend bundles and error output for private credentials. Verify that development fallbacks cannot silently enable production access: missing signing keys, disabled webhook verification, development administrator accounts and overly trusting proxy settings deserve explicit checks.

If a real credential has been exposed, rotate it and review access. Removing it from the latest source does not invalidate copies already obtained.

Check paid features at the server too. A hidden upgrade button and a browser-supplied plan name do not establish payment entitlement. Trace the trusted state used to grant the operation.

5. Use the review features in your coding tools

Cursor Security Agents include pull-request review and codebase scanning. GitHub Copilot code review can review changes and provide suggested repairs. Use the features available to your account and inspect their findings before merging.

Give each reviewer the application’s ownership rules and ask it to trace the full request path. Review a proposed change in a separate pass, with tests and the relevant surrounding code available. A casual “check your work” message at the end of a long feature-building conversation leaves the task too vague.

Keep dependency and secret checks enabled as well. A source-level permissions review and a known-vulnerable package check cover different parts of the release.

6. Add ongoing review with Dokima

Dokima provides an always-on security reviewer alongside your coding workflow. It builds and retains an architectural model, investigates both changes and existing code, and challenges candidate findings before reporting evidence and practical fixes.

Set it up on a dedicated Linux VPS, VM or user account with an up-to-date checkout and your chosen Claude, Codex or OpenCode runner. Explain the trust boundaries in DOKIMA.md, run a full review and inspect the findings. For a Lovable or Replit application, use the Lovable and Supabase guide or Replit launch guide to include the platform-specific parts.

Apply fixes on a development branch, repeat the failure case and normal customer journey, and run the required build and tests. Then publish through your usual release process and let ongoing review follow the new source. The security-fix checklist helps the team agree when a repair is ready to close.

Dokima is free for small teams, including private repositories. Inspect the sample report to see how evidence and remediation fit into the workflow.

Next step

Evaluate this workflow on your own codebase.

Dokima runs locally on Linux and macOS using Claude, Codex or OpenCode, with staged architecture mapping, adversarial challenge, deterministic deduplication and developer-ready HTML reports. The 21-day free trial starts on first activation and requires no payment card.

Try Dokima on your repositories

Give your engineering team a repeatable AI source-review workflow.

Start a full-product 21-day trial with no payment card required, or inspect the complete sample report.