Skip to content

Input and integration packages allow any file at the root of the package #993

@mrodm

Description

@mrodm

Currently, input and integration packages allow to define any file or folder at the root of the working copy.

Content packages are the only ones that disallow that.

Testing to disallow those extra files cause that current packages fail the validation with files or folders not allowed. Some examples found (not a full list):

1. item [img] is not allowed in folder [/home/user/Coding/work/integrations/packages/zscaler_zpa]
1. item [img] is not allowed in folder [/home/user/Coding/work/integrations/packages/ded]
1. item [img] is not allowed in folder [/home/user/Coding/work/integrations/packages/modsecurity]
2. item [kibana] is not allowed in folder [/home/user/Coding/work/integrations/packages/http_endpoint]
1. item [lifecycle.yml] is not allowed in folder [/home/user/Coding/work/integrations/packages/extrahop]
1. item [fields] is not allowed in folder [/home/user/Coding/work/integrations/packages/dga]
2. item [img] is not allowed in folder [/home/user/Coding/work/integrations/packages/dga]
1. item [kibana] is not allowed in folder [/home/user/Coding/work/integrations/packages/tcp]
2. item [system-test-note.md] is not allowed in folder [/home/user/Coding/work/integrations/packages/redisenterprise]
1. item [DEVELOPMENT.md] is not allowed in folder [/home/user/Coding/work/integrations/packages/tychon]
1. item [fields] is not allowed in folder [/home/user/Coding/work/integrations/packages/problemchild]
2. item [system-test-note.md] is not allowed in folder [/home/user/Coding/work/integrations/packages/iis]
...

A summary of the errors found:

  • img folder defined in integration packages using spec version lower than 3.2.2
  • kibana folder defined in input packages
    • input packages should not contain any kibana folder
    • how does Fleet behave if this folder is defined?
  • fields folder defined in integration packages.
    • in integration packages, fields should be under data stream folders.
  • extra markdown files: DEVELOPMENT.md, system-test-note-md
    • should they be under docs/? should they be allowed ?
  • extra yaml files: lifecycle.yml
    • maybe just a leftover from some PR ?

Tested via #992
Packages from integrations repository tested in elastic/integrations#15500 (more than 250 packages failing in this test).

One option is to apply this change starting at a specific spec version.
In any case, it is needed to assess how to proceed with all these packages with extra files or folders if this change is applied.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Team:EcosystemLabel for the Packages Ecosystem team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions