15 ready-to-use ChatGPT prompts for networking and security. Fill in the bracketed fields, paste into ChatGPT, and go.
Engineering · 15 prompts
01
Build a Network Traffic Monitoring Workflow with Baselines and Alert Triage
Develop a Python workflow for monitoring network traffic that establishes baselines, flags suspicious deviations, and routes alerts into a usable triage process.
You are a senior networking and security engineer.
Produce code or a code scaffold for a network traffic monitoring workflow with baselines and alert triage.
Context:
- Goal or feature: [goal]
- Stack or language: [stack]
- Inputs and outputs: [inputs and outputs]
- Constraints: [constraints]
- Existing code context: [existing context]
- Integration points or surrounding system: [integration points]
- Acceptance criteria or edge cases: [acceptance criteria]
Instructions:
1. Make the key implementation decisions first, then write code that is correct, readable, and idiomatic for the stated stack.
2. Default to realistic production patterns for common tasks instead of toy scaffolds.
3. Include only the structure that materially helps maintainability, testing, or integration.
4. Explicitly address the failure modes that actually break this in production: a baseline built from too short a sample window that flags normal daily or weekly traffic cycles as anomalies, no distinction between a volume spike from a legitimate event like a deploy or backup and a real attack, alert routing that pages the same channel for every severity so real signals drown in noise, and no plan for what happens when the monitor itself loses visibility, since a silent monitor looks identical to a quiet network.
5. Include validation guidance such as test cases, failure modes, or manual verification steps.
6. Avoid filler placeholders, fake environment variables, and pseudo-code unless the user explicitly wants a sketch.
Output format:
- Implementation approach
- Code
- Validation and test cases (including baseline-window and monitor-health checks)
- Integration notes and assumptions
Missing information policy:
Ask up to 2 concise questions only if the language, framework, integration point, or required behavior is unclear. Otherwise proceed with assumptions.
Quality bar:
- Prefer working simplicity with production realism.
- Avoid placeholder-heavy pseudo-code unless necessary.
- Name the specific failure modes above rather than generic edge-case language.
- Cover meaningful edge cases instead of only the happy path.
02
Design a Secure OpenVPN Deployment for Remote Access
Design a secure OpenVPN deployment for remote access with authentication model, certificate lifecycle, segmentation, logging, and recovery expectations.
You are a senior networking and security engineer advising on a real implementation rather than teaching a generic tutorial.
Help with the engineering task below.
Context:
- Goal or task: [goal]
- Stack or environment: [stack]
- Current system or surrounding architecture: [current system]
- Constraints such as security, performance, cost, or compatibility: [constraints]
- Scale, criticality, or production expectations: [criticality]
- Specific questions, failure points, or uncertainty: [pain points]
- Success criteria or desired outcome: [success criteria]
Instructions:
1. Explain the approach in the order the team should actually execute it.
2. Tailor the guidance to the stated stack, constraints, and production expectations.
3. Turn the task into concrete technical decisions, not generic setup advice.
4. Explicitly address the failure modes that actually break this in production: certificate revocation not actually checked at connect time, so a revoked device or ex-employee can still connect, authentication left as certificate-only with no MFA as an additional factor, flat network access granted once connected instead of segmentation by role, and logging enabled but never reviewed, so a compromised credential's misuse goes unnoticed.
5. Include validation, rollback, review, or monitoring checkpoints where they materially reduce implementation risk.
6. If important context is missing, make explicit assumptions and continue.
Output format:
- Authentication and certificate lifecycle design
- Revocation checking at connect time
- Segmentation model post-connect
- Logging and review process
- Main assumptions and risks
Missing information policy:
Ask up to 2 concise questions only if the stack, required outcome, or operational context is unclear. Otherwise proceed with assumptions.
Quality bar:
- Be concrete and operational.
- Prefer implementation judgment over theory.
- Name the specific failure modes above rather than generic best-practices language.
- Make the advice usable by a team shipping real work.
03
Design a Secure Data-in-Transit Protocol with SSL/TLS
Create a security protocol for encrypting sensitive data in transit using SSL/TLS.
You are a senior networking and security architect creating a plan for a real engineering initiative.
Create a plan for the task below.
Context:
- Goal: [goal]
- Stack or environment: [stack]
- Current system or baseline: [current system]
- Constraints such as security, latency, budget, or staffing: [constraints]
- Scale, complexity, or production expectations: [scale]
- Risks, current issues, or dependencies: [risks]
Instructions:
1. Recommend a practical technical approach and explain why it fits the context.
2. Break the work into sensible phases, components, or rollout stages.
3. Explicitly address the failure modes that actually derail this kind of initiative: TLS version and cipher suite left at platform defaults instead of explicitly restricted to modern, vetted options, certificate renewal automation with no alerting if it fails, allowing a silent expiry, data assumed encrypted end-to-end when a proxy or load balancer actually terminates and re-originates the connection in plaintext internally, and no plan for what happens to in-flight connections during a certificate rotation.
4. Include validation, rollback, migration, or monitoring considerations where relevant.
5. Keep the plan realistic for the stated context and avoid architecture theater.
Output format:
- Plan overview
- Recommended approach and tradeoffs
- Implementation phases or rollout path
- Risks, dependencies, and validation checks
- Main assumptions or open questions
Missing information policy:
Ask up to 2 concise questions only if the goal or environment is unclear. Otherwise proceed with assumptions.
Quality bar:
- Make the plan executable.
- Avoid overengineering.
- Name the specific failure modes above rather than generic risk language.
- Show how the plan would survive real deployment pressure.
04
Review and Implement Linux Firewall Rules for a Production Server
Review and implement Linux firewall rules for a production server with explicit allow paths, lockout prevention, logging, and validation steps.
You are a senior networking and security debugging assistant working on a real production issue.
Diagnose and improve the technical issue below.
Context:
- Problem description: [problem]
- Stack or environment: [stack]
- Current system role or production impact: [system role]
- Expected behavior: [expected]
- Actual behavior: [actual]
- Relevant code, logs, traces, metrics, or signals: [evidence]
Instructions:
1. Check first for the causes that actually produce this class of problem: a rule change applied directly to a production server with no way back in if it locks out the current session, default-deny applied before the specific allow rule for the admin's own connection is confirmed working, rule ordering that puts a broad allow before a specific deny and silently defeats the deny, and no logging enabled to confirm which rule actually matched a given connection attempt.
2. Explain the debugging path in priority order based on risk, probability, and speed of confirmation.
3. Recommend fixes, mitigations, or containment steps and when each is appropriate, including a safe rollback path if a rule change risks a lockout.
4. Include how to validate the fix and what to monitor after rollout.
5. Keep the answer concise, operational, and biased toward restoring reliability without a lockout incident.
Output format:
- Likely root causes (checked against the failure modes above)
- Highest-priority diagnostic steps
- Fix or containment options with lockout-safe rollback
- Validation and post-fix monitoring
- Main assumptions or risks
Missing information policy:
Ask up to 2 concise questions only if the stack, production impact, or failure mode is unclear. Otherwise proceed with assumptions.
Quality bar:
- Prioritize root cause over guesswork.
- Name the specific failure modes above rather than generic debugging advice.
- Explain how to verify the fix.
- Include the operational reality of shipping the change safely without locking anyone out.
05
Automate Linux Security Patching with Maintenance Windows and Rollback Safety
Develop a Linux security patching workflow that respects maintenance windows, reboot handling, rollout sequencing, failure visibility, and rollback safety.
You are a senior networking and security engineer.
Produce code or a code scaffold for a Linux security patching automation workflow.
Context:
- Goal or feature: [goal]
- Stack or language: [stack]
- Inputs and outputs: [inputs and outputs]
- Constraints: [constraints]
- Existing code context: [existing context]
- Integration points or surrounding system: [integration points]
- Acceptance criteria or edge cases: [acceptance criteria]
Instructions:
1. Make the key implementation decisions first, then write code that is correct, readable, and idiomatic for the stated stack.
2. Default to realistic production patterns for common tasks instead of toy scaffolds.
3. Include only the structure that materially helps maintainability, testing, or integration.
4. Explicitly address the failure modes that actually break this in production: patches applied with no pre-check for a required reboot, leaving services running against stale libraries until someone notices, no maintenance-window enforcement so patches can land during peak traffic, a failed patch mid-rollout with no rollback path that leaves a fleet in a mixed, unpredictable state, and patch success measured by exit code alone with no post-patch health check to confirm the service actually still works.
5. Include validation guidance such as test cases, failure modes, or manual verification steps.
6. Avoid filler placeholders, fake environment variables, and pseudo-code unless the user explicitly wants a sketch.
Output format:
- Implementation approach
- Code
- Validation and test cases (including post-patch health checks)
- Integration notes and assumptions
Missing information policy:
Ask up to 2 concise questions only if the language, framework, integration point, or required behavior is unclear. Otherwise proceed with assumptions.
Quality bar:
- Prefer working simplicity with production realism.
- Avoid placeholder-heavy pseudo-code unless necessary.
- Name the specific failure modes above rather than generic edge-case language.
- Cover meaningful edge cases instead of only the happy path.
06
Design an OAuth 2.0 Security Model for an API with Client, Scope, and Token Tradeoffs
Design an OAuth 2.0 security model for an API with client-type boundaries, scope design, token handling, and operational controls that survive production use.
You are a senior networking and security architect creating a plan for a real engineering initiative.
Create a plan for the task below.
Context:
- Goal: [goal]
- Stack or environment: [stack]
- Current system or baseline: [current system]
- Constraints such as security, latency, budget, or staffing: [constraints]
- Scale, complexity, or production expectations: [scale]
- Risks, current issues, or dependencies: [risks]
Instructions:
1. Recommend a practical technical approach and explain why it fits the context.
2. Break the work into sensible phases, components, or rollout stages.
3. Explicitly address the failure modes that actually derail this kind of initiative: scopes defined too broadly so a client authorized for one action can access far more than intended, refresh tokens with no rotation or revocation on suspected compromise, public clients like mobile apps or SPAs using a flow designed for confidential clients and exposing secrets that can't actually stay secret, and no distinction between short-lived access tokens and appropriately-audited long-lived ones.
4. Include validation, rollback, migration, or monitoring considerations where relevant.
5. Keep the plan realistic for the stated context and avoid architecture theater.
Output format:
- Plan overview
- Recommended approach and tradeoffs
- Implementation phases or rollout path
- Risks, dependencies, and validation checks
- Main assumptions or open questions
Missing information policy:
Ask up to 2 concise questions only if the goal or environment is unclear. Otherwise proceed with assumptions.
Quality bar:
- Make the plan executable.
- Avoid overengineering.
- Name the specific failure modes above rather than generic risk language.
- Show how the plan would survive real deployment pressure.
07
Design an AWS WAF Deployment with Rule Tuning and False-Positive Control
Design an AWS WAF deployment for a web application with managed and custom rule tradeoffs, logging, tuning flow, and false-positive control.
You are a senior networking and security engineer advising on a real implementation rather than teaching a generic tutorial.
Help with the engineering task below.
Context:
- Goal or task: [goal]
- Stack or environment: [stack]
- Current system or surrounding architecture: [current system]
- Constraints such as security, performance, cost, or compatibility: [constraints]
- Scale, criticality, or production expectations: [criticality]
- Specific questions, failure points, or uncertainty: [pain points]
- Success criteria or desired outcome: [success criteria]
Instructions:
1. Explain the approach in the order the team should actually execute it.
2. Tailor the guidance to the stated stack, constraints, and production expectations.
3. Turn the task into concrete technical decisions, not generic setup advice.
4. Explicitly address the failure modes that actually break this in production: managed rule groups enabled at default sensitivity and blocking legitimate traffic with no tuning pass, custom rules written without a staged rollout such as count mode before block mode, so a bad rule takes down real traffic immediately, no logging or visibility into what the WAF is actually blocking, making false positives invisible until users complain, and rate-based rules set with a threshold that doesn't reflect this application's real traffic patterns.
5. Include validation, rollback, review, or monitoring checkpoints where they materially reduce implementation risk.
6. If important context is missing, make explicit assumptions and continue.
Output format:
- Rule selection and staged rollout plan (count before block)
- Logging and visibility setup
- False-positive tuning process
- Rate-based rule thresholds matched to real traffic
- Main assumptions and risks
Missing information policy:
Ask up to 2 concise questions only if the stack, required outcome, or operational context is unclear. Otherwise proceed with assumptions.
Quality bar:
- Be concrete and operational.
- Prefer implementation judgment over theory.
- Name the specific failure modes above rather than generic best-practices language.
- Make the advice usable by a team shipping real work.
08
Design a Network Monitoring System with Nagios
Design a system to monitor bandwidth, device status, and intrusions using Nagios.
You are a senior networking and security architect creating a plan for a real engineering initiative.
Create a plan for the task below.
Context:
- Goal: [goal]
- Stack or environment: [stack]
- Current system or baseline: [current system]
- Constraints such as security, latency, budget, or staffing: [constraints]
- Scale, complexity, or production expectations: [scale]
- Risks, current issues, or dependencies: [risks]
Instructions:
1. Recommend a practical technical approach and explain why it fits the context.
2. Break the work into sensible phases, components, or rollout stages.
3. Explicitly address the failure modes that actually derail this kind of initiative: check intervals and thresholds copied from a generic template that don't match this network's real baseline, alert fatigue from checks that flap between OK and critical on transient conditions, no escalation policy so a critical alert can sit unacknowledged, and monitoring coverage that stops at the network layer with no visibility into what's actually causing an intrusion-relevant anomaly.
4. Include validation, rollback, migration, or monitoring considerations where relevant.
5. Keep the plan realistic for the stated context and avoid architecture theater.
Output format:
- Plan overview
- Recommended approach and tradeoffs
- Implementation phases or rollout path
- Risks, dependencies, and validation checks
- Main assumptions or open questions
Missing information policy:
Ask up to 2 concise questions only if the goal or environment is unclear. Otherwise proceed with assumptions.
Quality bar:
- Make the plan executable.
- Avoid overengineering.
- Name the specific failure modes above rather than generic risk language.
- Show how the plan would survive real deployment pressure.
09
Plan an MFA Rollout with Enrollment, Recovery, and Service-Account Edge Cases
Plan an MFA rollout that improves account security while handling enrollment, recovery, service-account exceptions, and operational support load.
You’ll needapplication typeuser basecurrent auth flowrecovery requirementsservice-account or automation concernsconstraints
Prompt
You are a senior networking and security architect creating a plan for a real engineering initiative.
Create a plan for the task below.
Context:
- Goal: [goal]
- Stack or environment: [stack]
- Current system or baseline: [current system]
- Constraints such as security, latency, budget, or staffing: [constraints]
- Scale, complexity, or production expectations: [scale]
- Risks, current issues, or dependencies: [risks]
Instructions:
1. Recommend a practical technical approach and explain why it fits the context.
2. Break the work into sensible phases, components, or rollout stages.
3. Explicitly address the failure modes that actually derail this kind of initiative: a recovery or account-reset flow that bypasses MFA entirely and becomes the real attack path, service accounts and automation exempted from MFA with no compensating control, enrollment that blocks legitimate access badly enough that users get trained to request bypasses from IT, and no plan for what happens when a user's MFA device is lost or replaced.
4. Include validation, rollback, migration, or monitoring considerations where relevant.
5. Keep the plan realistic for the stated context and avoid architecture theater.
Output format:
- Plan overview
- Recommended approach and tradeoffs
- Implementation phases or rollout path
- Risks, dependencies, and validation checks
- Main assumptions or open questions
Missing information policy:
Ask up to 2 concise questions only if the goal or environment is unclear. Otherwise proceed with assumptions.
Quality bar:
- Make the plan executable.
- Avoid overengineering.
- Name the specific failure modes above rather than generic risk language.
- Show how the plan would survive real deployment pressure.
10
Design a Snort-Based IDS Deployment with Rule Tuning and Alert Triage
Design a Snort-based IDS deployment with placement, rule tuning, alert triage, and false-positive control for a Linux environment.
You’ll needserver or network roletraffic profiledetection goalsalert triage capacitylogging or SIEM integrationconstraints
Prompt
You are a senior networking and security engineer advising on a real implementation rather than teaching a generic tutorial.
Help with the engineering task below.
Context:
- Goal or task: [goal]
- Stack or environment: [stack]
- Current system or surrounding architecture: [current system]
- Constraints such as security, performance, cost, or compatibility: [constraints]
- Scale, criticality, or production expectations: [criticality]
- Specific questions, failure points, or uncertainty: [pain points]
- Success criteria or desired outcome: [success criteria]
Instructions:
1. Explain the approach in the order the team should actually execute it.
2. Tailor the guidance to the stated stack, constraints, and production expectations.
3. Turn the task into concrete technical decisions, not generic setup advice.
4. Explicitly address the failure modes that actually break this in production: sensor placement that only sees a fraction of relevant traffic, such as the wrong side of a NAT or load balancer, missing the traffic that matters, default rule sets left fully enabled and producing an alert volume nobody can triage, no tuning pass to suppress known-benign patterns specific to this network, and alerts routed with no severity tiering so a port scan gets the same priority as a confirmed exploit attempt.
5. Include validation, rollback, review, or monitoring checkpoints where they materially reduce implementation risk.
6. If important context is missing, make explicit assumptions and continue.
Output format:
- Sensor placement and traffic-visibility verification
- Rule set selection and tuning process
- Alert triage and severity tiering
- False-positive suppression plan
- Main assumptions and risks
Missing information policy:
Ask up to 2 concise questions only if the stack, required outcome, or operational context is unclear. Otherwise proceed with assumptions.
Quality bar:
- Be concrete and operational.
- Prefer implementation judgment over theory.
- Name the specific failure modes above rather than generic best-practices language.
- Make the advice usable by a team shipping real work.
11
Enforce Encrypted PostgreSQL Connections Without Breaking Client Access
Plan encrypted PostgreSQL connection enforcement with certificate handling, client compatibility checks, rollout sequencing, and rollback protection.
You are a senior networking and security architect creating a plan for a real engineering initiative.
Create a plan for the task below.
Context:
- Goal: [goal]
- Stack or environment: [stack]
- Current system or baseline: [current system]
- Constraints such as security, latency, budget, or staffing: [constraints]
- Scale, complexity, or production expectations: [scale]
- Risks, current issues, or dependencies: [risks]
Instructions:
1. Recommend a practical technical approach and explain why it fits the context.
2. Break the work into sensible phases, components, or rollout stages.
3. Explicitly address the failure modes that actually derail this kind of initiative: enforcing SSL/TLS connections before verifying every client driver and application actually supports it, breaking access with no rollback plan, certificate validation left at 'require' instead of 'verify-full', which still allows a man-in-the-middle, no plan for internal service-to-service connections that were relying on trust-based auth over a private network, and a rollout applied all at once instead of a staged cutover that catches an incompatible client before it's a production outage.
4. Include validation, rollback, migration, or monitoring considerations where relevant.
5. Keep the plan realistic for the stated context and avoid architecture theater.
Output format:
- Plan overview
- Recommended approach and tradeoffs
- Implementation phases or rollout path
- Risks, dependencies, and validation checks
- Main assumptions or open questions
Missing information policy:
Ask up to 2 concise questions only if the goal or environment is unclear. Otherwise proceed with assumptions.
Quality bar:
- Make the plan executable.
- Avoid overengineering.
- Name the specific failure modes above rather than generic risk language.
- Show how the plan would survive real deployment pressure.
12
Automate SSH Key Lifecycle Management with Rotation and Revocation Controls
Write a script to automate SSH key lifecycle management with secure generation, distribution boundaries, rotation policy, auditability, and revocation controls.
You are a senior networking and security engineer.
Produce code or a code scaffold for an SSH key lifecycle management automation script.
Context:
- Goal or feature: [goal]
- Stack or language: [stack]
- Inputs and outputs: [inputs and outputs]
- Constraints: [constraints]
- Existing code context: [existing context]
- Integration points or surrounding system: [integration points]
- Acceptance criteria or edge cases: [acceptance criteria]
Instructions:
1. Make the key implementation decisions first, then write code that is correct, readable, and idiomatic for the stated stack.
2. Default to realistic production patterns for common tasks instead of toy scaffolds.
3. Include only the structure that materially helps maintainability, testing, or integration.
4. Explicitly address the failure modes that actually break this in production: key rotation that doesn't revoke the old key until after the new one is confirmed working everywhere, risking a lockout window if that check is skipped, private keys generated or transmitted through a channel that isn't itself secured, no audit trail linking a key to the specific person or service it was issued to, and revocation that removes a key from one system but misses copies distributed to other hosts.
5. Include validation guidance such as test cases, failure modes, or manual verification steps.
6. Avoid filler placeholders, fake environment variables, and pseudo-code unless the user explicitly wants a sketch.
Output format:
- Implementation approach
- Code
- Validation and test cases (including rotation-verification before revocation)
- Integration notes and assumptions
Missing information policy:
Ask up to 2 concise questions only if the language, framework, integration point, or required behavior is unclear. Otherwise proceed with assumptions.
Quality bar:
- Prefer working simplicity with production realism.
- Avoid placeholder-heavy pseudo-code unless necessary.
- Name the specific failure modes above rather than generic edge-case language.
- Cover meaningful edge cases instead of only the happy path.
13
Design a Secure IoT Communication Protocol
Design a secure communication protocol for an IoT network with man-in-the-middle protection.
You are a senior networking and security architect creating a plan for a real engineering initiative.
Create a plan for the task below.
Context:
- Goal: [goal]
- Stack or environment: [stack]
- Current system or baseline: [current system]
- Constraints such as security, latency, budget, or staffing: [constraints]
- Scale, complexity, or production expectations: [scale]
- Risks, current issues, or dependencies: [risks]
Instructions:
1. Recommend a practical technical approach and explain why it fits the context.
2. Break the work into sensible phases, components, or rollout stages.
3. Explicitly address the failure modes that actually derail this kind of initiative: device identity based on a shared network-wide secret instead of per-device keys, so one compromised device can impersonate any other, no man-in-the-middle protection if devices validate the server's identity but not the reverse, protocol overhead too heavy for constrained devices, tempting teams to disable security features under resource pressure, and no key-rotation or revocation path for a compromised device once deployed in the field.
4. Include validation, rollback, migration, or monitoring considerations where relevant.
5. Keep the plan realistic for the stated context and avoid architecture theater.
Output format:
- Plan overview
- Recommended approach and tradeoffs
- Implementation phases or rollout path
- Risks, dependencies, and validation checks
- Main assumptions or open questions
Missing information policy:
Ask up to 2 concise questions only if the goal or environment is unclear. Otherwise proceed with assumptions.
Quality bar:
- Make the plan executable.
- Avoid overengineering.
- Name the specific failure modes above rather than generic risk language.
- Show how the plan would survive real deployment pressure.
14
Design an API Authentication Boundary with JWT, TLS, and Token-Lifecycle Controls
Design an API authentication boundary with JWT, TLS termination, token lifecycle controls, and failure-case handling for real production clients and services.
You are a senior networking and security engineer advising on a real implementation rather than teaching a generic tutorial.
Help with the engineering task below.
Context:
- Goal or task: [goal]
- Stack or environment: [stack]
- Current system or surrounding architecture: [current system]
- Constraints such as security, performance, cost, or compatibility: [constraints]
- Scale, criticality, or production expectations: [criticality]
- Specific questions, failure points, or uncertainty: [pain points]
- Success criteria or desired outcome: [success criteria]
Instructions:
1. Explain the approach in the order the team should actually execute it.
2. Tailor the guidance to the stated stack, constraints, and production expectations.
3. Turn the task into concrete technical decisions, not generic setup advice.
4. Explicitly address the failure modes that actually break this in production: a JWT signature algorithm left configurable per-request instead of pinned server-side, opening the door to algorithm-confusion attacks, tokens with long expiry and no revocation mechanism so a leaked token stays valid long after the leak is discovered, TLS termination happening at a layer where the JWT then travels in the clear internally, and no distinction in error responses between an expired token and an invalid one, leaking information useful to an attacker.
5. Include validation, rollback, review, or monitoring checkpoints where they materially reduce implementation risk.
6. If important context is missing, make explicit assumptions and continue.
Output format:
- Token issuance and signature-algorithm pinning
- Expiry and revocation strategy
- TLS termination boundary and internal transport
- Error-response design that avoids information leakage
- Main assumptions and risks
Missing information policy:
Ask up to 2 concise questions only if the stack, required outcome, or operational context is unclear. Otherwise proceed with assumptions.
Quality bar:
- Be concrete and operational.
- Prefer implementation judgment over theory.
- Name the specific failure modes above rather than generic best-practices language.
- Make the advice usable by a team shipping real work.
15
Build an Authenticated Web Vulnerability Assessment Workflow with Safe Scan Boundaries
Write a Python workflow for authenticated web vulnerability assessment that defines scan boundaries, reduces false positives, and preserves production safety during validation.
You are a senior networking and security engineer.
Produce code or a code scaffold for an authenticated web vulnerability assessment workflow.
Context:
- Goal or feature: [goal]
- Stack or language: [stack]
- Inputs and outputs: [inputs and outputs]
- Constraints: [constraints]
- Existing code context: [existing context]
- Integration points or surrounding system: [integration points]
- Acceptance criteria or edge cases: [acceptance criteria]
Instructions:
1. Make the key implementation decisions first, then write code that is correct, readable, and idiomatic for the stated stack.
2. Default to realistic production patterns for common tasks instead of toy scaffolds.
3. Include only the structure that materially helps maintainability, testing, or integration.
4. Explicitly address the failure modes that actually break this in production: authenticated scanning with session tokens that expire mid-scan, producing false negatives once the session drops, no scope boundary defined before scanning, risking the scan hitting production or third-party-embedded content unintentionally, scan payloads that could trigger real side effects like form submissions or account changes instead of safe detection-only checks, and findings reported with no severity or exploitability context that buries real risks in noise.
5. Include validation guidance such as test cases, failure modes, or manual verification steps.
6. Avoid filler placeholders, fake environment variables, and pseudo-code unless the user explicitly wants a sketch.
Output format:
- Implementation approach
- Code
- Validation and test cases (safe, detection-only payloads)
- Integration notes and assumptions (including scope boundary)
Missing information policy:
Ask up to 2 concise questions only if the language, framework, integration point, or required behavior is unclear. Otherwise proceed with assumptions.
Quality bar:
- Prefer working simplicity with production realism.
- Avoid placeholder-heavy pseudo-code unless necessary.
- Name the specific failure modes above rather than generic edge-case language.
- Cover meaningful edge cases instead of only the happy path.