AUTOSAR Classic SecOC simulation project: secured I-PDU authentication, freshness management, and key handling for inter-ECU CAN communication, following ISO/SAE 21434, AUTOSAR Classic, and UN R155.
Phase 1 — Simulation (active). All sim/ modules listed in requirements/sim.txt are implemented,
including the ECU object model (ecu_base.py, sender_ecu.py,
receiver_ecu.py), pdu_router.py, signal_packager.py, logger.py, and
time_utils.py.
# Install (editable install so `sim`/`api` resolve for pytest)
pip install -e .
pip install -r requirements.txt
# Run tests
pytest tests/ -v --tb=short # fast suite
pytest tests/ --runslow -v # + timer-dependent testsProof of Concept — standalone, no backend, pure JS animation: ▶ Live Demo
open dashboard/index.htmlLive Monitor — connects to the real FastAPI backend:
# Terminal 1
uvicorn api.main:app --reload --port 8000
# Terminal 2
python -m http.server 3000 --directory dashboard
# then open http://localhost:3000/SecOC_Monitor.htmlAlternatively, on Windows, just double-click start.bat — it sets up the
virtual environment, installs dependencies, starts the backend and dashboard
servers in their own windows, and opens the Live Monitor in your browser
automatically.
See USERINFO.md for how to use the Live Monitor to validate secure
communication (transmit/receive, attack injection, VTC scenario runs) and a
full reference of every panel in the GUI.
requirements/— customer/system/software requirements and test plan (CSV,.txt)design/— architecture, HLD, LLDs, sequence diagrams (Mermaid)sim/— SecOC simulation modulesapi/— FastAPI backenddashboard/— PoC and live monitor dashboardstests/— pytest VTC test suitesdocs/— ASPICE process documents