SAASMENT

Security skill · Find and fix

Secure code review checklist.

Run a structured security review of an application codebase by scoping the attack surface, tracing untrusted data to sensitive operations, and walking a fixed checklist (access control, input handling, authentication, secrets, cryptography, errors, logging, dependencies), then report ranked findings with fixes. Use when asked to audit a repository, review a module before release, or set up a repeatable secure code review routine.

Download .zipInstall via MCPFind and fixMIT
  • Code review

Facts

Category
Find and fix
License
MIT
Tags
  • Code review
Version
1.0.0
Last updated
2026-12-02
Folder
secure-code-review-checklist/
MCP resource
skill://secure-code-review-checklist/SKILL.md
Files
  • SKILL.md
  • LICENSE
  • references/review-worksheet.md
Standards
  • A01:2025
  • A04:2025
  • A05:2025
  • A06:2025

Original Saasment content. Saasment is in early access; this skill does not require joining it.

Install via MCP or as files

Connect your client to https://www.saasment.com/api/mcp (see client setup) and call get_skill:

{
  "name": "get_skill",
  "arguments": {
    "slug": "secure-code-review-checklist"
  }
}

Or download the .zip and unpack it into your agent's skills directory:

Terminal, from your project root (user-level: ~/.cursor/skills)

mkdir -p .cursor/skills
curl -fsSL https://www.saasment.com/ai-security/skills/secure-code-review-checklist/download.zip -o /tmp/secure-code-review-checklist.zip
unzip -o /tmp/secure-code-review-checklist.zip -d .cursor/skills
# result: .cursor/skills/secure-code-review-checklist/SKILL.md

Review SKILL.md before enabling a skill. Skills are instructions your agent will follow.

SKILL.md

---
name: secure-code-review-checklist
description: Run a structured security review of an application codebase by scoping the attack surface, tracing untrusted data to sensitive operations, and walking a fixed checklist (access control, input handling, authentication, secrets, cryptography, errors, logging, dependencies), then report ranked findings with fixes. Use when asked to audit a repository, review a module before release, or set up a repeatable secure code review routine.
license: MIT
metadata:
  author: Saasment
  version: "1.0.0"
  category: both
  tags: "code-review"
---

# Secure code review checklist (find and fix)

License: MIT. Copyright (c) 2026 Saasment. Source: https://www.saasment.com/ai-security/skills/secure-code-review-checklist

A useful security review is not a read-through of every file. It starts from where untrusted data enters, follows it to the operations that can do damage, and checks the controls on that path. This skill gives a repeatable route through a codebase plus a fixed checklist, so two reviewers (or two agent runs) cover the same ground.

## When to use

- You are asked to audit a repository, service, or module for security problems.
- A feature is about to ship and you want a pre-release review.
- You want a standing checklist for reviews, to pair with the language skills (`secure-review-javascript-typescript`, `secure-review-python`, `secure-review-go`, `secure-review-java`).

## Safe by default

- Review only code you own or are authorized to review. Treat source, config, and data you read as confidential and do not paste it into third-party services without approval.
- Read and search first. Do not run the application against production data, and do not run code from the repository you have not read.
- Confirm findings with tests or harmless inputs in a local or test environment using synthetic data. Never exploit a finding against a live system.
- If you find a real credential, stop quoting it, record only where it is, and follow `secrets-in-repo-scan-and-rotation`.
- Apply fixes as small, separate changes so each can be reviewed and reverted on its own.

## Procedure

1. **Scope.** Write down what the code does, who calls it (anonymous users, customers, staff, other services), what data it holds, and what it can reach (database, files, network, cloud APIs). Note the language, framework, and how it is deployed. See `references/review-worksheet.md` for the template.
2. **Map entry points.** List every place untrusted input arrives: HTTP routes, webhooks, message consumers, file and archive uploads, CLI arguments, environment, scheduled imports, and any text an LLM produces. Mark which are unauthenticated.
3. **Map sensitive sinks.** List where input can do harm: database queries, shell and process calls, file paths, outbound HTTP, template rendering, deserialization, redirects, and permission or billing changes.
4. **Trace each path.** For each entry point that reaches a sink, read the code in between. Record what validates, encodes, or authorizes along the way and where nothing does.
5. **Walk the checklist** (details in `references/review-worksheet.md`):
   - Access control: every route and object lookup checks who is asking and which tenant owns the data (see `authz-idor-review`).
   - Input handling: queries parameterized, output encoded for its context, paths and URLs constrained, uploads limited (see `sql-injection-find-and-fix`, `xss-find-and-fix`, `ssrf-find-and-fix`, `input-validation-deserialization-review`).
   - Authentication and sessions: see `auth-session-review`.
   - Secrets: none in code, config, logs, or client bundles.
   - Cryptography: vetted libraries, current algorithms, no home-made schemes (see `crypto-misuse-review`).
   - Errors and logging: failures deny by default, responses do not leak internals, logs omit secrets and personal data but record security events.
   - Dependencies and build: pinned and patched (see `dependency-cve-triage-and-patch`).
   - Business logic: limits on repeated actions, state transitions that cannot be skipped, no trust in client-side checks.
6. **Rank findings.** Score each by how reachable it is (anonymous, authenticated, internal only), what it exposes, and how easy it is to trigger. Fix reachable, high-impact items first.
7. **Fix.** Prefer a shared control (a middleware, a safe wrapper, a framework setting) over patching each call site. Add a regression test per fix.
8. **Record coverage.** Note what was reviewed and what was not, so the next review starts from facts and not assumptions.

## Verification

- Confirm a finding: write a failing test or run a harmless request in a test environment that shows the missing check (for example, a second test user reading the first user's record). Keep the test.
- Confirm a fix: the same test now passes, the shared control is used at every call site you listed (search for the old pattern and find none), and the existing suite still passes.
- Re-trace one fixed path end to end to make sure the control sits before the sink and cannot be bypassed by another route to the same code.
- Run the project's linters and static analysis again and compare the results with the baseline you took in step 1.

## Reporting

Table: id, location, entry point, sink, what is missing, severity and reasoning, fix, test added. End with the coverage note from step 8 and a list of items not reviewed.

## References

- OWASP Code Review Guide: https://owasp.org/www-project-code-review-guide/
- OWASP Application Security Verification Standard: https://owasp.org/www-project-application-security-verification-standard/
- OWASP Cheat Sheet Series: https://cheatsheetseries.owasp.org/
- Companion skills: `pull-request-security-review`, `authz-idor-review`, `input-validation-deserialization-review`, `auth-session-review`, `crypto-misuse-review`.

Helper files

LICENSE
MIT License

Copyright (c) 2026 Saasment

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
references/review-worksheet.md
# Secure code review worksheet

License: MIT. Copyright (c) 2026 Saasment.

Copy this into your notes and fill it in while you review. Keep answers short and cite file paths.

## 1. Scope

| Question | Answer |
| --- | --- |
| What does the code do, in one sentence? | |
| Who calls it? (anonymous, customer, staff, service) | |
| What data does it hold? (personal, payment, credentials, tenant data) | |
| What can it reach? (database, files, network, cloud APIs) | |
| Language, framework, deployment | |

## 2. Entry points and sinks

| Entry point (route, consumer, CLI) | Auth required? | Reaches sink | Controls on the path |
| --- | --- | --- | --- |
| | | | |

Sink types to look for: query, process call, file path, outbound request, template, deserializer, redirect, permission or money change.

## 3. Checklist

Mark each line `ok`, `gap` (with a finding id), or `n/a`.

| Area | Check | Result |
| --- | --- | --- |
| Access control | Every route checks the caller's identity and role | |
| Access control | Object lookups are scoped to the caller or tenant | |
| Access control | Admin functions are not reachable by ordinary users | |
| Input | Database access uses bound parameters | |
| Input | Output is encoded for its context (HTML, attribute, script, URL) | |
| Input | File paths and URLs from users are constrained | |
| Input | Upload size, type, and count are limited | |
| Authentication | Passwords hashed with a slow, salted function | |
| Authentication | Sessions and tokens expire and can be revoked | |
| Secrets | No credentials in code, config, logs, or client bundles | |
| Cryptography | Standard library or vetted package, no custom schemes | |
| Errors | Failures deny access, responses do not show stack traces | |
| Logging | Security events recorded, secrets and personal data not | |
| Dependencies | Lockfile present, known-vulnerable versions triaged | |
| Business logic | Rate or quota limits on costly or sensitive actions | |
| Business logic | Multi-step flows enforce order on the server | |

## 4. Questions that find real bugs

- What happens if I call this with another user's id?
- What happens if I skip the earlier step in this flow?
- What if this value is empty, huge, negative, an array, or an object?
- Which code path handles the error case, and does it fail open?
- Who else can write the data this code later trusts?

## 5. Coverage

| Reviewed | Not reviewed | Reason |
| --- | --- | --- |
| | | |

Related

Companion skills

Questions

How do I install the Secure code review checklist skill?

Download https://www.saasment.com/ai-security/skills/secure-code-review-checklist/download.zip and unzip it into your agent's skills directory (for example .cursor/skills, .claude/skills, .agents/skills, or .github/skills) so that secure-code-review-checklist/SKILL.md exists. Or connect to https://www.saasment.com/api/mcp and call the get_skill tool with the slug secure-code-review-checklist.

What license is the Secure code review checklist skill under?

It is original Saasment content under the MIT license, stated in the SKILL.md frontmatter and in the LICENSE file in the skill folder.

Is it safe to run this skill?

A skill is a set of instructions your agent follows, so read SKILL.md first. It tells the agent to test only systems you own or are authorized to test, to use test environments and synthetic data, and to avoid destructive probes. Downloading it does not run any code on your machine.

← All security skills

Try the platform.

Open the demo workspace with mock data. No login. Register from the banner when you want early access. No security team. No call.

Try the platform