Class: RosettAi::Comply::Checkers::CraChecker

Inherits:
Object
  • Object
show all
Defined in:
lib/rosett_ai/comply/checkers/cra_checker.rb

Overview

CRA (Cyber Resilience Act) compliance checker.

Verifies SBOM presence, vulnerability disclosure policy, dependency license awareness, and security contact information. All checks work offline without network access.

Author:

  • hugo

  • claude

Instance Method Summary collapse

Constructor Details

#initialize(project_root:) ⇒ CraChecker

Returns a new instance of CraChecker.

Parameters:

  • project_root (Pathname)

    project root directory



19
20
21
# File 'lib/rosett_ai/comply/checkers/cra_checker.rb', line 19

def initialize(project_root:)
  @project_root = project_root
end

Instance Method Details

#checkArray<Hash>

Runs all CRA compliance checks.

Returns:

  • (Array<Hash>)

    check results with :id, :description, :status, :message, :remediation



26
27
28
29
30
31
32
33
# File 'lib/rosett_ai/comply/checkers/cra_checker.rb', line 26

def check
  [
    check_sbom_present,
    check_vulnerability_policy,
    check_dependency_licenses_known,
    check_security_contact
  ]
end