Skip to content
Back to skills

Detecting Signed Unsigned Conversion

ASecurity

Detects unsafe signed/unsigned integer conversions that can lead to integer overflow and security check bypasses. Use when analyzing integer operations, comparisons, or investigating conversion-related vulnerabilities.

  • 666 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added February 8, 2026
businessapisecurity

Works with

  • api

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill detecting-signed-unsigned-conversion --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Detecting Signed Unsigned Conversion?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Detecting Signed Unsigned Conversion
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-detecting-signed-unsigned-conversion/badge)](https://www.skillsdirectory.com/skills/majiayu000-detecting-signed-unsigned-conversion)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: detecting-signed-unsigned-conversion
description: Detects unsafe signed/unsigned integer conversions that can lead to integer overflow and security check bypasses. Use when analyzing integer operations, comparisons, or investigating conversion-related vulnerabilities.
---

# Signed/Unsigned Conversion Detection

## Detection Workflow

1. **Identify conversions**: Find all signed/unsigned conversions, locate implicit conversions, identify comparison operations, map arithmetic operations
2. **Analyze conversion safety**: Check for negative values, assess overflow potential, verify conversion correctness, review comparison logic
3. **Trace value flow**: Follow values through conversions, identify impact on operations, assess security implications, verify value constraints
4. **Assess exploitability**: Can attacker trigger negative value? Can conversion bypass security checks? What's the potential impact? Is it exploitable?

## Key Patterns

- Comparison errors: comparing signed with unsigned values, negative values treated as large positive, bypassed bounds checks, incorrect loop conditions
- Arithmetic errors: signed to unsigned conversion in arithmetic, integer overflow after conversion, underflow after conversion, unexpected results
- Function parameter issues: passing signed to unsigned parameters, implicit conversions in function calls, missing explicit casting, type mismatch in APIs
- Size calculation issues: signed values used for sizes, negative sizes after conversion, overflow in size calculations, incorrect buffer allocations

## Output Format

Report with: id, type, subtype, severity, confidence, location, vulnerability, comparison_operation, signed_variable, unsigned_variable, issue, exploitable, attack_scenario, impact, mitigation.

## Severity Guidelines

- **HIGH**: Conversion bypassing security checks
- **MEDIUM**: Conversion causing logic errors
- **LOW**: Minor conversion issues

## See Also

- `patterns.md` - Detailed detection patterns and exploitation scenarios
- `examples.md` - Example analysis cases and code samples
- `references.md` - CWE references and mitigation strategies

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.