Skip to content

WIP: Add flexray support via vector xllib #1427

WIP: Add flexray support via vector xllib

WIP: Add flexray support via vector xllib #1427

Workflow file for this run

# SPDX-FileCopyrightText: AISEC Pentesting Team
#
# SPDX-License-Identifier: CC0-1.0
# https://github.com/actions/setup-python/issues/374
#
name: tests
on:
push:
branches:
- master
pull_request:
paths:
- '.github/**'
- 'src/**'
- 'tests/**'
jobs:
pytest:
strategy:
fail-fast: false
matrix:
python-version: ['3.11', '3.12']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: Gr1N/setup-poetry@v9
- uses: actions/cache@v4
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}-${{ hashFiles('pyproject.toml') }}
- name: Install Dependencies
run: |
poetry install
- name: Run pytest
run: |
poetry run python -m pytest -v tests
vecu:
strategy:
fail-fast: false
matrix:
python-version: ['3.11', '3.12']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: Gr1N/setup-poetry@v9
- uses: actions/cache@v4
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}-${{ hashFiles('pyproject.toml') }}
- name: Install Dependencies
run: |
poetry install
- name: Spawn vECU
run: |
poetry run gallia script vecu "unix-lines:///tmp/vecu.sock" rng --seed 3 --mandatory_sessions "[1, 2, 3]" --mandatory_services "[DiagnosticSessionControl, EcuReset, ReadDataByIdentifier, WriteDataByIdentifier, RoutineControl, SecurityAccess, ReadMemoryByAddress, WriteMemoryByAddress, RequestDownload, RequestUpload, TesterPresent, ReadDTCInformation, ClearDiagnosticInformation, InputOutputControlByIdentifier]" &
- name: Add config
run: |
echo "[gallia]" > gallia.toml
echo "[gallia.scanner]" >> gallia.toml
echo 'target = "unix-lines:///tmp/vecu.sock"' >> gallia.toml
echo 'dumpcap = false' >> gallia.toml
echo "[gallia.protocols.uds]" >> gallia.toml
echo 'ecu_reset = 0x01' >> gallia.toml
- name: Dump Config and Defaults
run: |
poetry run gallia --show-config
poetry run gallia --show-defaults
- name: Test scan-services
run: |
poetry run gallia scan uds services --sessions 1 2 --check-session
- name: Test scan-sessions
run: |
poetry run gallia scan uds sessions --depth 2
poetry run gallia scan uds sessions --fast
- name: Test scan-identifiers
run: |
poetry run gallia scan uds identifiers --start 0 --end 100 --sid 0x22
poetry run gallia scan uds identifiers --start 0 --end 100 --sid 0x2e
poetry run gallia scan uds identifiers --start 0 --end 100 --sid 0x31
- name: Test scan-reset
run: |
poetry run gallia scan uds reset
- name: Test scan-dump-seeds
run: |
poetry run gallia scan uds dump-seeds --duration 0.01 --level 0x2f
- name: Test scan-memory-functions
run: |
for sid in 0x23 0x34 0x35 0x3d; do
poetry run gallia scan uds memory --sid "$sid"
done
- name: Test UDS primitives
run: |
poetry run gallia primitive uds ecu-reset
poetry run gallia primitive uds vin
poetry run gallia primitive uds ping --count 2
poetry run gallia primitive uds rdbi 0x108d
poetry run gallia primitive uds pdu 1001
poetry run gallia primitive uds wdbi 0x2266 --data 00
poetry run gallia primitive uds dtc read
poetry run gallia primitive uds dtc clear
poetry run gallia primitive uds dtc control --stop
poetry run gallia primitive uds dtc control --resume
poetry run gallia primitive uds iocbi 0x1000 reset-to-default