Skip to content

Add input validation to simple metadata api #1140

Closed
@lukpueh

Description

@lukpueh

Coordinate with validation guidelines #1130

Description of issue or feature request:
Some suggestions:

  • Avoid schema, see Revise schema and formats facility secure-systems-lab/securesystemslib#183 (just don't use it)
  • Make use of type hints for simple type validation
  • Perform additional non-metadata parameter validation at user boundary
  • Provide methods to validate JSON representation at user boundary, i.e. fail on bad json metadata in from_json_file/to_json_file method, but with option to
    disable check as there might be a justified reason to read or write WIP
    metadata to json.
  • Be lenient on bad/invalid metadata objects in memory, they might be
    work in progress. E.g. it might be convenient to create empty metadata
    and assign attributes later on.
  • Consider using in-toto style ValidationMixin (see the mixin and it's usage for details).

Current behavior:
No input validation

Expected behavior:
Add input validation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions