Software Safety Audit Process Verification Independence Liability Governance

Software Safety Audit Process & Independence Governance Guide

Operational guide for software developers, project leads, and safety engineers: What shall be done by the author, when independent audits are legally mandated, and how to avoid unilateral liability.

Fundamental Rule of Verification Independence: Under international safety standards (IEC 61508, ISO 26262, IEC 62304, and the EU Machinery Directive), the developer who authored safety-critical code must NEVER perform the final safety assessment or sign off on safety compliance alone. Self-assessment violates audit objectivity due to confirmation bias, is legally inadmissible in regulatory audits, and creates severe personal liability exposure.

1. What Shall Be Done by the Developer vs. What Shall NOT

When developing software that interfaces with physical actuators, energy stages, or safety-critical hardware, the software developer has well-defined technical duties but strict legal boundaries:

✅ What SHALL Be Done by the Developer

  • Transparent Output Mapping: Catalog every outgoing command, raw byte packet, API call, and bus instruction that reaches hardware actuators into an Output Control Matrix.
  • Defensive Programming: Implement strict bounds checking, parameter validation, command sequence locks, and timeouts.
  • Guaranteed Fail-Safe Teardown: Wrap all physical hardware interactions in try ... finally blocks ensuring de-energization commands execute under all failure/abort conditions.
  • Automated Test Coverage: Author Unit Tests (Level 1) and Mock Integration Tests (Level 2) demonstrating that functions reject invalid states and handle communication drops.
  • Known Hazard Reporting: Formally report any legacy workarounds, unmonitored hardware commands, or missing interlocks to the project safety team.

❌ What Shall NOT Be Done by the Developer

  • Do NOT Conduct Sole Safety Assessments: You cannot audit your own code for safety certification. Confirmation bias prevents authors from anticipating destructive edge cases.
  • Do NOT Sign Unilateral Conformity Declarations: Never sign regulatory compliance declarations (e.g. CE Marking, Machinery Directive DoC, Laser Safety Certificates). This is legally vested only in appointed corporate officers.
  • Do NOT Sign Solitary Liability Waivers: Never sign internal documents stating that "the software is guaranteed safe" in the absence of independent hardware interlocks.
  • Do NOT Assume Software Substitutes Hardware Safety: Never accept requirements where software alone is expected to prevent catastrophic physical hazards without passive hardware guards (relays, thermal fuses, beam dumps).

🧱 Boundary of Developer Responsibility (Tool Logic vs. External Execution)

The software developer is accountable only for the deterministic logic compiled inside their own tool—not for behavior outside the tool's governance:

Internal Factory, Bench & Test Tools Are NOT Exempt: Even when software is built strictly for internal production, calibration, or R&D benches—and never shipped to end customers—technicians and operators are still exposed to physical hazards (lasers, moving motors, thermal stages). Under occupational safety and machinery laws, "it is only an internal bench tool" does not waive hardware interlocks or independent safety verification.

2. Audit Independence: Can Another Developer in the Team Audit Your Code?

International safety standards categorize verification independence into distinct, legally recognized tiers. Whether another developer can audit your code depends strictly on the level of independence required by the target Safety Integrity Level (SIL / ASIL / Software Class / PL):

Deep Dive — SIL, ASIL, Class, PL & Class 3B Laser Audit Roles: Not sure what SIL, ASIL, Class A/B/C, or PL a–e mean, or who specifically must audit and sign off on Class 3B laser systems? Open the Safety Levels & Class 3B Laser Sign-Off Guide →
Independence Tier Definition & Relationship Permissible Scope Applicability Across Standards
Level I1
(Same Team Peer)
A fellow software developer belonging to the same development team and reporting to the same project/delivery manager. • Peer code reviews (pull requests).
• Unit test verification and static analysis review.
• Coding standards and style compliance.
Cannot sign off on safety assessment.
• IEC 61508: Permitted only for SIL 1 verification; prohibited as sole assessor for SIL 2, 3, 4.
• ISO 26262: Permitted for ASIL A; insufficient for ASIL B/C/D confirmation reviews.
• IEC 62304: Permitted for Class A; insufficient for Class B/C hazard controls.
Level I2
(Independent Department)
An engineer from an independent department within the same company (e.g., dedicated QA Team, Systems Safety Engineering, or Verification Department) who does not report to the project delivery manager. • Formal Functional Safety Verification.
• Fault injection and negative hardware testing.
• Hardware-Software Interface (HSI) sign-off.
• Internal Safety Audit and Assessment.
• IEC 61508: Mandatory / Recommended for SIL 2 and SIL 3 verification.
• ISO 26262: Required for ASIL B and ASIL C confirmation reviews.
• IEC 62304: Required for Class B and Class C software risk mitigations.
Level I3
(Independent Organization)
A third-party accredited organization (e.g., TÜV, Notified Body, or certified external safety assessor) completely separate from the company. • Full Type-Examination Certification.
• Formal functional safety certification.
• Regulatory compliance audit for market release.
• IEC 61508: Mandatory for SIL 4; highly recommended for SIL 3.
• ISO 26262: Mandatory for ASIL D confirmation reviews.
• Machinery Directive: Mandatory for Annex IV high-risk machinery.
Summary on Internal Peer Review: Another developer in your team CAN review your code for bugs and logic errors, but they CANNOT provide formal safety certification. For safety-critical functions, an independent QA or Safety Engineer (Level I2) must conduct negative testing and formal assessment.

3. What Happens if Safety Compliance Papers Are Signed "Just Because"? (Rubber-Stamping Risks)

Signing a safety compliance sheet, verification sign-off, or audit declaration casually—without strictly following the mandatory norms, without independent verification, or simply because "someone had to sign it"—carries severe legal, commercial, and professional consequences.

The Legal Reality of "Rubber-Stamping": In product liability law, a signature on a safety document is an enforceable legal certification that recognized state-of-the-art safety standards were rigorously applied and proven. Signing without the required empirical testing and normative independence converts a technical oversight into an act of gross negligence (culpa lata) or willful misrepresentation.

⚖️ 1. Personal Civil & Criminal Liability

Corporate shielding does not protect against gross negligence. If a physical incident occurs (e.g., laser eye damage, thermal runaway, or mechanical pinch injury):

  • No "Manager Told Me To" Defense: Courts and criminal prosecutors do not accept "my supervisor told me to sign" as an excuse for signing a false or unverified safety document.
  • Individual Guarantor Status: The signatory is legally identified as a guarantor who personally attested that the system was safe to operate without technical proof.
  • Criminal Prosecution: In European, American, and international jurisdictions, signing off on unsafe safety-critical systems can lead to personal criminal charges for negligent bodily injury or reckless endangerment.

🛡️ 2. Total Invalidation of Insurance Coverage

Insurers do not pay for rubber-stamped compliance:

  • Gross Negligence Exclusion: Commercial General Liability, Errors & Omissions (E&O), and Directors & Officers (D&O) policies universally contain clauses excluding coverage for damages caused by willful deviation from recognized safety standards.
  • Direct Personal Recourse: The insurance provider has the statutory right to deny indemnity or sue the company and the individual signatory to recover all paid damages (subrogation/recourse).

🚨 3. Invalidation of Certificate & Compulsory Recalls

A fraudulent or improper sign-off voids the product's market access:

  • Void Ab Initio: Under EU directives and international product safety laws, declarations of conformity lacking requisite technical files are legally non-existent.
  • Market Surveillance Bans: Regulatory bodies (e.g. EU Market Surveillance Authorities, OSHA, FDA) enforce immediate product sales freezes and mandatory global recalls.
  • Immense Commercial Penalties: Recalls, quarantine of installed inventory, customer breach-of-contract penalties, and contractual indemnification can easily reach millions of euros.

🎯 4. Internal Corporate Scapegoating

When an incident occurs, the unauthorized signatory stands alone:

  • Corporate Self-Preservation: During internal or judicial investigations, corporate legal counsel must isolate organizational fault. If an employee signed outside established safety processes, the company will demonstrate that the employee acted ultra vires (without authorization).
  • Termination for Cause: The individual faces immediate termination for gross misconduct and permanent loss of professional credibility, engineering licenses, or chartered status.

Where These Consequences Stand (Legal & Normative Basis)

Technical standards (IEC 61508, ISO 26262, IEC 62304, IEC 60825-1, ISO 13849-1) define the engineering rules and independent verification duties, while statutory laws and EU directives enforce the legal penalties, recalls, and personal liability by referencing those standards:

Consequence Area Applicable Laws, Directives & Normative Clauses
1. Personal Civil & Criminal Liability • National Criminal & Civil Codes: Negligent bodily injury, reckless endangerment, civil tort / breach of duty of care, and individual guarantor liability when signing false safety attestations.
• EU Product Liability Directive (85/374/EEC & Directive (EU) 2024/2853): Strict liability for defective products; Directive (EU) 2024/2853 explicitly covers software as a product.
2. Insurance Exclusion & Recourse • National Insurance Contract Laws & Policy Exclusions: Commercial General Liability (CGL), E&O, and D&O policies exclude damages caused by gross negligence or willful departure from recognized state-of-the-art technical standards, preserving insurer subrogation/recourse rights.
3. Void Certificates, Bans, Recalls & Fines • EU Machinery Directive 2006/42/EC (Art. 5, 11, 16, Annex II) & Regulation (EU) 2023/1230 (Art. 10, 20–21, 43–46, 50): Requires a complete technical file before signing a Declaration of Conformity; Article 50 mandates Member State penalties (including criminal penalties for serious infringements) and Articles 43–46 govern market withdrawal and compulsory recalls.
• EU Market Surveillance Regulation (EU) 2019/1020 (Art. 16, 19, 25–28): Empowers authorities to order sales bans, recalls, and destruction of non-compliant equipment.
4. Internal Bench & Factory Tool Liability • EU Occupational Safety Framework Directive 89/391/EEC (and national workplace safety laws / OSHA): Employer and workplace safety duties apply to technicians operating internal test, calibration, and production equipment.
5. Loss of "Presumption of Conformity" • EU Machinery Directive 2006/42/EC Art. 7 / Regulation (EU) 2023/1230 Art. 20, linked directly to IEC 61508-1 (Clause 8), ISO 26262-2 (Confirmation Measures), and IEC 62304 (Clauses 4, 5, 8) verification independence rules.

Normative Comparison: Following Norms vs. Informal "Just Because" Sign-Off

Compliance Dimension Formal Normative Process (IEC 61508 / ISO 26262 / IEC 62304) Informal / Rubber-Stamped Sign-Off ("Just Because")
Presumption of Conformity Granted. Demonstrating compliance with harmonized norms grants legal presumption that state-of-the-art safety was maintained. Forfeited. The defense bears the full legal burden of proving that an ad-hoc unverified process was safe under all conditions.
Signatory Authority Corporate Legal Representative. Signed by appointed officers supported by an independent Level I2/I3 technical dossier. Individual Developer / Author. Signed alone by a technical author with no corporate delegated legal authority.
Independent Verification Mandatory. Documented negative testing, boundary analysis, and fault injection by an independent QA/safety engineer. None. Author checks their own work or peers perform superficial checks influenced by confirmation bias.
Physical Safety Interlocks Mandatory. Hardware interlocks (shutters, dual cutoffs) guarantee fail-safe state even during CPU or memory crash. Ignored / Assumed. Software is erroneously expected to act as the sole safety barrier against physical hazards.
Liability Exposure Protected. Company and staff operate within standard engineering standards; fully covered by corporate insurance. Extreme & Uninsured. Gross negligence; personal liability exposure; insurance denial; criminal investigation.
The Rule of Thumb for Developers: If asked to sign a safety compliance certificate or audit sign-off sheet for code you wrote, politely decline to sign alone. Instead, state: "As the code author, international standards require me to supply the command mapping and unit tests, while the formal safety sign-off must be performed independently by QA and Systems Engineering."

4. Formal Communication Templates: How to Formally Request an Independent Audit

Choose between two communication models depending on whether you need a quick executive handover or a detailed technical breakdown:

Option A: Concise & Direct Compliance Handover (Recommended for Quick Email / Slack)

Use this concise template when you need to hand over your documentation while immediately and clearly establishing that standards do not permit self-audits:

Subject: Technical Handover: Software Controls & Safety Audit Requirements Hi [Manager / Lead], As requested, I have documented the software control paths, command outputs, and unit test coverage for our hardware-bound interfaces (attached). Important Compliance Note: Under international functional safety standards (IEC 61508-3, ISO 26262-6, and IEC 62304), an author's self-review cannot legally or technically constitute a valid safety software audit. Standard compliance requires that safety verification be conducted independently of the developer who wrote the code to prevent confirmation bias. Next Steps: 1. Software Handover (Done): My technical mapping, edge cases, and unit test results are attached and ready for review. 2. Independent Verification Needed: An independent QA or safety engineer must execute negative testing, fault injection, and verify physical hardware interlocks. Please let me know who will be assigned to lead the independent safety assessment so I can hand over the technical artifacts. Best regards, [Your Name] Software Developer

Option B: Detailed & Comprehensive Architectural Memorandum

Use this expanded template when submitting formal documentation into a ticketing system (Jira, Azure DevOps, Confluence) or when addressing a multi-departmental safety review board:

Subject: Input for Functional Safety Assessment – Software Architecture & Verification Scope Hi [Manager / Lead], Regarding the safety assessment for physical actuator and safety-critical command activation: To support this, I have compiled the technical documentation, control flows, and unit/integration test results showing how the software currently handles actuator and hardware-bound commands (attached/linked below). However, because I developed this code, standard functional safety practices (such as IEC 61508, ISO 26262, and IEC 62304) require that the final safety assessment and verification be performed independently of the code author. Self-assessment creates confirmation bias and will not satisfy formal safety audits, ISO certifications, or regulatory compliance reviews. To ensure the system is properly certified and safe for operation, here is how we should proceed: 1. My Deliverable (attached): Technical architecture, command path analysis, known edge cases, and unit/integration test coverage. 2. Independent Verification Needed: An independent reviewer / QA engineer (Level I2 independence) to execute negative testing, boundary analysis, and fault injection on the hardware. 3. Hardware Interlock Review: Confirmation from electrical / systems engineering that physical safeguards (e.g., hardware shutters, thermal switches, dual-channel enable lines, hardware watchdog circuits) prevent hazardous activation even in the event of software failure, freeze, or corrupted memory states. Let me know who will be assigned to conduct the independent verification so I can walk them through the architecture. Best regards, [Your Name] Software Developer

Option C: Written Management Override / Risk Acceptance (If Verification Is Waived)

Never rely on a verbal instruction such as "we don't have time for QA—just ship or run it anyway." If management decides to proceed without independent verification or hardware interlocks, put the instruction in writing so it is formally recorded as a management risk-acceptance decision:

Subject: Risk Acceptance Confirmation – Proceeding Without Independent Safety Verification Hi [Manager / Lead], Following up on our discussion regarding [Tool / Project Name] (Commit/Version: [Hash/Version]): As noted in my previous handover, independent safety verification (Level I2) and/or hardware interlock validation have not yet been completed for the hardware-bound commands documented in the attached analysis. If management decides to deploy or operate this software on the bench/production floor prior to independent verification, please reply to confirm this Risk Acceptance decision in writing so it can be logged in [Jira / Azure DevOps Ticket #]. To be clear, my technical documentation maps what commands the software sends as of this version—it does not constitute a safety certification or a guarantee of hardware safety. Best regards, [Your Name] Software Developer

Standard Deliverable Disclaimer Block (Version-Pinning & Non-Certification)

Paste this 3-point block at the top or bottom of every technical command mapping or handover document you deliver so it cannot be detached from its context or used as a blanket certification:

Tool / Version: [Tool Name] | Source Snapshot: [Date / Git Commit / Build Version] Scope: This document describes only the commands sent by this PC tool based on the source code at the date above. It does not verify device firmware, external update packages, hardware interlocks, or production floor setup, and does not constitute a safety audit or certification. Any subsequent code changes invalidate this mapping.

5. Functional Safety Standards Library: Official Sources & Offline Reference Guides

The following table and cards provide direct access to both the original official standard authority portals (IEC Webstore, ISO Catalog, and EU EUR-Lex) and the locally stored PDF technical reference guides for offline review and audit defense:

IEC 61508: Functional Safety of E/E/PE Safety-Related Systems Parts 1, 2, 3 & 7 • Software Safety Lifecycle, SIL Allocation, Independence Matrix Table 4
ISO 26262: Road Vehicles - Functional Safety Standard Parts 2, 3, 4, 6 & 8 • ASIL Decomposition, Freedom from Interference (FFI), HSI Specification
IEC 62304: Medical Device Software - Life Cycle Processes Clauses 4, 5, 7 & 8 • Software Safety Classification (Class A/B/C), ISO 14971 Risk Integration
IEC 60825-1: Safety of Laser Products & Optical Radiation Clauses 4, 6.2, 6.7 • AEL Limits, Engineering Interlocks, Remote Physical Interlock Loops
EU Machinery Safety Legislation: Directive 2006/42/EC & Regulation 2023/1230 Annex I (EHSR 1.2.1), Annex II (Declaration of Conformity), CE Marking & ISO 13849-1
ISO 13849-1: Safety-Related Parts of Control Systems (SRP/CS) Performance Levels (PL a through PL e), Category 1-4 Architecture, Fail-Safe Interlock Design
EU Product Liability: Directive 85/374/EEC & Directive (EU) 2024/2853 Strict Liability for Defective Products • Explicit Inclusion of Software as a Product
EU Market Surveillance (2019/1020) & Workplace Safety (89/391/EEC) Compulsory Recalls & Sales Bans (Art. 16, 19, 25-28) • Internal Bench/Factory Tool Safety Duties

6. Practical Workflow for the Engineering Team

  1. Step 1 (Author Phase): The code author documents all hardware-bound commands, implements unit tests, and adds fail-safe teardown routines in finally blocks.
  2. Step 2 (Peer Review): A teammate performs Level I1 code review for coding standards, exception handling, and edge cases.
  3. Step 3 (Formal Independent Verification): An independent QA or Safety Engineer (Level I2) executes negative testing and fault injection against mock hardware.
  4. Step 4 (Hardware Interlock Validation): Systems and Electrical Engineering verify that physical interlocks (relays, emergency stops, thermal cutoffs) protect the system regardless of software state.
  5. Step 5 (Collegiate Sign-Off): Project Management, Systems Safety, and QA sign off on the release dossier. The developer never signs alone.
  6. Step 6 (Immutable Paper Trail & Archiving): Archive the handover email, command mapping, exact Git commit/tag, known-hazard warnings, and any management risk-acceptance reply in a timestamped, immutable company system (Jira/Azure DevOps ticket or Confluence page with version history).

🗂️ Developer Paper Trail Checklist (Before Closing Any Hardware-Control Task)