Home Learning Paths ECU Lab Assessments Interview Preparation Arena Pricing Log In Sign Up

Cybersecurity Goal Definition

Goal AttributeRequired ContentExample (CG-04)
CIA propertyWhich of Confidentiality/Integrity/Availability is protectedIntegrity
AssetThe specific asset being protectedCAN messages on powertrain bus
ConstraintThe security property that must holdAttacker cannot inject arbitrary engine torque commands without detection
Link to TARAReference to the threat scenario that drives this goalTS-11 (engine torque injection via compromised gateway)
Impact levelASIL-equivalent: this goal's criticalityImpact S3 — safety critical

💡 Cybersecurity Goal Wording

A cybersecurity goal must be measurable and testable. 'The system shall be secure' fails — it has no pass/fail criterion. 'The integrity of CAN powertrain bus messages shall be protected such that an attacker cannot inject arbitrary engine torque commands without detection within 10 ms' succeeds — it specifies the CIA property (integrity), the asset (powertrain CAN), the constraint (no undetected injection), and a measurable timing bound (10 ms detection latency).

Cybersecurity Requirements Hierarchy

Pythonrequirements_hierarchy.py
#!/usr/bin/env python3
# Cybersecurity requirements traceability chain

requirements_chain = {
    "CG-04": {
        "level": "Cybersecurity Goal",
        "text": "Integrity of CAN powertrain bus messages shall be protected; "
                "attacker cannot inject arbitrary engine torque commands without detection",
        "linked_threat": "TS-11",
        "impact": "S3",
        "children": ["CCR-04.1"]
    },
    "CCR-04.1": {
        "level": "Cybersecurity Concept Requirement (system-level)",
        "text": "PowertrainGateway shall authenticate all CAN frames on powertrain bus "
                "using message authentication code (MAC)",
        "children": ["TSR-04.1.1", "TSR-04.1.2"]
    },
    "TSR-04.1.1": {
        "level": "Technical Security Requirement (component-level)",
        "text": "AUTOSAR SecOC module shall be configured with AES-128-CMAC, "
                "48-bit truncated MAC, FVM counter length 64 bits for all "
                "safety-critical powertrain PDUs",
        "owning_ecu": "PowertrainGateway ECU",
        "verification": "Review of ARXML SecOC configuration + integration test",
        "children": ["IS-04.1.1.1"]
    },
    "TSR-04.1.2": {
        "level": "Technical Security Requirement (component-level)",
        "text": "SecOC verification failure for any powertrain PDU shall trigger "
                "DEM event DEM_EVENT_SECOC_POWERTRAIN_FAIL within 10 ms",
        "owning_ecu": "PowertrainGateway ECU",
        "verification": "Unit test: inject frame with wrong MAC, verify DEM event timing",
        "children": []
    },
    "IS-04.1.1.1": {
        "level": "Implementation Specification (ARXML config)",
        "text": "SecOCAuthInfoTruncLength=48, SecOCFreshnessValueLength=64, "
                "SecOCFreshnessValueTruncLength=16 in AUTOSAR SecOC ARXML",
        "children": []
    }
}

def print_chain(req_id, depth=0):
    req = requirements_chain[req_id]
    print("  " * depth + f"[{req_id}] ({req['level']})")
    print("  " * depth + f"  {req['text'][:80]}")
    for child in req.get("children", []):
        print_chain(child, depth + 1)

print_chain("CG-04")

Requirements Allocation and RTM

Pythonrequirements_traceability_matrix.py
#!/usr/bin/env python3
# Requirements Traceability Matrix (RTM): TSR → ECU → verification → test

rtm = [
    {
        "tsr_id": "TSR-04.1.1",
        "text": "SecOC AES-128-CMAC 48-bit MAC for powertrain PDUs",
        "owning_ecu": "PowertrainGateway",
        "supplier": "ECU_Supplier_AG",
        "cia_ref": "CIA-2026-001",
        "verification_method": "ARXML configuration review + integration test",
        "test_case_id": "TC-SecOC-004",
        "test_status": "PASS",
        "evidence_ref": "IntegrationTest_Report_v2.3.pdf §4.2",
    },
    {
        "tsr_id": "TSR-09.2.1",
        "text": "mTLS 1.3 mandatory for all remote diagnostic connections",
        "owning_ecu": "TCU",
        "supplier": "Telematics_Supplier_GmbH",
        "cia_ref": "CIA-2026-002",
        "verification_method": "Penetration test: verify TLS downgrade rejected",
        "test_case_id": "PT-TLS-001",
        "test_status": "PASS",
        "evidence_ref": "PenTest_Report_DEKRA_2026.pdf Finding TLS-01 (Closed)",
    },
    {
        "tsr_id": "TSR-07.1.1",
        "text": "OTA package ECDSA-P256 signature verification before install",
        "owning_ecu": "OTA Client",
        "supplier": "Telematics_Supplier_GmbH",
        "cia_ref": "CIA-2026-002",
        "verification_method": "Integration test: tampered package rejected",
        "test_case_id": "TC-OTA-007",
        "test_status": "IN_PROGRESS",
        "evidence_ref": None,
    },
]

print("Requirements Traceability Matrix:")
for r in rtm:
    status = r["test_status"]
    icon = "✓" if status == "PASS" else ("⋯" if status == "IN_PROGRESS" else "✗")
    print(f"  [{icon}] {r['tsr_id']}: {r['text'][:50]}")
    print(f"       ECU: {r['owning_ecu']} | Test: {r['test_case_id']} | {status}")
print()
untested = [r for r in rtm if not r["evidence_ref"]]
print(f"Untested TSRs: {len(untested)} (must be 0 before SOP)")

Summary

Cybersecurity goals translate TARA risks into contractually binding requirements. The four-level hierarchy (goal → concept requirement → technical requirement → implementation spec) ensures that a high-level business objective ('protect integrity') becomes a specific, verifiable implementation instruction ('configure SecOCAuthInfoTruncLength=48 in ARXML'). The RTM closes the loop: every TSR must have a test case with a passed result and an evidence reference before the cybersecurity case can be signed off.

🔬 Deep Dive — Core Concepts Expanded

This section builds on the foundational concepts covered above with additional technical depth, edge cases, and configuration nuances that separate competent engineers from experts. When working on production ECU projects, the details covered here are the ones most commonly responsible for integration delays and late-phase defects.

Key principles to reinforce:

  • Configuration over coding: In AUTOSAR and automotive middleware environments, correctness is largely determined by ARXML configuration, not application code. A correctly implemented algorithm can produce wrong results due to a single misconfigured parameter.
  • Traceability as a first-class concern: Every configuration decision should be traceable to a requirement, safety goal, or architecture decision. Undocumented configuration choices are a common source of regression defects when ECUs are updated.
  • Cross-module dependencies: In tightly integrated automotive software stacks, changing one module's configuration often requires corresponding updates in dependent modules. Always perform a dependency impact analysis before submitting configuration changes.

🏭 How This Topic Appears in Production Projects

  • Project integration phase: The concepts covered in this lesson are most commonly encountered during ECU integration testing — when multiple software components from different teams are combined for the first time. Issues that were invisible in unit tests frequently surface at this stage.
  • Supplier/OEM interface: This is a topic that frequently appears in technical discussions between Tier-1 ECU suppliers and OEM system integrators. Engineers who can speak fluently about these details earn credibility and are often brought into critical design review meetings.
  • Automotive tool ecosystem: Vector CANoe/CANalyzer, dSPACE tools, and ETAS INCA are the standard tools used to validate and measure the correct behaviour of the systems described in this lesson. Familiarity with these tools alongside the conceptual knowledge dramatically accelerates debugging in real projects.

⚠️ Common Mistakes and How to Avoid Them

  1. Assuming default configuration is correct: Automotive software tools ship with default configurations that are designed to compile and link, not to meet project-specific requirements. Every configuration parameter needs to be consciously set. 'It compiled' is not the same as 'it is correctly configured'.
  2. Skipping documentation of configuration rationale: In a 3-year ECU project with team turnover, undocumented configuration choices become tribal knowledge that disappears when engineers leave. Document why a parameter is set to a specific value, not just what it is set to.
  3. Testing only the happy path: Automotive ECUs must behave correctly under fault conditions, voltage variations, and communication errors. Always test the error handling paths as rigorously as the nominal operation. Many production escapes originate in untested error branches.
  4. Version mismatches between teams: In a multi-team project, the BSW team, SWC team, and system integration team may use different versions of the same ARXML file. Version management of all ARXML files in a shared repository is mandatory, not optional.

📊 Industry Note

Engineers who master both the theoretical concepts and the practical toolchain skills covered in this course are among the most sought-after professionals in the automotive software industry. The combination of AUTOSAR standards knowledge, safety engineering understanding, and hands-on configuration experience commands premium salaries at OEMs and Tier-1 suppliers globally.

← PreviousImpact Rating & Risk DeterminationNext →Hands-On: Full TARA for Connected ECU