def check_component_source_licenses_data(context, package, version, ecosystem): """Check that the component has assigned correct source licenses metadata.""" data = context.s3_data check_audit_metadata(data) check_release_attribute(data, ecosystem, package, version) check_schema_attribute(data, "source_licenses", "3-0-0") check_status_attribute(data) check_summary_attribute(data)
def check_component_metadata_data(context, package, version, ecosystem): """Check the basic component metadata in the AWS S3 database.""" data = context.s3_data check_audit_metadata(data) check_release_attribute(data, ecosystem, package, version) check_schema_attribute(data, "metadata", "3-2-0") check_status_attribute(data) check_summary_attribute(data)
def check_component_dependency_snapshot_data(context, package, version, ecosystem): """Check the dependency snapshot metadata for the given component.""" data = context.s3_data check_audit_metadata(data) check_release_attribute(data, ecosystem, package, version) check_schema_attribute(data, "dependency_snapshot", "1-0-0") check_status_attribute(data) check_summary_attribute(data)
def check_component_digest_data(context, package, version, ecosystem): """Check the digest data for the given package, version, and ecosystem.""" data = context.s3_data check_audit_metadata(data) check_release_attribute(data, ecosystem, package, version) check_schema_attribute(data, "digests", "1-0-0") check_status_attribute(data) check_summary_attribute(data) check_attribute_presence(data, "details")
def check_component_security_issues_data(context, package, version, ecosystem): """Check the security issues metadata fro given component.""" data = context.s3_data check_audit_metadata(data) check_release_attribute(data, ecosystem, package, version) check_schema_attribute(data, "security_issues", "3-0-1") check_status_attribute(data) check_summary_attribute(data) details = check_and_get_attribute(data, "details") assert type(details) is list
def check_github_details_file(context, package, ecosystem): """Check all relevant attributes stored in the JSON with GitHub details.""" data = context.s3_data check_audit_metadata(data) check_release_attribute(data, ecosystem, package) check_status_attribute(data) check_attribute_presence(data, "summary") check_attribute_presence(data, "details") check_schema_attribute(data, "github_details", "2-0-1")