Skip to content

[Validation] Add validation for screenshot 'size' #1015

@andrewkroh

Description

@andrewkroh

The size field for screenshots in package manifests is often incorrect. This field is a string representation of the image dimensions (e.g., "1200x900"), but it frequently does not match the actual width and height of the image file.

I don't actually know if anything consumes the size so I'm not sure of the impact of incorrect values.

Statistics

Here is a breakdown of the current state of the data across existing packages in elastic/integrations@1ddb689.

Package-level screenshots:

  • Out of 842 screenshots reviewed, 697 (82.8%) have an incorrect size value.
  • Only 144 (17.1%) have a correct size value.

Policy template-level screenshots:

  • Out of 81 screenshots reviewed, 56 (69.1%) have an incorrect size value.
  • Only 25 (30.9%) have a correct size value.

Validation

The package specification should include a validation rule that ensures the size field in the manifest (widthxheight) matches the actual dimensions of the corresponding screenshot file.

This will prevent new packages or updates from introducing incorrect data and will encourage developers to fix existing issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for Enhancement.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions