Skip to content

PRP: Add Argo CD and Argo Workflows container image extractors#1992

Open
Amsamms wants to merge 2 commits intogoogle:mainfrom
Amsamms:fix/issue-1298-argo-cd-extractors
Open

PRP: Add Argo CD and Argo Workflows container image extractors#1992
Amsamms wants to merge 2 commits intogoogle:mainfrom
Amsamms:fix/issue-1298-argo-cd-extractors

Conversation

@Amsamms
Copy link
Copy Markdown

@Amsamms Amsamms commented Apr 20, 2026

Closes #1298.

This PR adds two filesystem extractors for container images defined in Argo CD and Argo Workflows manifests:

argocdimage extractor

  • Extracts container images from Argo CD Application and ApplicationSet resources
  • Parses spec.source.kustomize.images, spec.source.helm.valuesObject, and init/sidecar containers
  • Supports multi-source applications (spec.sources)

argoworkflowimage extractor

  • Extracts container images from Argo Workflows Workflow and CronWorkflow resources
  • Parses template containers, init containers, sidecar containers, and script templates
  • Correctly handles CronWorkflow nested structure (spec.workflowSpec.templates vs spec.templates)

Key design decisions

  • Both extractors operate on .yaml and .yml files, using apiVersion/kind detection to identify relevant manifests
  • Container images are returned as container PURL type packages
  • Proto config messages added at field numbers 76 and 77 (next available in the oneof config block)
  • Follows existing extractor patterns (e.g., containerdcontainerimage, dockercontainerimage)
  • All regexps pre-compiled in New() constructors per project conventions

Testing

  • 7 test cases for argocdimage (basic, comprehensive, not-argo, YAML error)
  • 8 test cases for argoworkflowimage (basic, comprehensive, CronWorkflow, not-argo, YAML error)
  • All tests pass locally

Amsamms added 2 commits April 18, 2026 00:16
Implements two new filesystem extractors for issue google#1298:

- argocdimage: Extracts OCI image references from Argo CD Application
  and ApplicationSet YAML files, including source-level references
  (Helm charts, Git paths) and kustomize image overrides.

- argoworkflowimage: Extracts container image references from Argo
  Workflow, WorkflowTemplate, CronWorkflow, and ClusterWorkflowTemplate
  YAML files. Handles container, script, initContainer, and sidecar
  image fields. Correctly handles CronWorkflow's nested
  spec.workflowSpec.templates structure.
@Amsamms
Copy link
Copy Markdown
Author

Amsamms commented Apr 27, 2026

Hi @erikvarga @another-rex — gentle ping. This PR has been open for 7 days with all 13 CI checks green and no review yet.

Linked PRP:Accepted issue: #1298 (Argo CD + Argo Workflows extractors). Happy to address any feedback, split, or rebase as needed. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PRP: Extractor for argo-cd and argo workflows

1 participant