Prompt-Bibliothek

Cybersicherheit-Prompts

Defensive Sicherheits-Prompts: Bedrohungsmodelle für einen Entwurf, sichere Code-Reviews und Vorfallchronologien aus Logs.

Die Prompts sind auf Englisch, der Sprache, in der sie geschrieben und getestet wurden. Beschreibungen und Hinweise auf diesen Seiten sind übersetzt.

  • threat modeling
  • stride
  • secure design
100/100 · 174 Tokens

Bedrohungsmodell für einen Entwurf

Erstellt aus einer Systembeschreibung ein STRIDE-Bedrohungsmodell mit einer Gegenmaßnahme für jede Bedrohung.

Einsetzen, wenn: Beim Prüfen eines Entwurfs vor dem Bau oder beim Dokumentieren der Risiken eines Systems, das Sie verantworten.

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>

Variablen

{{system}}
Die Komponenten, Datenflüsse, Nutzer und wo Daten gespeichert werden.

Beispieleingabe

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

Beispielausgabe

## 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 |

Beispielhaft: geschrieben, um die erwartete Form zu zeigen, nicht von einem Modell erzeugt.

  • secure coding
  • owasp
  • code review
100/100 · 151 Tokens

Sicheres Code-Review

Prüft Code auf Injection, fehlerhafte Zugriffskontrolle und unsicheren Umgang mit Secrets und Eingaben.

Einsetzen, wenn: Beim Review einer Änderung, die Nutzereingaben, Authentifizierung oder sensible Daten verarbeitet.

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>

Variablen

{{code}}
Der zu prüfende Code, mit Angabe der Sprache.

Beispieleingabe

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

Beispielausgabe

| 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])` |

Beispielhaft: geschrieben, um die erwartete Form zu zeigen, nicht von einem Modell erzeugt.

Machen Sie ihn zu Ihrem

Passen Sie die Anforderungen an Ihre Standards an und prüfen Sie dann das Ergebnis. Der Prompt-Analyzer bewertet neu, während Sie tippen, der Optimierer entfernt Füllwörter, ohne eine Anforderung zu verlieren, und der Sicherheitsscanner markiert Geheimnisse und personenbezogene Daten, bevor Sie den Prompt an ein Modell senden.

Weitere Kategorien