Appmint AI Review
Collection
Open eval and review checklist for AI-generated code and LLM features. • 2 items • Updated
id stringlengths 7 7 | language stringclasses 2
values | category stringlengths 4 26 | severity stringclasses 3
values | code stringlengths 55 245 | why_it_matters stringlengths 95 157 | suggested_fix stringlengths 81 145 | reviewer_note stringlengths 49 96 |
|---|---|---|---|---|---|---|---|
APM-001 | javascript | swallowed_error | high | async function loadInvoices() {
try {
const res = await fetch("/api/invoices");
return await res.json();
} catch (e) {
return [];
}
} | A failed request is rendered as an empty invoice list. Users conclude they have no invoices, and the real incident is invisible to the team. | Surface an error state, log the failure with context, and retry where appropriate. Do not convert operational failures into empty success states. | Check every catch block for a return value that looks successful. |
APM-002 | python | hardcoded_secret | critical | import stripe
STRIPE_KEY = "sk_test_51Jexampleexampleexample"
stripe.api_key = STRIPE_KEY | A payment secret is committed to source control. Anyone with repository access, or anyone who finds a leaked build artifact, can use it. | Rotate the key immediately. Load it from a secret manager or environment variable, and add a secret scan to CI. | Check tests, examples, notebooks, and CI files, not just application code. |
APM-003 | javascript | missing_authorization | critical | app.get("/api/invoices/:id", async (req, res) => {
const invoice = await db.invoice.findUnique({
where: { id: req.params.id },
});
res.json(invoice);
}); | Any signed-in user can read any invoice by changing the ID. The UI hides the link; the API does not enforce ownership. | Scope the query to the authenticated user or tenant. Return 404 for records the caller cannot access. | Trace every route that accepts an object ID and verify the authorization predicate. |
APM-004 | javascript | ssrf | high | app.post("/fetch", async (req, res) => {
const response = await fetch(req.body.url);
res.send(await response.text());
}); | The server will fetch arbitrary URLs, including internal metadata endpoints, admin panels, and cloud credentials. | Use an allowlist of schemes and hosts. Resolve DNS and block private, loopback, link-local, and metadata ranges. Re-check redirects. | Any user-controlled URL fetch is an SSRF candidate until proven otherwise. |
APM-005 | python | race_condition | high | @app.post("/redeem")
def redeem():
code = Code.query.filter_by(token=request.json["token"]).first()
if code and not code.used:
code.used = True
db.session.commit()
return {"ok": True}
return {"ok": False}, 400 | Two concurrent requests can both observe used=False and redeem the same code. The check and the update are not atomic. | Use a conditional update or unique constraint that enforces single use at the database layer, then verify the affected row count. | Look for check-then-act sequences around money, inventory, invitations, and one-time tokens. |
APM-006 | python | unsafe_deserialization | critical | import pickle
@app.post("/load")
def load():
return pickle.loads(request.data) | Untrusted pickle data can execute arbitrary code during deserialization. This is remote code execution, not a parsing bug. | Use JSON with an explicit schema, or a safe serialization format. Never unpickle data from an untrusted source. | Search for pickle, marshal, yaml.load, and language-specific unsafe deserializers. |
APM-007 | python | prompt_injection | high | def answer(user_input, docs):
prompt = f"""Use these docs: {docs}
Question: {user_input}"""
return llm(prompt) | Retrieved documents and user input share the same instruction channel. An attacker can place instructions in a document and redirect the model. | Separate system instructions from untrusted content, mark data boundaries, restrict tool use, and validate outputs against a policy. | Test indirect injection through uploaded files, web pages, issue comments, and retrieved chunks. |
APM-008 | python | rag_tenant_leak | critical | def search(query, vector_db):
return vector_db.search(query, top_k=5) | The retrieval query has no tenant filter. One customer can receive another customer's documents if the shared index contains them. | Enforce tenant and permission filters at the data layer, not only in the prompt. Test cross-tenant queries explicitly. | Check both vector metadata filters and the underlying document store. |
APM-009 | python | overbroad_tool_permissions | high | tools = [delete_user, send_email, read_file, execute_sql]
agent.run(user_message, tools=tools) | The agent can delete users, send mail, read files, and run SQL for any request. A prompt injection becomes a destructive action. | Grant the minimum tools for the task, enforce per-user authorization inside each tool, and require confirmation for irreversible actions. | List every tool the model can call and ask what happens if the model is wrong or manipulated. |
APM-010 | javascript | unsafe_html | high | function renderComment(comment) {
const container = document.querySelector("#comment");
container.innerHTML = comment.body;
} | User-controlled HTML is inserted into the page. A comment can execute script in another user's session. | Render as text, or sanitize with a maintained allowlist sanitizer. Avoid innerHTML for untrusted content. | Search for innerHTML, dangerouslySetInnerHTML, v-html, and template interpolation into raw HTML. |
APM-011 | javascript | duplicate_billing | high | async function charge(order) {
const payment = await stripe.charges.create({
amount: order.total,
currency: "usd",
source: order.token,
});
await db.order.update({ where: { id: order.id }, data: { paid: true } });
} | A retry after a timeout can create a second charge. The payment provider and the order state are not updated atomically. | Use an idempotency key derived from the order, persist payment intent state, and make the webhook the source of truth. | Check every money-moving call for idempotency and retry behavior. |
APM-012 | javascript | invented_api | medium | const user = await db.users.findByEmailOrThrow(email);
const session = await auth.createSessionForUser(user); | The method names look plausible but may not exist in the installed SDK. The happy path passes only because the code was never executed against a real client. | Verify each call against the pinned SDK version, add a type check, and cover the path with an integration test. | AI-generated code often invents APIs. Check package versions and generated types. |
APM-013 | javascript | path_traversal | high | app.get("/download", (req, res) => {
const file = path.join("/srv/uploads", req.query.name);
res.sendFile(file);
}); | A crafted name such as ../../etc/passwd escapes the upload directory and reads arbitrary files. | Resolve the path, verify it stays under the intended root, and use an allowlist of downloadable files. | Check joins, normalization, and symlink handling. |
APM-014 | python | open_redirect | medium | @app.get("/login/callback")
def callback():
return redirect(request.args.get("next")) | The app can redirect users to an attacker-controlled site after login, which is useful for phishing and token leakage. | Accept only relative paths or an allowlist of trusted origins. Reject scheme-relative URLs. | Test next, return_to, redirect_uri, and similar parameters. |
APM-015 | javascript | permissive_cors | high | app.use(cors({
origin: "*",
credentials: true,
})); | The configuration is contradictory and can expose authenticated responses to unintended origins depending on the framework and browser behavior. | Use an explicit origin allowlist and only enable credentials for trusted origins. | Do not accept wildcard CORS on authenticated APIs. |
A small, synthetic seed set for evaluating how well a model or reviewer catches the kinds of issues that ship in AI-generated code.
This is not a definitive benchmark. It is a transparent starting point: 15 short examples with a category, severity, explanation, and suggested fix. We publish it so clients and builders can see how we think about review quality.
Each row in data/eval.jsonl contains:
| Field | Meaning |
|---|---|
id |
Stable example ID |
language |
Language used in the snippet |
category |
Appmint finding category |
severity |
Suggested severity: critical, high, medium, low |
code |
Synthetic code snippet |
why_it_matters |
Consequence in plain English |
suggested_fix |
Most direct fix path |
reviewer_note |
What a human reviewer should check next |
from datasets import load_dataset
ds = load_dataset("appmint-me/appmint-ai-review-eval", split="train")
print(ds[0])
code and ask for a finding.We welcome additional synthetic examples that are:
Open a discussion on the dataset page or email hello@appmint.me.
The dataset is released under CC-BY-4.0. You may use it commercially with attribution to Appmint.
@misc{appmint_ai_review_eval_2026,
title = {Appmint AI Review Eval v0.1},
author = {Appmint},
year = {2026},
howpublished = {Hugging Face Datasets},
url = {https://huggingface.co/datasets/appmint-me/appmint-ai-review-eval}
}