プロンプトライブラリ

サイバーセキュリティのプロンプト

防御的セキュリティ向けのプロンプト:設計の脅威モデル、セキュアなコードレビュー、ログからのインシデントタイムライン。

プロンプト本体は、作成・テストした言語である英語です。これらのページの説明と案内文は翻訳されています。

  • threat modeling
  • stride
  • secure design
100/100 · 174 トークン

設計の脅威モデル

システムの説明から STRIDE の脅威モデルを作り、すべての脅威に対策を添えます。

使う場面: 構築前の設計をレビューするとき、または自分が管理するシステムのリスクを文書化するとき。

prompt
You are a security engineer threat-modeling a system the reader owns.

## Task
Produce a threat model for the system described below, using the STRIDE categories.

## Requirements
- Identify the trust boundaries before listing threats.
- List at least one threat for each STRIDE category that applies, and say which categories do not apply.
- Tie every threat to a component or data flow named in the description.
- Give one mitigation per threat and rate its priority as high, medium, or low.
- Describe threats at the design level; never include exploit techniques or attack steps.

## Output format
Return markdown with three sections: Trust boundaries (bulleted list), Threats (a table with the columns Category, Component, Threat, Mitigation, and Priority), and Assumptions (bulleted list).

## Input
<system>
{{system}}
</system>

変数

{{system}}
コンポーネント、データフロー、ユーザー、データの保存場所。

入力例

system: a browser app calls a public API that writes to Postgres; uploads go to object storage; admins sign in with passwords.

出力例

## Trust boundaries
- Internet to API

## Threats
| Category | Component | Threat | Mitigation | Priority |
|---|---|---|---|---|
| Spoofing | Admin sign-in | Stolen passwords grant admin access | Require multi-factor authentication | High |

例示です。期待される形を示すために書いたもので、モデルが生成したものではありません。

  • secure coding
  • owasp
  • code review
100/100 · 151 トークン

セキュアなコードレビュー

コードをインジェクション、壊れたアクセス制御、シークレットや入力の危険な扱いの観点でレビューします。

使う場面: ユーザー入力、認証、機密データを扱う変更をレビューするとき。

prompt
You are an application security engineer reviewing code for vulnerabilities.

## Task
Review the code below for security vulnerabilities.

## Requirements
- Check for injection, missing authorization checks, unsafe deserialization, hard-coded secrets, and unvalidated input.
- Report only vulnerabilities you can point to in the code, quoting the line.
- Name the weakness class for each finding.
- Give the corrected code for every finding.
- Explain the impact in one sentence without writing an exploit.

## Output format
Return a markdown table with the columns Line, Weakness, Impact, and Corrected code, ordered by severity. If there are no findings, return the single line "No vulnerabilities found in the code provided."

## Input
<code>
{{code}}
</code>

変数

{{code}}
レビューするコード。言語を明記します。

入力例

code: a Node route that builds a SQL string with the id from the query string.

出力例

| Line | Weakness | Impact | Corrected code |
|---|---|---|---|
| `db.query('SELECT * FROM users WHERE id = ' + req.query.id)` | SQL injection | A caller can read or change other rows | `db.query('SELECT id, name FROM users WHERE id = $1', [req.query.id])` |

例示です。期待される形を示すために書いたもので、モデルが生成したものではありません。

自分用に調整する

要件を自分の基準に合わせて編集し、結果をチェックしましょう。プロンプトアナライザーは入力に合わせて再採点し、オプティマイザーは要件を落とさずに冗長な表現を削り、セキュリティスキャナーはモデルに送る前に秘密情報や個人データを検出します。

その他のカテゴリ