{
  "name": "slack-approval",
  "title": "Request approval in Slack",
  "category": "Approval",
  "tags": [
    "approval",
    "curl"
  ],
  "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/slack-approval/1.0.1.json",
  "templateUrl": "https://catalog.dagweave.com/api/v1/items/slack-approval/1.0.1/template.yaml",
  "entrypoint": "approval",
  "parameters": [
    {
      "name": "channel",
      "title": "Channel",
      "description": "Slack channel ID or name to post the approval request to.",
      "type": "string",
      "required": true,
      "example": "C0123456789"
    },
    {
      "name": "message",
      "title": "Message",
      "description": "The approval-request message to post.",
      "type": "string",
      "required": true
    },
    {
      "name": "token-secret-key",
      "title": "Token secret key",
      "description": "Key within the Secret that holds the bot token.",
      "type": "string",
      "required": false,
      "default": "token"
    },
    {
      "name": "token-secret-name",
      "title": "Token secret name",
      "description": "Name of the Kubernetes Secret in the run namespace holding the Slack bot token.",
      "type": "string",
      "required": false,
      "default": "slack-bot-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/slack-approval/1.0.1/template.yaml",
    "argo": "argo template create -n argo https://catalog.dagweave.com/api/v1/items/slack-approval/1.0.1/template.yaml"
  },
  "template": "apiVersion: argoproj.io/v1alpha1\nkind: WorkflowTemplate\nmetadata:\n  name: slack-approval\n  labels:\n    dagweave.io/catalog-item: slack-approval\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: \"Approval\"\nspec:\n  entrypoint: approval\n  templates:\n    # Entrypoint: post a Slack message asking for approval, then suspend until a human\n    # resumes the node. A single reusable template composed of two internal steps.\n    - name: approval\n      inputs:\n        parameters:\n          # Slack channel ID or name (e.g. \"C0123456789\" or \"#approvals\").\n          - name: channel\n          # The approval-request message to post.\n          - name: message\n          # Name/key of the Kubernetes Secret in the run namespace holding the Slack\n          # bot token. Defaults let a user leave them blank in the Inspector.\n          - name: token-secret-name\n            default: slack-bot-token\n          - name: token-secret-key\n            default: token\n      steps:\n        - - name: notify\n            template: notify\n            arguments:\n              parameters:\n                - name: channel\n                  value: \"{{inputs.parameters.channel}}\"\n                - name: message\n                  value: \"{{inputs.parameters.message}}\"\n                - name: token-secret-name\n                  value: \"{{inputs.parameters.token-secret-name}}\"\n                - name: token-secret-key\n                  value: \"{{inputs.parameters.token-secret-key}}\"\n        - - name: await\n            template: await\n\n    # Post the approval-request message to Slack (same safe curl pattern as the\n    # slack-post-message item).\n    - name: notify\n      inputs:\n        parameters:\n          - name: channel\n          - name: message\n          - name: token-secret-name\n          - name: token-secret-key\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        # so a message containing quotes or shell metacharacters is safe.\n        args:\n          - |\n            set -eu\n            curl -sSf -X POST https://slack.com/api/chat.postMessage \\\n              -H \"Authorization: Bearer ${SLACK_TOKEN}\" \\\n              --data-urlencode \"channel=${SLACK_CHANNEL}\" \\\n              --data-urlencode \"text=${SLACK_MESSAGE}\"\n        env:\n          - name: SLACK_CHANNEL\n            value: \"{{inputs.parameters.channel}}\"\n          - name: SLACK_MESSAGE\n            value: \"{{inputs.parameters.message}}\"\n          - name: SLACK_TOKEN\n            valueFrom:\n              secretKeyRef:\n                name: \"{{inputs.parameters.token-secret-name}}\"\n                key: \"{{inputs.parameters.token-secret-key}}\"\n\n    # Suspend until a human resumes the node (Argo UI \"Resume\", `argo resume`, or the\n    # resume API). No image or container runs.\n    - name: await\n      suspend: {}\n",
  "templateSha256": "9b68e11f0f287a7ed1ec740998a9977fdba7a225a3afa6244b93695f2b7c37ff",
  "source": "https://github.com/dagweave/catalog/tree/67458f74dbbf913b03177f3cefc69424be85eb1d/catalog/slack-approval",
  "catalogSha": "67458f74dbbf913b03177f3cefc69424be85eb1d"
}
