Skip to content

Add CBOR implementation following the ASN.1 implementation paradigm (by Copilot)#4916

Merged
polybassa merged 17 commits intosecdev:masterfrom
polybassa:implement-cbor-parser-asn1
Mar 17, 2026
Merged

Add CBOR implementation following the ASN.1 implementation paradigm (by Copilot)#4916
polybassa merged 17 commits intosecdev:masterfrom
polybassa:implement-cbor-parser-asn1

Conversation

@polybassa
Copy link
Contributor

I did some experiments with Github Copilot for a CBOR implementation. I manually reviewed the implementation.

@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

❌ Patch coverage is 84.34926% with 95 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.30%. Comparing base (2cb8101) to head (6ad2833).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
scapy/cbor/cborcodec.py 84.51% 57 Missing ⚠️
scapy/cbor/cbor.py 83.62% 38 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4916      +/-   ##
==========================================
+ Coverage   80.27%   80.30%   +0.02%     
==========================================
  Files         375      379       +4     
  Lines       92480    93102     +622     
==========================================
+ Hits        74242    74769     +527     
- Misses      18238    18333      +95     
Files with missing lines Coverage Δ
scapy/cbor/__init__.py 100.00% <100.00%> (ø)
scapy/tools/UTscapy.py 65.33% <100.00%> (ø)
scapy/cbor/cbor.py 83.62% <83.62%> (ø)
scapy/cbor/cborcodec.py 84.51% <84.51%> (ø)

... and 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gpotter2
Copy link
Member

Can we like, still ask him to do changes?

@polydroi
Copy link

Absolutely. What changes do you have in mind?

@polybassa polybassa self-assigned this Mar 4, 2026
Copilot AI and others added 11 commits March 17, 2026 21:19
Co-authored-by: polybassa <1676055+polybassa@users.noreply.github.com>

Address code review comments: improve error messages and implement proper half-float decoding

Co-authored-by: polybassa <1676055+polybassa@users.noreply.github.com>

Add cbor2 interoperability tests (cbor2 used ONLY in tests)

Co-authored-by: polybassa <1676055+polybassa@users.noreply.github.com>

Document cbor2 as test-only dependency in test file header

Co-authored-by: polybassa <1676055+polybassa@users.noreply.github.com>

Add CBOR documentation to advanced_usage.rst following ASN.1 pattern

Co-authored-by: polybassa <1676055+polybassa@users.noreply.github.com>

Add cbor2 to tox.ini testenv deps for CBOR interoperability tests

Co-authored-by: polybassa <1676055+polybassa@users.noreply.github.com>
Co-authored-by: polybassa <1676055+polybassa@users.noreply.github.com>
… file opens

Co-authored-by: polybassa <1676055+polybassa@users.noreply.github.com>
Co-authored-by: polybassa <1676055+polybassa@users.noreply.github.com>
…re generation

Co-authored-by: polybassa <1676055+polybassa@users.noreply.github.com>
…ertions

Co-authored-by: polybassa <1676055+polybassa@users.noreply.github.com>
@polybassa polybassa force-pushed the implement-cbor-parser-asn1 branch from 2d1069d to 65646ea Compare March 17, 2026 20:24
@polybassa
Copy link
Contributor Author

@gpotter2 I've modified the docs a little. I will merge this PR and go forward with CBOR Fields and explore a generic codec implementation.

@polybassa polybassa merged commit 5b81ba1 into secdev:master Mar 17, 2026
24 checks passed
cryptography
coverage[toml]
python-can
cbor2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants