Secdevai review

From RedHatProductSecurity/prodsec-skills · View interactive version

Secdevai review is an AI agent skill from the GitHub repository RedHatProductSecurity/prodsec-skills. Use when performing security code review of source files, git commits, or entire codebases against OWASP Top 10 (2021), CWE/SANS Top 25, and OWASP WSTG v4.2 patterns; applicable to any language or framework.

How to use this skill

Skill file

Security Code Review

AI-powered security review of source code using OWASP Top 10, CWE/SANS Top 25,

and OWASP WSTG patterns. Supports file review, commit review, and full codebase

scan modes across all major languages.

When to Use This Skill

Workflow

Step 1: Determine Scope

Choose what to review (in priority order):

  1. If a specific number of recent commits is requested: review those commits
  2. If the last commit is requested: review the most recent commit
  3. If a specific file or directory is specified: review it
  4. Otherwise: scan the entire codebase

Step 2: Apply Ignore Patterns

Before scanning, exclude:

Note: documentation files (markdown, RST, plaintext) are not excluded —

they can contain hardcoded secrets, leaked infrastructure details, or AI agent

instructions.

If all files are excluded, report that no security-relevant content was found.

If some files are excluded, proceed with the remaining files and list the

skipped files at the end of the review.

Step 3: Load Security Context

Load context based on what is being reviewed:

./reference/security-review.context

patterns from ./reference/wstg-testing.context

security patterns from ./reference/golang-security.context

Makefile, CMakeLists.txt, Cargo.toml): Additionally apply CWE/SANS

Top 25 patterns

Containerfiles, YAML manifests with apiVersion/kind, docker-compose):

Invoke the secdevai-oci-image-security skill separately

(../secdevai-oci-image-security/SKILL.md) to load OCI-specific patterns

Step 4: Perform Analysis

reporting

Step 5: Validate Findings

Before presenting results, for each finding:

  1. Read the actual source code at the reported location
  2. Confirm the vulnerable code pattern is present at that line
  3. Check whether a mitigation is already in place nearby (e.g., validation

upstream of the flagged call)

  1. Assess whether a realistic attack path exists (exploitability)
  2. Remove findings that are not exploitable or are false positives

Step 6: Present Findings

Group findings by severity. For each finding include:

At the end, summarize: total findings, severity distribution, and files

reviewed vs. skipped.

Multi-Language Support

While context files use primarily Python examples, apply the same patterns to

the language being reviewed. Translate remediation to language-appropriate

idioms:

SQL injection:

Cryptographic randomness:

TLS verification:

a custom CA

Verification Requirement

Before presenting any finding, confirm the line numbers and code snippets

match the actual file content. Do not report findings based solely on diff

context — read the live file.

Reference Files

The following context files in reference/ contain detailed patterns and

examples. Load them as described in Step 3:

Upstream References

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.