falcoctl icon indicating copy to clipboard operation
falcoctl copied to clipboard

Parse requirements and dependencies from rulesfile when in tar.gz format

Open alacuku opened this issue 4 months ago • 4 comments

What would you like to be added:

PR #467 introduces a new feature that automatically parses requirements and dependencies from a rulesfiles when pushing to a registry. Example of requirements and dependecies in the config layer:

❯ falcoctl artifact config k8saudit-rules | jq
{
  "name": "k8saudit-rules",
  "version": "0.7.0",
  "dependencies": [
    {
      "name": "json",
      "version": "0.7.0"
    },
    {
      "name": "k8saudit",
      "version": "0.7.0",
      "alternatives": [
        {
          "name": "k8saudit-eks",
          "version": "0.4.0"
        }
      ]
    }
  ],
  "requirements": [
    {
      "name": "engine_version_semver",
      "version": "0.15.0"
    }
  ]
}

The next step is to extend the feature to support rulesfiles when provided in tar.gz format. If the rulesfile is compressed we uncompress it in a temporary directory, parse the file, and then remove the temporary files.

Why is this needed: #441

alacuku avatar Apr 03 '24 07:04 alacuku