Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
480cb89
Initial plan
Copilot Mar 17, 2026
e30162f
Create generic codec class combining identical parts from ASN1 and CBOR
Copilot Mar 17, 2026
c6460fd
ci: install cbor2 on Packit (#4948)
evverx Mar 19, 2026
c8e7fc0
[MS-RRP] Registry: Fix lpClassOut name request (#4953)
Ebrix Mar 23, 2026
dbffb3e
dns: fix off-by-four in EDNS0 OWNER Option (#4955)
evverx Mar 29, 2026
08da307
tests: patch localtime in the "cert remainingdays" test (#4956)
evverx Mar 30, 2026
25ee498
More Bluetooth 5.0+ packets (#4905)
sacca97 Mar 30, 2026
3d3afd4
Pickle - reconstructs the packet from field values, payload and metad…
guedou Apr 10, 2026
4f297d5
Add CBOR fields (cborfields.py, cborpacket.py) and tests (#4958)
polybassa Apr 12, 2026
a133af3
bfd: fix ConditionalField condition for optional_auth always being Tr…
T3pp31 Apr 12, 2026
569ee59
NTLM: bad doc (#4966)
gpotter2 Apr 13, 2026
ccaaec6
Users should disclose the use of AI (#4968)
gpotter2 Apr 19, 2026
211f600
Improve CMS/Kerberos support of other hashes (#4974)
gpotter2 Apr 20, 2026
2987d3e
Add WinSSP SSP for implicit authentication (#4975)
gpotter2 Apr 22, 2026
fd754c6
Follow semver: change dev version -> post (#4976)
gpotter2 Apr 22, 2026
11c4dbb
Set sys.stdout to utf-8 (#4977)
gpotter2 Apr 22, 2026
0cd256b
WinSSP: support Encryption, fix DCE/RPC SMB IO (#4978)
gpotter2 Apr 23, 2026
2458b9f
Minor fixes (#4980)
gpotter2 Apr 23, 2026
f503225
Revert last commit... (#4981)
gpotter2 Apr 23, 2026
91d2efb
Introduce single-layer and compatibility modes for UDS, KWP, OBD, and…
polybassa Apr 24, 2026
038ccc6
Enhance pickle compatibility: support legacy tuple state and maintain…
polybassa Apr 27, 2026
e48f6b2
dot15d4: fix aux_sec_header incorrect parsing (#4969)
T3pp31 Apr 28, 2026
1667337
Add SAE J1939 protocol support to Scapy contrib (#4963)
polybassa Apr 29, 2026
e2a3d87
can, isotp, soft: threding fixes and small buffer device support impr…
BenGardiner Apr 30, 2026
35b33d9
Fix incorrect layer bindings in LDP contrib module (#4985)
mohamedsolaiman May 1, 2026
15018c2
Add support for HSRPv1 Advertise packets (#4972)
amlamarra May 2, 2026
fcf7d86
ci: drop downstream import check (#4988)
evverx May 9, 2026
81a960f
bluetooth: add missing HCI events, EIR elements, and SMP packet types…
XenoKovah May 16, 2026
1237480
Add packaging status to the README
gpotter2 May 20, 2026
3744656
pr: Introduce AI-Assisted requirements
gpotter2 May 20, 2026
4143b57
pr: Update Github PR template
gpotter2 May 20, 2026
8292422
pr: fix actions deprecation warnings
gpotter2 May 20, 2026
4d638b2
pr: bump CI versions
gpotter2 May 20, 2026
58406a6
gh: skip the steps, not the job for push jobs
gpotter2 May 20, 2026
5b48d18
gh: improve description of SPDX test
gpotter2 May 20, 2026
bfc4cb3
atmt: also use Session in IO supersockets
gpotter2 May 21, 2026
5a7eecb
fwdm: use more generic TLS client version for ForwardMacine
gpotter2 May 21, 2026
e050f76
snmp: add snmpget function
gpotter2 May 21, 2026
0d7616a
smb: new smbclient() features
gpotter2 May 21, 2026
6145e80
Fix NETLOGON_LOGON_QUERY parsing: Add mailslot name alignment (#4952)
MatrixEditor May 21, 2026
44a7f99
Initial plan
Copilot Mar 17, 2026
64b2505
Add generic codec field base classes (GenericCodecField, GenericCodec…
Copilot May 25, 2026
81b33c9
Initial plan
Copilot Mar 17, 2026
745d2e7
Initial plan
Copilot Mar 17, 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
33 changes: 33 additions & 0 deletions .config/ci/check_commits.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

# SPDX-License-Identifier: GPL-2.0-only

# Check all commits in the PR have the "AI-Assisted" tag
# We copy Wireshark's contributing guide, thanks to them for the idea !
# This script is inspired by https://gitlab.com/wireshark/wireshark/-/blob/master/.gitlab-ci.yml

commits=$(git rev-list --no-merges --max-count=$((PR_FETCH_DEPTH - 1)) HEAD)
if [ -z "$commits" ]; then
echo "No commit to check in PR. OK."
exit 0
fi

missing=0
for c in $commits; do
if ! git log -1 --format=%B "$c" | grep -qi '^AI-Assisted:'; then
echo -e "ERROR: Commit \033[0;33m$c\033[0m is missing the 'AI-Assisted: yes|no [tool(s)]' trailer."
missing=1
else
echo -e "OK: Commit \033[0;32m$c\033[0m is properly tagged."
fi
done

if [ $missing -eq 1 ]; then
echo
echo -e "\033[0;31mPlease add the 'AI-Assisted' trailer to commit messages !\033[0m"
echo "See the contribution guide at: https://github.com/secdev/scapy/blob/master/CONTRIBUTING.md"
exit 1
else
echo "All checked commits include the AI-Assisted trailer."
exit 0
fi
2 changes: 1 addition & 1 deletion .config/ci/test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Usage:
# ./test.ps1 <python version>
# Examples:
# ./test.sh 3.13
# ./test.sh 3.14

if ($args.Count -eq 0) {
Write-Host "Usage: .\test.ps1 <pythonversion>"
Expand Down
1 change: 1 addition & 0 deletions .config/codespell_ignore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ ba
browseable
byteorder
cace
cantact
cas
ciph
componet
Expand Down
25 changes: 17 additions & 8 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
<!-- This is just a checklist to guide you. Please remove it if you check all items. -->
<!-- Hi there ! First of all thanks a lot for contributing to Scapy ! We're really grateful for contributions and for the time people spend contributing back. Please note that due to the amount of contributions, we have to impose quality standards for PRs.

**Checklist:**
Here is a small checklist of actions to get you started with this PR. You may remove this entire section once you're done. Please note that if you don't follow the guidelines detailed here, we might end up closing the PR :( When in doubt, ask !

- [ ] If you are new to Scapy: I have checked [CONTRIBUTING.md](https://github.com/secdev/scapy/blob/master/CONTRIBUTING.md) (esp. section submitting-pull-requests)
- [ ] I squashed commits belonging together
- [ ] I added unit tests or explained why they are not relevant
- [ ] I executed the regression tests (using `tox`)
- [ ] If the PR is still not finished, please create a [Draft Pull Request](https://github.blog/2019-02-14-introducing-draft-pull-requests/)
Checklist :

- Check the contribution guide at https://github.com/secdev/scapy/blob/master/CONTRIBUTING.md (esp. section submitting-pull-requests)
- Have good commit hygiene. They must have the `AI-Assisted` tag as explained in the contributing guide. Please squash commits that belong together, and split commits that contain multiple features.
- AI: You must make sure that you understood the internal concepts of Scapy and have good test coverage (like >90%). Please review ALL the code you generated.
- Add unit tests or explain why they are not relevant.
- If the PR is still not finished, please create a **Draft Pull Request**
- If this PR contains more than 500 lines of code (excluding unit tests), consider splitting it.
- New protocols: I considered interoperability tests with existing packages or utilities to ensure conformity of a newly generated protocol

Please read the output of the tests if they fail ! In rare cases, some tests might fail for reasons unrelated to your PR, sorry about that ! Just explain it and we'll relaunch them.
-->

### Description

<!-- brief description what this PR will do, e.g. fixes broken dissection of XXX -->

<!-- if required - short explanation why you fixed something in a way that may look more complicated as it actually is ->>
<!-- if required - short explanation why you fixed something in a way that may look more complicated as it actually is -->

<!-- if required - outline impacts on other parts of the library -->

Expand Down
87 changes: 55 additions & 32 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,40 @@ permissions:
contents: read

jobs:
commit:
name: Check the validity of the commits
runs-on: ubuntu-latest
# We follow the same contributing patterns as Wireshark. Thanks to
# https://gitlab.com/wireshark/wireshark/-/blob/master/.gitlab-ci.yml
steps:
- name: Get the number of commits in the PR
run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}"
if: github.event_name == 'pull_request'
- name: Checkout Scapy
uses: actions/checkout@v6
with:
fetch-depth: ${{ env.PR_FETCH_DEPTH }}
if: github.event_name == 'pull_request'
- name: AI trailer reminder
run: bash ./.config/ci/check_commits.sh
if: github.event_name == 'pull_request'
spdx:
name: Check SPDX identifiers
runs-on: ubuntu-latest
steps:
- name: Checkout Scapy
uses: actions/checkout@v6
- name: All files should have a SPDX identifier
run: bash scapy/tools/check_spdx.sh
health:
name: Code health check
runs-on: ubuntu-latest
needs: [commit, spdx]
steps:
- name: Checkout Scapy
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Setup Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install tox
Expand All @@ -39,34 +65,28 @@ jobs:
docs:
# 'runs-on' and 'python-version' should match the ones defined in .readthedocs.yml
name: Build doc
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
needs: [commit, spdx]
steps:
- name: Checkout Scapy
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Setup Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.12"
python-version: "3.14"
- name: Install tox
run: pip install tox
- name: Build docs
run: tox -e docs
spdx:
name: Check SPDX identifiers
runs-on: ubuntu-latest
steps:
- name: Checkout Scapy
uses: actions/checkout@v4
- name: Launch script
run: bash scapy/tools/check_spdx.sh
mypy:
name: Type hints check
runs-on: ubuntu-latest
needs: [commit, spdx]
steps:
- name: Checkout Scapy
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Setup Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install tox
Expand All @@ -77,13 +97,14 @@ jobs:
utscapy:
name: ${{ matrix.os }} ${{ matrix.installmode }} ${{ matrix.python }} ${{ matrix.mode }} ${{ matrix.flags }}
runs-on: ${{ matrix.os }}
needs: [commit, spdx]
timeout-minutes: 20
continue-on-error: ${{ matrix.allow-failure == 'true' }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python: ["3.8", "3.9", "3.10", "3.11", "3.13"]
mode: [non_root]
installmode: ['']
flags: [" -K scanner"]
Expand All @@ -96,7 +117,7 @@ jobs:
flags: " -K scanner"
# Linux root tests on last version
- os: ubuntu-latest
python: "3.13"
python: "3.14"
mode: root
flags: " -K scanner"
# PyPy tests: root only
Expand All @@ -106,23 +127,23 @@ jobs:
flags: " -K scanner"
# Libpcap test
- os: ubuntu-latest
python: "3.13"
python: "3.14"
mode: root
installmode: 'libpcap'
flags: " -K scanner"
# macOS tests
- os: macos-14
python: "3.13"
python: "3.14"
mode: both
flags: " -K scanner"
# windows tests
- os: windows-latest
python: "3.13"
python: "3.14"
mode: root
flags: " -K scanner"
# Scanner tests
- os: ubuntu-latest
python: "3.13"
python: "3.14"
mode: root
allow-failure: 'true'
flags: " -k scanner"
Expand All @@ -131,23 +152,23 @@ jobs:
mode: root
flags: " -k scanner"
- os: macos-14
python: "3.13"
python: "3.14"
mode: both
allow-failure: 'true'
flags: " -k scanner"
- os: windows-latest
python: "3.13"
python: "3.14"
mode: both
allow-failure: 'true'
flags: " -k scanner"
steps:
- name: Checkout Scapy
uses: actions/checkout@v4
uses: actions/checkout@v6
# Codecov requires a fetch-depth > 1
with:
fetch-depth: 2
- name: Setup Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}
- name: Install Tox and any other packages (linux/osx)
Expand Down Expand Up @@ -175,13 +196,14 @@ jobs:
cryptography:
name: pyca/cryptography test
runs-on: ubuntu-latest
needs: [commit, spdx]
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Setup Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.12"
python-version: "3.14"
- name: Install tox
run: pip install tox
# pyca/cryptography's CI installs cryptography
Expand All @@ -195,16 +217,17 @@ jobs:
analyze:
name: CodeQL analysis
runs-on: ubuntu-latest
needs: [commit, spdx]
permissions:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 2
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@v4
with:
languages: 'python'
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@v4
2 changes: 2 additions & 0 deletions .packit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ actions:
- "rm -fv .packit_rpm/sources"
# Drop all downstream patches to prevent them from interfering with upstream builds
- "sed -ri '/^Patch[0-9]+\\:.+\\.patch/d' .packit_rpm/scapy.spec"
- "sed -i '/^%pyproject_check_import/d' .packit_rpm/scapy.spec"
- "sed -i '/^%check$/apip3 install scapy-rpc\\nOPENSSL_ENABLE_SHA1_SIGNATURES=1 OPENSSL_CONF=$(python3 ./.config/ci/openssl.py) ./test/run_tests -c test/configs/linux.utsc -K ci_only -K netaccess -K scanner' .packit_rpm/scapy.spec"
- "sed -i '/^BuildArch/aBuildRequires: can-utils' .packit_rpm/scapy.spec"
- "sed -i '/^BuildArch/aBuildRequires: libpcap' .packit_rpm/scapy.spec"
Expand All @@ -28,6 +29,7 @@ actions:
- "sed -i '/^BuildArch/aBuildRequires: python3-ipython' .packit_rpm/scapy.spec"
- "sed -i '/^BuildArch/aBuildRequires: python3-brotli' .packit_rpm/scapy.spec"
- "sed -i '/^BuildArch/aBuildRequires: python3-can' .packit_rpm/scapy.spec"
- "sed -i '/^BuildArch/aBuildRequires: python3-cbor2' .packit_rpm/scapy.spec"
- "sed -i '/^BuildArch/aBuildRequires: python3-coverage' .packit_rpm/scapy.spec"
- "sed -i '/^BuildArch/aBuildRequires: python3-cryptography' .packit_rpm/scapy.spec"
- "sed -i '/^BuildArch/aBuildRequires: python3-tkinter' .packit_rpm/scapy.spec"
Expand Down
4 changes: 2 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ formats:
- pdf

build:
os: ubuntu-22.04
os: ubuntu-24.04
tools:
python: "3.12"
python: "3.14"
# To show the correct Scapy version, we must unshallow
# https://docs.readthedocs.io/en/stable/build-customization.html#unshallow-git-clone
jobs:
Expand Down
36 changes: 27 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ submitting an issue.
If you're not sure whether a behavior is a bug or not, submit an issue
and ask, don't be shy!

### AI-assisted reports

<!-- Wireshark has greate AI guidelines ! Let's not reinvent the wheel -->
<!-- https://gitlab.com/wireshark/wireshark/-/blob/master/doc/wsug_src/wsug_introduction.adoc -->

If you use AI tools to help find or draft a bug report, please mention that and make sure you have personally verified the steps and details before submitting.
Purely AI-generated reports are not supported and might be closed; a quick human check keeps triage efficient for everyone.

### Enhancements / feature requests

If you want a feature in Scapy, but cannot implement it yourself or
Expand All @@ -53,6 +61,18 @@ of function calls, packet creations, etc.).

### Coding style & conventions

- All commits should include the `AI-Assisted: (yes/no) [tool]` tag. This is used to disclose the AI tools that are used when authoring. You must check the commits you produce, or your PR might be closed. The tag may look like such:

```
AI-Assisted: yes (Claude Opus 4.7)
```
or

```
AI-Assisted: no
```
This guideline is adapted with thanks to [Wireshark's AI usage statement](https://www.wireshark.org/docs/wsdg_html_chunked/ChSrcContribute.html).

- The code should be PEP-8 compliant; you can check your code with
[pep8](https://pypi.python.org/pypi/pep8) and the command `tox -e flake8`

Expand All @@ -63,20 +83,18 @@ of function calls, packet creations, etc.).
- [Google Python Style Guide](https://google.github.io/styleguide/pyguide.html)
is a nice read!

- Avoid creating unnecessary `list` objects, particularly if they
can be huge (e.g., when possible, use `for line in fdesc` instead of
`for line in fdesc.readlines()`; more generally prefer generators over
lists).

### Tests

Please consider adding tests for your new features or that trigger the
bug you are fixing. This will prevent a regression from being
unnoticed. Do not use the variable `_` in your tests, as it could break them.
We require adding tests for all new features or bug fixes, or a justification as to why they are not relevant. We know it's annoying, but Scapy is all about parsing and dissecting weird protocols us maintainers will never encounter. Having good tests is the only way to keep the code maintainable.

- If you are fixing a bug, provide a one-liner that reproduced the bug you are fixing.
- If you are introducing dissectors, provide at least a very simple "dissect" / "build" of real packets with simple assertions.
- Tests can be very simple. It's much better to have dumb tests that break when one does changes than no tests.
- Do not use the variable `_` in your tests, as it could break them.

If you find yourself in a situation where your tests locally succeed but
fail if executed on the CI, try to enable the debugging option for the
dissector by setting `conf.debug_dissector = 1`.
dissector by setting `conf.debug_dissector = 1`. In doubt, feel free to ask maintainers for help.

### New protocols

Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ follow the instructions to install them.

<!-- stop_ppi_description -->

## Packaging status

[![Packaging status](https://repology.org/badge/vertical-allrepos/scapy.svg?columns=4&exclude_unsupported=1&header=
)](https://repology.org/project/scapy/versions)

## License

Scapy's code, tests and tools are licensed under GPL v2.
Expand Down
Loading