coverage-analysis

Analyze code coverage from fuzzing campaigns using llvm-cov and gcovr.

19.0k|5.6k|Updated Jul 9, 2024
One-click install
npx skills add https://github.com/elizaOS/eliza --skill coverage-analysis-elizaos
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: coverage-analysis
Source: https://github.com/elizaOS/eliza/tree/main/packages/skills/skills/testing-handbook-skills/skills/coverage-analysis
Command: npx skills add https://github.com/elizaOS/eliza --skill coverage-analysis-elizaos

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps you understand which parts of your code are being exercised by your fuzzers, allowing you to identify gaps, assess harness effectiveness, and track progress.

Core Features & Use Cases

  • Measure Harness Effectiveness: Determine if your fuzzing harnesses are reaching the intended code paths.
  • Identify Fuzzing Blockers: Detect issues like magic value checks or complex conditions that prevent fuzzers from progressing.
  • Track Fuzzing Progress: Monitor coverage changes over time as you update harnesses, fuzzers, or the system under test.
  • Use Case: After modifying a fuzzing harness, use this Skill to generate a coverage report and confirm that the changes have indeed increased the reachability of critical code sections.

Quick Start

Use the coverage-analysis skill to generate an HTML coverage report for your C++ project after building it with LLVM coverage instrumentation.

Frequently Asked Questions about coverage-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze code coverage during a fuzzing campaign?

Measuring code coverage during fuzzing helps identify gaps and assess harness effectiveness by showing which code paths your fuzzers exercise. This skill analyzes profile data to pinpoint fuzzing blockers like complex conditions preventing progression.

How do I measure fuzzing harness effectiveness for C/C++ projects?

You can measure harness effectiveness by generating an HTML coverage report using llvm-cov or gcovr after running instrumented fuzzers. This confirms whether your harness modifications increase reachability to critical code sections.

Does coverage analysis work with Rust cargo-fuzz?

Yes, this skill supports Rust projects using cargo-fuzz alongside C/C++ projects using LLVM or GCC. It requires build instrumentation and corpus execution to generate the profile data necessary for coverage analysis.

What causes fuzzers to stop progressing and how do I identify fuzzing blockers?

Fuzzing blockers such as magic value checks or complex conditions prevent fuzzers from reaching deeper code. Coverage analysis identifies these blockers by highlighting specific unreached code paths in generated reports.

Do I need to build instrumentation before running code coverage analysis?

Yes, build instrumentation and corpus execution are required to generate profile data for analysis. This skill then processes that profile data using llvm-cov or gcovr to produce detailed coverage reports.