Exemple #1
0
def check_libraries_io_file(context, package, ecosystem):
    """Check the content of package metadata taken from libaries.io."""
    data = context.s3_data

    check_audit_metadata(data)
    check_release_attribute(data, ecosystem, package)
    check_status_attribute(data)
Exemple #2
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 #3
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 #4
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 #5
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 #6
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 #7
0
def check_keywords_tagging_file(context, package, ecosystem):
    """Check that the tagging metadata are correct for given package and ecosystem."""
    data = context.s3_data

    check_audit_metadata(data)
    check_release_attribute(data, ecosystem, package)
    check_status_attribute(data)

    details = get_details_node(context)
    check_attribute_presence(details, "package_name")
    check_attribute_presence(details, "repository_description")
Exemple #8
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
Exemple #9
0
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")