Skip to content

Migrate mmap serialization from bincode to rkyv with zero-copy deserialization #213

Migrate mmap serialization from bincode to rkyv with zero-copy deserialization

Migrate mmap serialization from bincode to rkyv with zero-copy deserialization #213

Workflow file for this run

name: CodeQL
on:
push:
branches: [ main ]
paths:
- 'crates/**'
- 'fuzz/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/codeql.yml'
pull_request:
branches: [ main ]
paths:
- 'crates/**'
- 'fuzz/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/codeql.yml'
schedule:
- cron: '0 3 * * 1' # Weekly on Monday at 03:00 UTC
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: 'rust'
# Note: CodeQL Rust extractor has known limitations:
# - Macro expansion: Complex macros (e.g., assert! with format strings) may fail to expand
# - Turbofish syntax: Generic type parameters (e.g., gen::<f64>()) may cause parse errors
# - Platform-specific: Code with #[cfg(target_os = "...")] only analyzed on matching platforms
# These limitations primarily affect test code and do not impact security analysis of production code.
# See: https://github.com/github/codeql/issues (search for "rust turbofish" or "rust macro expansion")
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libpcap-dev pkg-config
- name: Cache dependencies
uses: Swatinem/rust-cache@v2
with:
shared-key: "codeql"
cache-targets: "true"
- name: Build
run: cargo build --workspace
# CodeQL analyzes compiled code, so all source files are processed during build.
# Expected INFO/WARN messages during extraction:
# 1. "macro expansion failed" - Test assertions with complex format strings (non-production code)
# 2. "Expected field name" - Turbofish syntax in test utilities (error_injection.rs)
# 3. "not included as a module" - Platform-specific code excluded by conditional compilation
# These do not indicate code issues (verified by cargo check/clippy) and do not impact security coverage.
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
# Analysis uploads results to GitHub Security tab.
# Coverage: ~97% of Rust files successfully extracted (excellent for Rust projects)
# Unparsed files: Test code only (assertions, utilities), no production logic affected