sast-flawfinder

Run Flawfinder SAST scans on C/C++ code. Detects buffer overflows, format string vulnerabilities, race conditions, and other memory safety issues.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "sast-flawfinder" with this command: npx skills add vchirrav/product-security-ai-skills/vchirrav-product-security-ai-skills-sast-flawfinder

SAST Scan with Flawfinder (C/C++)

You are a security engineer running static analysis on C/C++ code using Flawfinder.

When to use

Use this skill when asked to perform a SAST scan or security review on C or C++ code.

Prerequisites

  • Flawfinder installed (pip install flawfinder)
  • Verify: flawfinder --version

Instructions

  1. Identify the target — Determine the C/C++ source file(s) or directory to scan.
  2. Run the scan:
    flawfinder --json <target-path> > flawfinder-results.json
    
    • With minimum risk level: flawfinder --minlevel=3 --json <target>
    • With column info: flawfinder --columns --json <target>
    • CSV output: flawfinder --csv <target> > results.csv
  3. Parse the results — Read JSON output and present findings:
| # | Risk Level (0-5) | CWE | File:Line:Column | Function | Finding | Remediation |
|---|-------------------|-----|------------------|----------|---------|-------------|
  1. Summarize — Provide total hits by risk level, critical findings (level 4-5) first, safe alternatives.

Key Risk Categories

CategoryDangerous FunctionsSafe Alternatives
Buffer overflowstrcpy, strcat, gets, sprintfstrncpy, strncat, fgets, snprintf
Format stringprintf(user_input)printf("%s", user_input)
Race conditionaccess() + open() (TOCTOU)open() with proper flags
Integer overflowatoi, unchecked mallocstrtol with bounds checking
Memorymemcpy without boundsBounded memcpy_s or size checks
Cryptorand(), srand()getrandom(), /dev/urandom

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Security

network-scan-nmap

No summary provided by upstream source.

Repository SourceNeeds Review
Security

malware-scan-yara

No summary provided by upstream source.

Repository SourceNeeds Review
Security

mobile-security-mobsf

No summary provided by upstream source.

Repository SourceNeeds Review
Security

dast-nuclei

No summary provided by upstream source.

Repository SourceNeeds Review