Skip to main content

CScan – C Source Code Vulnerability Scanner

CScan is a command-line tool for analyzing C source code for memory safety and security vulnerabilities, including buffer overflows, memory leaks, use-after-free, null pointer dereferences, format string vulnerabilities, and array bounds violations.

Features

  • Scan single C files or entire directories recursively
  • Detects high-risk vulnerabilities with confidence scoring
  • Generates detailed JSON reports
  • CLI flags for custom confidence thresholds and output files
  • Supports verbose output for debugging

Installation

Install via PyPI (or TestPyPI for testing):

pip install cscan

Usage

Scan a single file:

cscan scan vulnerable.c

Scan a directory recursively with custom confidence threshold:

cscan scan src/ --recursive --confidence 0.8 --output report.json

Enable verbose output:

cscan scan src/ -v

Output

  • Prints vulnerabilities to the terminal, grouped by severity
  • Generates JSON report (if --output specified) with:
    • Metadata (scan time, scanner version, files analyzed)
    • Findings (detailed per-vulnerability information)
    • Summary statistics by severity, type, and file

Example

CRITICAL SEVERITY (2 findings):

[Buffer Overflow] example.c:42 Function: copy_input Confidence: 100% Description: Unsafe function 'strcpy()' without bounds checking Recommendation: Use strncpy() with proper size limits CWE: CWE-120

[Use After Free] example.c:78 Function: cleanup Confidence: 85% Description: Variable 'ptr' used after being freed Recommendation: Set pointer to NULL after free() CWE: CWE-416

License

MIT License © 2025 Evan Kirtz

Metadata

Release files for cscan 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cscan 0.1.1
File Size Uploaded Provenance Actions
cscan-0.1.1.tar.gz 10.8 kB Without provenance Details for cscan-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cscan 0.1.1
File Interpreter ABI Platform Actions
cscan-0.1.1-py3-none-any.whl Python 3 none any Details for cscan-0.1.1-py3-none-any.whl

Total release size: 21.3 kB

Release files / cscan-0.1.1.tar.gz

Download URL cscan-0.1.1.tar.gz
Size 10.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d4b156d7d1062c2495c5eb50eb46d98738aa6480f2d18479e99a31db328dbdd3
BLAKE2b-256 checksum
How to use checksums
99b0d1c1c827c1cea4b81928794501bad9f4763c70133b4c16dccc160f47bb00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release files / cscan-0.1.1-py3-none-any.whl

Download URL cscan-0.1.1-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d5ec5933a2bc2ff6680432c224eebf98a3a6c14f9cb163ed344f4c27e4c5e8a9
BLAKE2b-256 checksum
How to use checksums
3ab8af2c182df466c5683da469ba0f11667f4dc94989caa6113caa37ab338e28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Security for cscan 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page