• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

bearswithsaws / bitfactory / 21552565341
88%

Build:
DEFAULT BRANCH: main
Ran 31 Jan 2026 11:18PM UTC
Jobs 1
Files 4
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

31 Jan 2026 11:18PM UTC coverage: 87.995% (+9.4%) from 78.638%
21552565341

push

github

web-flow
Add mutator system for CWE-based edge case generation (#2)

* Add mutator system for CWE-based edge case generation

Introduces a comprehensive mutation framework for BitFactory types that enables
systematic testing of edge cases based on Common Weakness Enumeration standards.

Key features:
- BFMutator base class for defining custom mutators
- BFMutatable wrapper for attaching mutators to any BF type hierarchy
- Configurable tree traversal (DFS preorder/postorder, BFS)
- MutationResult dataclass with full context (path, CWE IDs, packed data)

Integer mutators (CWE-190, CWE-191, CWE-194, CWE-195, CWE-369, etc.):
- BFIntegerBoundaryMutator: overflow/underflow boundaries
- BFIntegerSignMutator: signed/unsigned conversion issues
- BFIntegerSpecialValueMutator: divide-by-zero, powers of 2
- BFIntegerBitPatternMutator: walking bits, alternating patterns

Buffer mutators (CWE-120, CWE-787, CWE-134, CWE-170, etc.):
- BFBufferLengthMutator: size boundary testing
- BFBufferContentMutator: format strings, special patterns
- BFBufferNullTerminationMutator: null handling edge cases

https://claude.ai/code/session_01MG4kh3aqXwFjzjJhGbRHoG

* Enhance mutator system with generic metadata, bit-flip mutator, and resumption

Breaking change: Replaces cwe_ids property with flexible metadata dict.
The new metadata system supports multiple reference sources (CWE, OWASP, etc.),
tags, categories, and descriptions.

New features:
- BFBitFlipMutator: Flips individual bits one at a time
  - 8 mutations for UInt8, 16 for UInt16, 32 for UInt32
  - len(buffer)*8 mutations for BFBuffer
  - Non-CWE example demonstrating flexible metadata
- Iteration resumption with start/limit parameters
  - total_count() for determining work distribution
  - iterate_mutations(start=N, limit=M) for chunked processing
  - Enables parallel mutation runs and interrupted job resumption
- MutationResult.index field for tracking position
- Support for BFLength, BFLengthRef, BFCallableRef structures
  - P... (continued)

689 of 783 relevant lines covered (87.99%)

0.88 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
88.89
0.0% exceptions.py
47
80.45
2.24% bitfactory.py
Jobs
ID Job ID Ran Files Coverage
1 21552565341.1 31 Jan 2026 11:18PM UTC 4
87.99
GitHub Action Run
Source Files on build 21552565341
  • Tree
  • List 4
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #21552565341
  • 8985dfda on github
  • Prev Build on main (#21536966448)
  • Next Build on main (#21554448684)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc