57blocks security baseline. Load first for any task that writes, modifies or reviews code: lists the forbidden patterns, the P0–P3 severity scale, which security knowledge pack to load per code type, and the security self-check required before delivery.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Sec Core?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/57blocks-sec-core)
---
name: "sec-core"
description: "57blocks security baseline. Load first for any task that writes, modifies or reviews code: lists the forbidden patterns, the P0–P3 severity scale, which security knowledge pack to load per code type, and the security self-check required before delivery."
user-invocable: false
---
# 57blocks security baseline
You are writing code for an outsourcing client. A P0/P1 vulnerability in a deliverable is an incident. These rules take priority over "get it running first".
## Never
1. Put secrets, private keys, seed phrases, tokens or database passwords in code, sample configs, logs, frontend bundles or test snapshots. Use environment variables or a secrets manager; `.env` must be in `.gitignore`.
2. Build SQL / shell commands / templates / file paths / URLs by string concatenation. Use parameterized APIs and allowlists.
3. Trust identity, role, amount, price, user ID or tenant ID sent by the client. Re-derive and validate them on the server / in the contract.
4. Add an endpoint, server action or external contract function without an authorization check. Deny by default, allow explicitly.
5. "Fix" an error by disabling a security mechanism: `verify=False`, `rejectUnauthorized: false`, `cors origin *` + credentials, `csrf_exempt`, JWT without signature verification, `mock_all_auths` in production code.
6. Let LLM output directly become code execution, SQL, shell, side-effecting tool calls or HTML without validation and access control.
7. In contracts: use a spot price as an oracle, omit slippage/deadline, or leave initialize or upgrade functions callable by anyone.
## Severity
P0 Critical / P1 High / P2 Medium / P3 Low. Definitions in [severity.md](severity.md). **P0 and P1 must be fixed before delivery.**
## Load knowledge packs by code type
When writing or changing code, follow the 57blocks trigger table for the code's domain (written by `sec-init`; its lines point to `sec-code` cards for detail).
When reviewing the code below (sec-check, sec-audit), read the matching skill before starting. A coding task does not open these skills to prepare; the trigger table is enough:
| Code characteristics | Load |
|---|---|
| Web backend, API, frontend, auth, payments, file upload, cloud config | `sec-web` |
| Any smart contract | `sec-web3-common` + the matching chain below |
| `*.sol`, foundry.toml, hardhat.config | `sec-web3-evm` |
| Cargo.toml contains `soroban-sdk` | `sec-web3-soroban` |
| Anchor.toml / `solana-program` | `sec-web3-solana` |
| `Move.toml` (Sui / Aptos) | `sec-web3-move` |
| `*.fc` / `*.func` / `*.tact` / `*.tolk` | `sec-web3-ton` |
| LLM calls, agents, tool calling, RAG, vector stores | `sec-ai-llm` |
| Flutter / React Native / iOS / Android | `sec-mobile` |
| Wallets, signing, seed phrases, DApp frontends connecting wallets | `sec-wallet-dapp` |
| Deployment, cloud, containers, CI/CD, keys and on-chain operations (hardening checklist, not code review) | `sec-harden` |
Packs not yet available: apply the "Never" list above and general security principles, and state in your reply that the domain lacks dedicated rules.
## Output language
The project language is recorded by `sec-init` in the `<!-- 57blocks-security:language=xx -->` marker of the `57blocks-security` block in `CLAUDE.md`, `AGENTS.md` or `.cursor/rules/57blocks-security.mdc`. No marker means `en` (English); `zh` means Simplified Chinese. A language the user explicitly asks for in the current conversation overrides it for that conversation.
- Written in the project language: replies to the user, the self-check summary, sec-check results, both audit reports, and the text fields of `findings.json` (`title`, `description`, `exploit`, `impact`, `recommendation`, `severityRationale`, `verification`, dismissal reasons).
- Always kept as-is: checklist item IDs (WEB-02, SOL-20), finding IDs (SEC-001), severity labels P0–P3, JSON keys and enum values, code, file paths, commands, tool names and their raw output, and the `Security self-check:` prefix (the status after it is in the project language).
- Report templates are written in English; translate their headings and fixed text into the project language when filling them in.
## Pre-delivery self-check (required before ending every task)
When the change matched a trigger line, check the diff against each matched line, fix P0/P1 on the spot, and end the reply with the `Security self-check: …` line built from the facts checked. Otherwise output `Security self-check: pass (no sensitive changes)`.
When a more thorough check is needed, suggest the user run `sec-check` (current changes) or `sec-audit` (whole project).