Defensive kit · test YOUR app

Hack yourself before someone hacks your app

Built an app with AI and don't know what ended up exposed? Run the check, follow the five gaps and close the doors — all on a test copy, without touching production.

Banner of the Hack your own app defensive kit
In short

Hack your own app is a defensive review kit with a checker, five gap guides and prompts to organize the results. It is for anyone who built an app with AI and can edit the project, but does not work with security every day. It helps you look for signs of flaws, fix the app's rules and verify the result before publishing. To use it, you need an isolated copy of your app, made-up data, two fake accounts and Python 3.

What it is

What it is

A playbook to review your app, fix one flaw at a time and record what was confirmed.

Illustrated panel of the five gaps covered by the defensive kit

🛡️ Non-destructive check

A single read request looks for signs in the HTML and inline JavaScript, with no login, forms or redirects.

🛡️ Five gaps with fixes

Each guide explains the problem, a controlled scenario, the fix and how to confirm the result.

🛡️ Ready-made prompts

Organize a simulated penetration test and a visual report with evidence, limits and priorities.

How it works

How it works

Start on an isolated copy, review the rules and repeat both the rejected scenario and the legitimate use.

Prepare copy→ Run check→ Read the gaps→ Fix on the server→ Confirm
Prerequisites

Prerequisites

Prepare the test copy and open the terminal in the project folder; the checker uses Python 3, with no additional dependencies.

Isolated copy of the app

Staging is a copy for testing. Use made-up data, accounts A and B, a test email and simulated payments; disable external integrations and back up the copy.

# Checklist before any access
Authorized URL and routes
Fake accounts A and B
Test email and payment
Backup of the copy

Python 3

Check the installation in the terminal; there is no need to install additional packages.

python3 --version

Kit files

Open the terminal at the root of this repository, where the kit folder lives, and check the checker's real options.

python3 kit/scripts/checa.py --help
How to use · step by step

How to use

Follow the six steps on your test copy. The address in the commands is illustrative: replace it with your app's authorized URL.

1

Prepare staging

Read START HERE (in Portuguese). Record authorization, URL, allowed routes and the person in charge. Confirm the prerequisites above; never use production.

# Read the local instructions before testing
cat kit/COMECE-AQUI.md
2

Run the check

Replace the URL with your isolated copy's. The flag declares your permission; the script does not prove ownership or isolation. It makes a single GET, does not follow redirects and only reads the HTML and inline JavaScript of the response. A sign does not confirm a flaw; the absence of signs does not prove security.

python3 kit/scripts/checa.py --url https://staging.seu-app.test --eu-tenho-permissao
# Optional: add --json for structured output
3

Read the five gaps

Follow documents 01 to 05 and record evidence without passwords, tokens or personal data.

  1. Password reset (in Portuguese)
  2. Reviews and comments (in Portuguese)
  3. Site chatbot (in Portuguese)
  4. Checkout and price (in Portuguese)
  5. Email and agent (in Portuguese)
# Read the five documents in the terminal, if you prefer
cat kit/brechas/*.md
4

Apply the fix on the server

Adapt the pseudocode to your app, one change at a time, including alternate routes. For comments, also review safe rendering on every screen. Repeat the rejected scenario and the legitimate flow; check the database, logs and final state.

# There is no universal fix command.
# Record of each finding:
gap · route · fake account · evidence
risk · fix · retest · owner
5

Use the prompt on a test copy

Open the pentest and visual report prompt (in Portuguese). Copy the block and provide the URL, allowed routes and isolation before any access. Start by reading the code and passive checks; state changes should be simulated scenarios or local tests run by you.

cat kit/prompts/pentest-do-seu-app.md
6

Check the kit

Run the checker's offline tests. They do not validate your app's security: that confirmation depends on the retests in staging and the evidence for each gap.

python3 kit/testes/run.py
Examples

The five gaps

For each one, mark: applicable, not applicable or pending. Open the document to see the test scenario and the retest.

Password reset

An ID sent by the browser can pick the wrong account during the password change. Fix: On the server, derive the account only from the token, with expiration and single use, preventing two simultaneous uses.

Reviews and comments

Saved content can be interpreted as code in the reader's browser. Fix: Show comments as text and, if you allow formatting, filter tags and attributes with a sanitizer based on an allowlist.

Site chatbot

Off-topic requests can consume your response quota. Fix: Validate the subject before responding and enforce usage and budget limits on the server, independent of the model.

Checkout and price

The server may accept a value altered by the buyer as the final price. Fix: Calculate the total on the server and check order, value, currency and status when confirming the payment.

Email and agent

The agent may confuse instructions received by email with orders from the owner. Fix: Treat messages as data, limit permissions and require human confirmation for sensitive actions in the executor.

Video

The kit explained on video

The real case, the five common doors and how to test on your copy, in four minutes (in Portuguese).

▶ Watch on YouTube · Player with subtitles and chapters

Roadmap

Roadmap

The kit documents what is available today; new gaps and a CI mode are not implemented and have no set deadline.

Today
Five gaps + passive checkFix guides, a checker with text or JSON output, review and report prompts, local examples and offline tests.
To assess
More gaps and continuous integrationPossible evolutions, with no commitment to deliver: expanding the scenarios and a CI mode, for automatic checks on every change to the project.