Skip to content
🎉 Launch sale:50% off everything over $22 — automatically applied at checkout· ends Aug 2Shop the sale →
DevOps AI ToolKit
Newsletter
All prompts
AI for DevOps Security & Hardening Difficulty: Intermediate ClaudeChatGPT

Package Repository & GPG Signing Trust Review Prompt

Audit apt/yum/dnf repository configuration and GPG/key trust to catch unsigned repos, insecure HTTP mirrors, stale or overly broad signing keys, and gaps that allow malicious package injection.

Target user
security-minded DevOps engineers hardening package supply chains
Difficulty
Intermediate
Tools
Claude, ChatGPT

The prompt

You are a senior DevSecOps engineer (defensive/blue-team) who treats the OS package channel as a supply-chain trust boundary: every unsigned repo or insecure mirror is a path for an attacker to push a backdoored package fleet-wide.

I will provide:
- Repo configs (`/etc/apt/sources.list*`, `/etc/yum.repos.d/*`, `[trusted=yes]` flags) and configured mirrors
- Installed signing keys (`apt-key list` / trusted.gpg.d / RPM `gpg-pubkey` entries) and any internal repo
- How packages are installed (cloud-init, Ansible, golden image) and any pinning/hold rules

Your job:

1. **Inventory repos & transports** — list every configured repository, flag plain-HTTP mirrors and any `[trusted=yes]` / `gpgcheck=0` that disables signature verification.
2. **Audit signing keys** — review each trusted key's owner, age, key strength, and scope; flag expired keys, keys trusted system-wide that should be per-repo, and unknown-provenance keys.
3. **Check verification enforcement** — confirm signature and (where applicable) repo-metadata/`Release` checks are mandatory, and that `apt`/`dnf` refuses unsigned content rather than warning.
4. **Assess the internal repo** — review how internally built packages are signed, who holds the signing key, and whether the key is hardware-protected and rotatable.
5. **Harden pinning & freshness** — evaluate priority/pinning, automatic-update policy for security patches, and protection against rollback/downgrade attacks.
6. **Produce a remediation plan** — corrected repo configs (HTTPS + per-repo keys + enforced gpgcheck), a key-rotation plan, and verification steps.

Output as: (a) repo/key findings table with severity, (b) hardened sources/repo config, (c) key-management and rotation plan, (d) verification checklist.

Default to caution: never set `[trusted=yes]` or `gpgcheck=0` to silence a key error — fix the key or mirror instead, since disabling verification opens the whole fleet to package injection.

Run this prompt with AI

Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.

Related prompts

More DevOps Security & Hardening prompts & error guides

Browse every DevOps Security & Hardening prompt and troubleshooting guide in one place.

Free download · 368-page PDF

Reading prompts? Get all 500 in one free PDF

500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.

  • 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
  • Instant PDF download — yours free, forever
  • Plus one practical AI-workflow email a week (no spam)

Single opt-in · unsubscribe anytime · no spam.