Secdevai fix

From RedHatProductSecurity/prodsec-skills · View interactive version

Secdevai fix is an AI agent skill from the GitHub repository RedHatProductSecurity/prodsec-skills. Apply suggested security fixes from a prior code review. Use when the user wants to remediate security findings with before/after code diffs, severity filtering, and explicit approval before modifying code.

How to use this skill

Skill file

Security Fix Application

Applies security fixes identified by a prior code review. Always shows a diff

preview and requires explicit user approval before modifying any file.

When to Use This Skill

security review

Workflow

Step 1: Verify Prerequisites

Confirm that a prior security review has been run and findings are available.

If no prior review exists, inform the user and suggest running a security

review first.

Step 2: Apply Severity Filter (optional)

If the user specifies a severity level (critical, high, medium, low), limit

fixes to findings at that level or above. If no filter is specified, present

all available fixes.

Step 3: Present Fixes

For each fix, show:

Example:

## Fix #1 (Critical)

**Finding**: SQL Injection in `app.py:42`
**OWASP Category**: [A03: Injection](https://owasp.org/Top10/A03_2021-Injection/) ([CWE-89](https://cwe.mitre.org/data/definitions/89.html))

**Before**:
query = f"SELECT * FROM users WHERE id = {user_id}"

**After**:
cursor.execute("SELECT * FROM users WHERE id = %s", (user_id,))

**Security impact**: Eliminates SQL injection by using a parameterized query.
The database driver handles escaping, preventing attacker-controlled input from
modifying query structure.

Step 4: Require Explicit Approval

Before applying any changes:

Step 5: Apply Approved Fixes

After the user approves:

conflict and leave the file unchanged

Important Rules

file.

user says "apply all".

user explicitly provides findings from elsewhere.

with reasons.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.