Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
af8fea7
cbor: Scapy-native CBOR fields, codec hardening, and cbor2 CI
Sep 1, 2026
0f1657d
cbor: avoid Generic cls= kwargs for Python 3.7
Sep 1, 2026
e879da2
cbor: add RFC and lifecycle regression tests for PR #5125 refactor
Sep 9, 2026
7ae3e54
cbor: fix RFC map-key equivalence, deterministic floats, and tag fields
Sep 9, 2026
541fd73
cbor: store CBORF_ANY as CBOR_Object and drop islist workaround
Sep 9, 2026
ebe2a34
cbor: store unknown map extensions in per-map packet fields
Sep 9, 2026
4398694
cbor: restore standard Packet.do_build and slim copy()
Sep 9, 2026
63d5c1e
cbor: require explicit SEQUENCE_OF framing and Scapy list limits
Sep 9, 2026
64c7306
cbor: trim exports, tighten deterministic defaults, simplify byte-str…
Sep 9, 2026
ac087ad
cbor: remove legacy Float/Tag/Simple/UNDEFINED_VALUE wrappers
Sep 9, 2026
156a212
cbor: compare NaN map keys by sign and significand
Sep 9, 2026
e77fedc
cbor: preserve NaN sign and significand in deterministic encoding
Sep 9, 2026
825adf3
cbor: drop dead map key-identity helpers and stale PR noise
Sep 9, 2026
d583e26
cbor: invalidate CBOR_FLOAT wire cache when val is assigned
Sep 9, 2026
7e8817f
cbor: reject nonterminal SEQUENCE_OF hidden by optional/conditional
Sep 9, 2026
45d3838
cbor: speed map-key checks and reject collection pkt instances
Sep 9, 2026
c01f3f8
cbor: track CBOR_ANY float wire-cache mutation
Sep 9, 2026
77cc1a7
cbor: require Packet subclasses with CBOR_root for collections
Sep 9, 2026
6693cba
cbor: raise ValueError for unhashable as_dict keys
Sep 9, 2026
1633b04
cbor: compare CBORMapData equality independent of pair order
Sep 9, 2026
ff75fe9
cbor: share homogeneous SEQUENCE_OF/ARRAY_OF via _CBORF_HOMOGENEOUS
Sep 9, 2026
772f720
cbor: own SEQUENCE/ARRAY schema checks on _CBORF_compound
Sep 9, 2026
d427a47
cbor: make item encode/decode real CBORcodec_Object methods
Sep 9, 2026
b611c8e
cbor: inline cache helpers and tighten packet field ownership
Sep 9, 2026
b328dba
cbor: add AdditionalInfo/SimpleValue enums and UINT64_MAX
Sep 9, 2026
a429ea6
cbor: simplify float decode and indefinite child budgeting
Sep 9, 2026
320ae92
cbor: tighten SEMANTIC_TAG API and map unknown_field defaults
Sep 9, 2026
464fb82
cbor: wrap long enum expressions and raise ARRAY_OF interop limit
Sep 9, 2026
cec2a03
cbor: add CBOR_FloatAI for half/single/double encodings
Sep 9, 2026
753afcc
cbor: reject duplicate map keys when encoding
Sep 9, 2026
cf93ddc
cbor: store CBOR_MAP as CBORMapData for key equivalence
Sep 9, 2026
78edb9c
cbor: count SEQUENCE items with skip instead of double decode
Sep 9, 2026
b67e221
cbor: restore SEQUENCE build/dissect after skip-count change
Sep 9, 2026
bc9060b
cbor: fold SEQUENCE_OF next_cls_cb into homogeneous init
Sep 9, 2026
30445a9
cbor: thin CBORF_PACKET and inline single-use helpers
Sep 9, 2026
dc57add
cbor: use MajorTypes and reserved AI in non-det scanner
Sep 9, 2026
d4c3b43
cbor: add CBOR_encode_initial and fold indefinite helpers into fields
Sep 9, 2026
827ce54
cbor: bound skip/count nesting and finish scanner cleanup
Sep 9, 2026
265466c
cbor: share structural skipper and harden indefinite string walks
Sep 9, 2026
08e4631
cbor: restore raw well-formed decode and house item span in codec
Sep 9, 2026
cbbadd3
cbor: move non-det scanner to tests and trim field/API scaffolding
Sep 9, 2026
6a3a0fb
cbor: reject unknown map keys that collide with schema names
Sep 9, 2026
9134237
cbor: optional semantic tags treat None defaults as empty
Sep 9, 2026
cea51b5
cbor: copy ismutable defaults in Packet, drop getter materialization
Sep 9, 2026
91b059f
cbor: share Packet raw-cache validity with CBOR_Packet
Sep 9, 2026
4f45709
cbor: make counted build/dissect private compound bookkeeping
Sep 9, 2026
696b5e4
cbor: drop dead field scaffolding and tighten nested encode/decode
Sep 9, 2026
5531f55
cbor: fix Packet self_build typing after cache helper extract
Sep 9, 2026
06a065b
cbor: honor debug_dissector and slim CBOR packet init
Sep 10, 2026
ce48ad1
cbor: compose nested and collection raw-cache fingerprints
Sep 10, 2026
05847a2
cbor: separate structural parse budgets from live cardinality
Sep 10, 2026
d9f8d38
packet: keep FlagsField defaults out of fields for bind overloads
Sep 10, 2026
4bb7d89
cbor: nested encode via bytes(); ANY counted build honors build()
Sep 10, 2026
7400e86
cbor: inherit BYTE_STRING_PACKET; trim absent/budget/float helpers
Sep 10, 2026
3a5d313
Split/cbor review budgets (#48)
polybassa Sep 10, 2026
a7e7faa
cbor: isolate nested TypeError test from debug_dissector pollution
Sep 10, 2026
8f5cb02
cbor: terminal SEQUENCE_OF and trim review abstractions
Sep 10, 2026
40294a1
cbor: reserve optionals with live min_items
Sep 10, 2026
bf2e41d
cbor: fix absent cache and greedy unframed sequences
Sep 10, 2026
6151e14
cbor: reject tagged SEQUENCE_OF; slim optional dissect
Sep 10, 2026
2366a19
cbor: typed key/fingerprint kinds and enum-safe compares
Sep 11, 2026
d3777a7
cbor: close SEQUENCE_OF holes and rename unframed fields
Sep 11, 2026
01bbc78
cbor: allow nested framed REMAINDER_OF; bound MAP dissect
Sep 11, 2026
114f170
cbor: prefer ITEMS isinstance for remainder recursion
Sep 11, 2026
0518a2d
cbor: add MAP at-limit tests and nested indefinite remainder
Sep 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,23 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}


cbor2-interop:
name: cbor2 interoperability (Python 3.12)
runs-on: ubuntu-latest
needs: [commit, spdx]
steps:
- name: Checkout Scapy
uses: actions/checkout@v6
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install tox
run: pip install tox
- name: Run cbor2 differential tests
run: tox -e cbor2

cryptography:
name: pyca/cryptography test
runs-on: ubuntu-latest
Expand Down
18 changes: 18 additions & 0 deletions scapy/cbor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@
CBOR_BadTag_Decoding_Error,
CBOR_Codecs,
CBOR_MajorTypes,
CBOR_SimpleValue,
CBOR_Object,
CBOR_UNSIGNED_INTEGER,
CBOR_NEGATIVE_INTEGER,
CBOR_BYTE_STRING,
CBOR_TEXT_STRING,
CBOR_ARRAY,
CBOR_MAP,
CBORMapData,
CBOR_SEMANTIC_TAG,
CBOR_SIMPLE_VALUE,
CBOR_FALSE,
Expand All @@ -47,6 +49,8 @@
from scapy.cbor.cborfields import (
CBORF_element,
CBORF_field,
CBORF_ANY,
CBOR_ABSENT,
CBORF_UNSIGNED_INTEGER,
CBORF_NEGATIVE_INTEGER,
CBORF_INTEGER,
Expand All @@ -56,12 +60,17 @@
CBORF_NULL,
CBORF_UNDEFINED,
CBORF_FLOAT,
CBORF_ITEMS,
CBORF_REMAINDER_OF,
CBORF_ARRAY,
CBORF_ARRAY_OF,
CBORF_ARRAY_INDEFINITE,
CBORF_MAP,
CBORF_SEMANTIC_TAG,
CBORF_optional,
CBORF_CONDITIONAL,
CBORF_PACKET,
CBORF_BYTE_STRING_PACKET,
)

__all__ = [
Expand All @@ -73,6 +82,7 @@
# Codecs
"CBOR_Codecs",
"CBOR_MajorTypes",
"CBOR_SimpleValue",
# Objects
"CBOR_Object",
"CBOR_UNSIGNED_INTEGER",
Expand All @@ -81,6 +91,7 @@
"CBOR_TEXT_STRING",
"CBOR_ARRAY",
"CBOR_MAP",
"CBORMapData",
"CBOR_SEMANTIC_TAG",
"CBOR_SIMPLE_VALUE",
"CBOR_FALSE",
Expand All @@ -104,6 +115,8 @@
# Field base classes
"CBORF_element",
"CBORF_field",
"CBORF_ANY",
"CBOR_ABSENT",
# Scalar fields
"CBORF_UNSIGNED_INTEGER",
"CBORF_NEGATIVE_INTEGER",
Expand All @@ -115,11 +128,16 @@
"CBORF_UNDEFINED",
"CBORF_FLOAT",
# Structured fields
"CBORF_ITEMS",
"CBORF_REMAINDER_OF",
"CBORF_ARRAY",
"CBORF_ARRAY_OF",
"CBORF_ARRAY_INDEFINITE",
"CBORF_MAP",
"CBORF_SEMANTIC_TAG",
# Complex fields
"CBORF_optional",
"CBORF_CONDITIONAL",
"CBORF_PACKET",
"CBORF_BYTE_STRING_PACKET",
]
Loading
Loading