GPT for Code Review

Use AI to review, audit, and improve your infrastructure code — configs, scripts, and IaC.

Category: AI / GPT

What AI Code Review Catches

  • Insecure defaults in nginx, SSH, or firewall configs
  • Hardcoded credentials in scripts
  • Missing error handling and cleanup traps
  • Inefficient patterns (unnecessary subshells, quoting issues)
  • Potential race conditions or privilege escalation risks

Security Audit Prompt

Review this nginx configuration for security issues.
Identify: insecure TLS settings, missing security headers,
server info leakage, or misconfigurations.
For each issue found, explain the risk and suggest a fix.

[paste your nginx.conf here]

Script Quality Review

Review this bash script for:
1. Security vulnerabilities (command injection, unsafe temp files)
2. Error handling gaps
3. Portability issues
4. Performance problems

Rate it 1-10 and list improvements in priority order.

[paste your script]

Terraform / Ansible Review

Review this Terraform module for:
- Overly permissive IAM policies (least-privilege violations)
- Missing resource tagging
- Hardcoded values that should be variables
- Security group rules that are too broad (0.0.0.0/0)

Suggest improvements and flag any showstoppers.

[paste your .tf file]

Pro Tips

  • Ask for severity levels: Critical / High / Medium / Low
  • Ask GPT to rewrite the section after identifying issues
  • Use Claude Code or GitHub Copilot for inline reviews in your editor