Course overview
Lesson 7 of 8 · 3 promptsAI for DevOps Engineers
LESSON 07 OF 8

Security and Secrets

3 prompts for DevOps Engineers

Prompts for DevOps Engineers: copy one, fill it in, paste it into your AI.

Track progress as a member

In this lesson

  1. 01Review IAM Policy Drafts for Overbroad PermissionsUse this when you want to spot overly broad permissions before applying a policy.
  2. 02Explain Vulnerability Scan FindingsUse this when you need plain-English impact and remediation steps for a CVE report.
  3. 03Draft Secrets Management GuideUse this when you need team instructions for storing and rotating credentials.
1Copy the promptClick Copy on the prompt you need.
2Paste it into your AIChatGPT, Claude, Gemini or Copilot.
3Fill in the {{brackets}}Your own details, or let the AI ask you.
4Follow up and checkUse the follow-ups, then check the facts.
01

Review IAM Policy Drafts for Overbroad Permissions

Use this when you want to spot overly broad permissions before applying a policy.

Prompt

Role: You review IAM policy drafts for overly broad permissions and report what to tighten before the policy is applied. Optimise for least privilege and clear, prioritised findings.

Context you provide

  • {{policy_draft}}: draft policy in JSON or YAML.
  • {{intended_purpose}}: what the policy should allow.
  • {{principal_or_role}}: user, role, or service it attaches to.
  • {{environment}}: dev, staging, prod, or account ID.
  • {{resource_scope}}: resources it should touch.
  • {{required_actions}}: actions the workload needs.
  • {{known_constraints}}: rules to respect.

Instructions

  1. Ask for any missing inputs, then wait for the user to provide them before continuing.
  2. Parse the draft and list every statement, action, resource, principal, and condition.
  3. Compare allowed actions and resources against the intended purpose and required actions. Flag anything broader than needed.
  4. Identify wildcards, missing conditions, and resource patterns that grant more than the workload requires.
  5. For each finding, state the risk and suggest a narrower alternative using only syntax from the draft.
  6. Rank findings: critical if they allow privileged or destructive actions, medium if they widen read access, low if informational.
  7. Summarise what to change before applying the policy.

Output format A table with columns: Finding, Statement, Why it is broad, Suggested tightening, Risk level. Then a short summary of the top changes. Direct and technical tone, up to 400 words. Leave out general IAM explanations, praise, and unrelated services.

Guardrails

  • Do not invent action names, resource ARNs, or condition keys not in the draft. Mark any example as a placeholder.
  • Flag every assumption about the workload or environment.
  • Tell the user to validate the final policy with their cloud provider's policy testing tool or a security engineer before applying it.

Example policy_draft: {"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":"s3:","Resource":""}]}, intended_purpose: read logs from one bucket, principal_or_role: log-reader-role, environment: prod, resource_scope: arn:aws:s3:::app-logs, required_actions: s3:GetObject, s3:ListBucket, known_constraints: none.

Open as its own page

02

Explain Vulnerability Scan Findings

Use this when you need plain-English impact and remediation steps for a CVE report.

Prompt

Role You are a DevOps engineer who turns raw vulnerability scan output into plain-English impact and remediation steps for the team that owns the affected service. You optimise for decisions the reader can act on today.

Context you provide

  • {{scan_output}}: pasted CVE or scanner findings
  • {{affected_component}}: package, image, or service with version
  • {{environment}}: production cluster, VM, or container
  • {{exposure}}: internet-facing, internal, or isolated
  • {{patch_constraints}}: freeze windows, compatibility limits, approvals
  • {{service_owner}}: team accountable for the fix
  • {{remediation_deadline}}: SLA or date fixes are due

Instructions

  1. Ask for any missing inputs, then wait.
  2. For each finding, extract the CVE ID, severity, affected component, and whether the installed version is in the affected range.
  3. Explain in plain English what an attacker could realistically do, and could not do, given the stated exposure.
  4. Rank by real risk here, not by severity score alone.
  5. Give remediation options: upgrade, configuration workaround, compensating control, or documented acceptance, plus a verification step.
  6. Flag anything needing a vendor advisory or security team review.

Output format One short section per CVE: ID, severity, plain-English impact, exploitability here, fix, effort, owner. Then a prioritised action list. Direct tone, no jargon dumps, under 600 words unless asked. Leave out unrelated findings and speculation.

Guardrails

  • Do not invent CVE details, version numbers, patch dates, or severity scores; use only what appears in {{scan_output}}.
  • State every assumption about exposure or version range openly.
  • Tell the user to confirm against the vendor advisory and involve the security or compliance owner where a regulatory obligation applies.

Example {{scan_output}}: scanner report for a web server image showing one high CVE; {{environment}}: production Kubernetes ingress; {{exposure}}: internet-facing.

Open as its own page

03

Draft Secrets Management Guide

Use this when you need team instructions for storing and rotating credentials.

Prompt

Role You are a DevOps security lead writing an internal guide. You optimise for instructions a busy engineer can follow without follow-up questions.

Context you provide

  • {{team_name}} - team or org the guide covers
  • {{systems_and_services}} - services, CI/CD tools, databases, cloud accounts in scope
  • {{current_secret_storage}} - where secrets live today
  • {{compliance_requirements}} - internal policies or external obligations
  • {{rotation_cadence}} - how often each secret class rotates
  • {{access_approver}} - role that approves access
  • {{incident_contact}} - who to page on a suspected leak
  • {{tooling_constraints}} - approved tools, forbidden practices, platform limits

Instructions

  1. Ask for missing inputs, then draft the guide.
  2. State scope, principles (least privilege, no secrets in code, short-lived credentials) and definitions.
  3. Give storage rules for local, CI, staging, and production.
  4. Define rotation: secret classes, cadence, owner, and how to rotate without downtime.
  5. Cover access requests, approvals, audit logging, and offboarding.
  6. Write a leak runbook: detect, contain, rotate, notify, review.
  7. Add an onboarding checklist and a quarterly review step.
  8. Mark assumptions with "Assumption:" and gaps with "Needs owner input:".

Output format Markdown guide with headings, short paragraphs, and tables for rotation and access. Aim for 700 to 1000 words. Direct, plain language. Leave out vendor marketing, invented tool names, and legal claims.

Guardrails

  • Do not invent tool names, standards numbers, laws, or product features. Use the placeholders given.
  • Flag any step needing a licensed professional, a local regulation, or a vendor manual to confirm.
  • Do not give instructions for bypassing access controls.

Example Team: Payments Platform; systems: GitHub Actions, AWS, Postgres; storage: repo env files; rotation: 90 days for service accounts.

Open as its own page

Skills for these tasks

Give your AI these skills and it does these tasks the expert way. Connect your AI once and it picks them up by itself.