Exemple #1
0
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)
Exemple #2
0
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)
Exemple #3
0
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)
Exemple #4
0
def check_component_keywords_tagging_data(context, package, version,
                                          ecosystem):
    """Check the keywords tagging metadata for given component."""
    data = context.s3_data

    check_audit_metadata(data)
    check_release_attribute(data, ecosystem, package, version)
    #  no schema to check (yet?)
    #  tracked here: https://github.com/openshiftio/openshift.io/issues/1074
    check_status_attribute(data)
    check_summary_attribute(data)
Exemple #5
0
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")
Exemple #6
0
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