Safety standards such as IEC 61508 are an important source for developing safety-critical systems. They provide requirements and recommendations to assist engineers in system and software development. Nevertheless, applying this standard in practice is difficult due to insufficient operationalization, namely unclear requirements and unclear or missing acceptance criteria. We systematically developed a quality model including proper measurement support that covers the code-related parts of IEC 61508 in. In this paper, we present the assessment approach for automatic compliance checks of the code-related parts of the standard. We find in a validation study that the assessment results obtained by applying this approach to real-world projects are consistent with their externally granted certification. The results are valid for the vast majority of the modeled elements of the standard. Moreover, by drilling down into the assessment results, we are able to detect deficiencies in the certified real-world projects.