diff --git a/queries/all_github_container_package.yaml b/queries/all_github_container_package.yaml new file mode 100644 index 000000000..5e24cb9f9 --- /dev/null +++ b/queries/all_github_container_package.yaml @@ -0,0 +1,30 @@ +ID: all_github_container_package +Title: Find all Container Packages to be utilized in tasks +Description: Find all Container Packages in GitHub for tasks +IntegrationType: + - github_organization +Query: + Engine: CloudQL-v0.0.1 + KeyTablesAndColumns: [ github_container_package: name ] + Parameters: + - Key: github_package + Required: true + DefaultValue: "*" + - Key: limit_of_packages + Required: true + DefaultValue: "50" + QueryToExecute: | + SELECT + id, + name, + digest, + platform_integration_id + FROM + github_container_package + WHERE + ( + COALESCE('{{.github_package}}', '*') = '*' + OR name = ANY(STRING_TO_ARRAY('{{.github_package}}', ',')) + ) + LIMIT {{.limit_of_packages}}; +Tags: []