{
  "name": "download-file",
  "title": "Download a file",
  "category": "HTTP",
  "tags": [
    "curl",
    "http"
  ],
  "version": "1.0.1",
  "date": "2026-08-02",
  "notes": "Move curlimages/curl from 8.11.1 to 8.21.0. Fixable CRITICAL/HIGH drops from 26 to 1.",
  "latest": true,
  "installable": true,
  "url": "https://catalog.dagweave.com/api/v1/items/download-file/1.0.1.json",
  "templateUrl": "https://catalog.dagweave.com/api/v1/items/download-file/1.0.1/template.yaml",
  "entrypoint": "download",
  "parameters": [
    {
      "name": "url",
      "title": "URL",
      "description": "Absolute URL of the file to download. Redirects are followed.",
      "type": "string",
      "required": true,
      "example": "https://example.com/data.csv"
    },
    {
      "name": "dest-path",
      "title": "Destination path",
      "description": "Filesystem path to write the downloaded file to.",
      "type": "string",
      "required": false,
      "default": "/tmp/download"
    },
    {
      "name": "token-secret-key",
      "title": "Token secret key",
      "description": "Key within the Secret that holds the bearer token.",
      "type": "string",
      "required": false,
      "default": "token"
    },
    {
      "name": "token-secret-name",
      "title": "Token secret name",
      "description": "Name of the Kubernetes Secret holding an optional bearer token. If the Secret is absent the Authorization header is omitted.",
      "type": "string",
      "required": false,
      "default": "download-token"
    }
  ],
  "images": [
    {
      "ref": "curlimages/curl@sha256:3fb7e13e5d179a845c97d78204f3f1064d1907037f26a3ebf91710571151fd93",
      "repository": "curlimages/curl",
      "tag": "8.23.0",
      "digest": "sha256:3fb7e13e5d179a845c97d78204f3f1064d1907037f26a3ebf91710571151fd93"
    }
  ],
  "install": {
    "kubectl": "kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/download-file/1.0.1/template.yaml",
    "argo": "argo template create -n argo https://catalog.dagweave.com/api/v1/items/download-file/1.0.1/template.yaml"
  },
  "template": "apiVersion: argoproj.io/v1alpha1\nkind: WorkflowTemplate\nmetadata:\n  name: download-file\n  labels:\n    dagweave.io/catalog-item: download-file\n  annotations:\n    # The catalog semver this manifest was authored at. The dagweave app records\n    # (catalog-item-id, semver) -\u003e content-hash -\u003e base-vN when it mints the tenant\n    # cluster name via ResolveOrMint. Keep in sync with metadata.yaml `version`.\n    dagweave.io/catalog-version: \"1.0.1\"\n    dagweave.io/catalog-category: \"HTTP\"\nspec:\n  entrypoint: download\n  templates:\n    - name: download\n      inputs:\n        parameters:\n          # Absolute URL of the file to download. Redirects are followed.\n          - name: url\n          # Filesystem path to write the downloaded file to.\n          - name: dest-path\n            default: /tmp/download\n          # Name/key of a Kubernetes Secret holding an optional bearer token. If the\n          # Secret or key is absent the Authorization header is omitted.\n          - name: token-secret-name\n            default: download-token\n          - name: token-secret-key\n            default: token\n      container:\n        # Pinned by digest per the catalog convention: an image rebuild can never\n        # silently change the behaviour of an already-released item version.\n        # curlimages/curl:8.23.0\n        image: curlimages/curl@sha256:3fb7e13e5d179a845c97d78204f3f1064d1907037f26a3ebf91710571151fd93\n        command: [sh, -c]\n        # Values are passed as env vars (below), never interpolated into the shell.\n        # The optional bearer token is appended via positional params so a blank\n        # value never leaks a stray flag into the curl invocation.\n        args:\n          - |\n            set -eu\n            if [ -n \"${TOKEN:-}\" ]; then\n              set -- -H \"Authorization: Bearer ${TOKEN}\"\n            else\n              set --\n            fi\n            curl -sSfL \"$@\" -o \"${DEST_PATH}\" \"${URL}\"\n            echo \"downloaded ${URL} -\u003e ${DEST_PATH}\"\n        env:\n          - name: URL\n            value: \"{{inputs.parameters.url}}\"\n          - name: DEST_PATH\n            value: \"{{inputs.parameters.dest-path}}\"\n          - name: TOKEN\n            valueFrom:\n              secretKeyRef:\n                name: \"{{inputs.parameters.token-secret-name}}\"\n                key: \"{{inputs.parameters.token-secret-key}}\"\n                optional: true\n",
  "templateSha256": "0158f3a64924a0751e3041c249b0a069b5651ccbd8d2b7c6346152b9f27847c4",
  "source": "https://github.com/dagweave/catalog/tree/67458f74dbbf913b03177f3cefc69424be85eb1d/catalog/download-file",
  "catalogSha": "67458f74dbbf913b03177f3cefc69424be85eb1d"
}
