Skip to content

Conversation

adrianlasota
Copy link
Contributor

This pull request introduces several new workflows, documentation updates, and example scripts for the mfd-packet-capture project. The changes primarily focus on automating builds and releases, improving code security through CodeQL analysis, and providing comprehensive documentation and examples for using the module. Below is a summary of the most important changes:

Workflow Enhancements

  • Added a reusable workflow for building and uploading .whl packages with support for version bumping, testing, and publishing to PyPI. (.github/workflows/build_upload_whl.yml)
  • Introduced a CodeQL analysis workflow to enhance code security by scanning for vulnerabilities and errors in supported languages. (.github/workflows/codeql.yml)
  • Created workflows for manual release builds (.github/workflows/manual_release.yml) and pull request builds (.github/workflows/pull_requests.yml) to streamline development and release processes. [1] [2]

Documentation Updates

  • Updated README.md to include an overview of the project, supported OSes, usage examples, and API documentation for Tshark, Tcpdump, and PktCap.
  • Added AUTHORS.md listing contributors to the project.
  • Updated CONTRIBUTING.md to reflect the project's name and license terms.
  • Added LICENSE.md with the MIT license for the project.

Example Scripts

  • Added example scripts demonstrating the usage of PktCap and Tcpdump modules, including initialization, packet capture, and stopping processes. (examples/pktcap_example.py, examples/tcpdump_example.py) [1] [2]

@mfd-intel-bot
Copy link

We don't publish DEVs .whl.
To build .whl, run 'pip install git+https://github.com/intel/mfd-packet-capture@opensource'

1 similar comment
@mfd-intel-bot
Copy link

We don't publish DEVs .whl.
To build .whl, run 'pip install git+https://github.com/intel/mfd-packet-capture@opensource'

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

Copilot

This comment was marked as outdated.

@mfd-intel-bot
Copy link

We don't publish DEVs .whl.
To build .whl, run 'pip install git+https://github.com/intel/mfd-packet-capture@opensource'

1 similar comment
@mfd-intel-bot
Copy link

We don't publish DEVs .whl.
To build .whl, run 'pip install git+https://github.com/intel/mfd-packet-capture@opensource'

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds initial support for automated builds/releases, security scanning, documentation, examples, and extensive unit tests for packet capture wrappers.

  • Introduces unit tests for Tshark, Tcpdump, and PktCap classes
  • Implements wrapper modules (tshark.py, tcpdump.py, pktcap.py) with start/stop logic and version checks
  • Updates Sphinx docs, CI workflows, and project metadata

Reviewed Changes

Copilot reviewed 34 out of 38 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/unit/test_mfd_packet_capture/test_tshark.py Adds comprehensive tests for Tshark behavior
tests/unit/test_mfd_packet_capture/test_tcpdump.py Adds comprehensive tests for Tcpdump behavior
tests/unit/test_mfd_packet_capture/test_pktcap.py Adds comprehensive tests for PktCap behavior
mfd_packet_capture/tshark.py Implements Tshark wrapper with CLI logic
mfd_packet_capture/tcpdump.py Implements Tcpdump wrapper with CLI logic
mfd_packet_capture/pktcap.py Implements PktCap wrapper with CLI logic
Comments suppressed due to low confidence (3)

mfd_packet_capture/tshark.py:193

  • Docstring typo: mentions TShark instead of the actual exception TsharkException. Update :raises TShark: to :raises TsharkException:.
        :raises TShark: if process is running

tests/unit/test_mfd_packet_capture/test_pktcap.py:14

  • There's no unit test for PktCap.get_version(), which currently returns "N/A". Adding a test will ensure this behavior remains intentional.
from mfd_packet_capture.pktcap import PktCap

README.md:25

  • [nitpick] The usage snippet calls time.sleep(2) but doesn't show importing time. Add import time to the example to avoid confusion for readers.
tshark_process = tshark.start()

Signed-off-by: Lasota, Adrian <adrian.lasota@intel.com>
@mfd-intel-bot
Copy link

We don't publish DEVs .whl.
To build .whl, run 'pip install git+https://github.com/intel/mfd-packet-capture@opensource'

1 similar comment
@mfd-intel-bot
Copy link

We don't publish DEVs .whl.
To build .whl, run 'pip install git+https://github.com/intel/mfd-packet-capture@opensource'

@adrianlasota adrianlasota merged commit e416e73 into main Jul 10, 2025
5 checks passed
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