fleet/tools/fleet-slackbot
dependabot[bot] 1c9ba1a514
Bump path-to-regexp from 8.3.0 to 8.4.0 in /tools/fleet-slackbot (#42623)
Bumps [path-to-regexp](https://github.com/pillarjs/path-to-regexp) from
8.3.0 to 8.4.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pillarjs/path-to-regexp/releases">path-to-regexp's
releases</a>.</em></p>
<blockquote>
<h2>8.4.0</h2>
<p><strong>Important</strong></p>
<ul>
<li>Fix <a
href="https://www.cve.org/CVERecord?id=CVE-2026-4926">CVE-2026-4926</a>
(<a
href="https://github.com/pillarjs/path-to-regexp/security/advisories/GHSA-j3q9-mxjg-w52f">GHSA-j3q9-mxjg-w52f</a>)</li>
<li>Fix <a
href="https://www.cve.org/CVERecord?id=CVE-2026-4923">CVE-2026-4923</a>
(<a
href="https://github.com/pillarjs/path-to-regexp/security/advisories/GHSA-27v5-c462-wpq7">GHSA-27v5-c462-wpq7</a>)</li>
</ul>
<p><strong>Fixed</strong></p>
<ul>
<li>Restricts wildcard backtracking when using more than 1 in a path (<a
href="https://redirect.github.com/pillarjs/path-to-regexp/pull/421">pillarjs/path-to-regexp#421</a>)</li>
</ul>
<p><strong>Changed</strong></p>
<ul>
<li>Dedupes regex prefixes (<a
href="https://redirect.github.com/pillarjs/path-to-regexp/pull/422">pillarjs/path-to-regexp#422</a>)
<ul>
<li>This will result in shorter regular expressions for some cases using
optional groups</li>
</ul>
</li>
<li>Rejects large optional route combinations (<a
href="https://redirect.github.com/pillarjs/path-to-regexp/pull/424">pillarjs/path-to-regexp#424</a>)
<ul>
<li>When using groups such as <code>/users{/delete}</code> it will
restrict the number of generated combinations to &lt; 256, equivalent to
8 top-level optional groups and unlikely to occur in a real world
application, but avoids exploding the regex size for applications that
accept user created routes</li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="34cb451dda"><code>34cb451</code></a>
8.4.0</li>
<li><a
href="22a967901a"><code>22a9679</code></a>
Reject large optional route combinations (<a
href="https://redirect.github.com/pillarjs/path-to-regexp/issues/424">#424</a>)</li>
<li><a
href="8881a88930"><code>8881a88</code></a>
Byte optimization (<a
href="https://redirect.github.com/pillarjs/path-to-regexp/issues/423">#423</a>)</li>
<li><a
href="43669ac637"><code>43669ac</code></a>
Dedupe regex prefixes (<a
href="https://redirect.github.com/pillarjs/path-to-regexp/issues/422">#422</a>)</li>
<li><a
href="48646547da"><code>4864654</code></a>
Restrict repeated wildcard backtracking (<a
href="https://redirect.github.com/pillarjs/path-to-regexp/issues/421">#421</a>)</li>
<li><a
href="05a5a97370"><code>05a5a97</code></a>
Remove dependabot config (<a
href="https://redirect.github.com/pillarjs/path-to-regexp/issues/404">#404</a>)</li>
<li><a
href="5b635cd1bd"><code>5b635cd</code></a>
Remove <code>package-lock.json</code> (<a
href="https://redirect.github.com/pillarjs/path-to-regexp/issues/407">#407</a>)</li>
<li>See full diff in <a
href="https://github.com/pillarjs/path-to-regexp/compare/v8.3.0...v8.4.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=path-to-regexp&package-manager=npm_and_yarn&previous-version=8.3.0&new-version=8.4.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts page](https://github.com/fleetdm/fleet/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-28 14:39:30 -05:00
..
.env.example Add Fleet slackbot to tools directory (#42163) 2026-03-27 12:07:27 -05:00
.gitignore Add Fleet slackbot to tools directory (#42163) 2026-03-27 12:07:27 -05:00
app.js Add Fleet slackbot to tools directory (#42163) 2026-03-27 12:07:27 -05:00
claude-client.js Add Fleet slackbot to tools directory (#42163) 2026-03-27 12:07:27 -05:00
config.js Add Fleet slackbot to tools directory (#42163) 2026-03-27 12:07:27 -05:00
github-client.js Add Fleet slackbot to tools directory (#42163) 2026-03-27 12:07:27 -05:00
mcp-client.js Add Fleet slackbot to tools directory (#42163) 2026-03-27 12:07:27 -05:00
package.json Add Fleet slackbot to tools directory (#42163) 2026-03-27 12:07:27 -05:00
README.md Add Fleet slackbot to tools directory (#42163) 2026-03-27 12:07:27 -05:00
render.yaml Add Fleet slackbot to tools directory (#42163) 2026-03-27 12:07:27 -05:00
slack-handlers.js Add Fleet slackbot to tools directory (#42163) 2026-03-27 12:07:27 -05:00
slack-manifest.json Add Fleet slackbot to tools directory (#42163) 2026-03-27 12:07:27 -05:00
system-prompt.js Add Fleet slackbot to tools directory (#42163) 2026-03-27 12:07:27 -05:00
webhook-handler.js Add Fleet slackbot to tools directory (#42163) 2026-03-27 12:07:27 -05:00
yaml-handler.js Add Fleet slackbot to tools directory (#42163) 2026-03-27 12:07:27 -05:00
yarn.lock Bump path-to-regexp from 8.3.0 to 8.4.0 in /tools/fleet-slackbot (#42623) 2026-03-28 14:39:30 -05:00

Fleet Slackbot

A Slack bot that lets IT and security teams manage their Fleet deployment using plain English. Ask it questions about your fleet, or request configuration changes — it'll query live Fleet data and open a GitHub pull request with the necessary GitOps YAML changes.

What it does

Answer questions about your fleet

"How many macOS endpoints do we have?" "Which hosts are failing the disk encryption policy?" "Are any of my hosts exposed to CVE-2025-12345?"

The bot queries the live Fleet environment via the Fleet MCP server and responds directly in Slack.

Propose configuration changes

"Add a policy to check that Firefox is installed on all workstations." "Set the minimum macOS version to 15.4 with a deadline of June 1." "Install 1Password on the servers team."

The bot generates the required GitOps YAML and opens a draft GitHub pull request for review.

Auto-fix CI failures When a GitOps CI check fails on one of its PRs, the bot automatically reads the error, proposes a fix, and pushes a corrected commit.

Architecture

graph TD
    Slack["Slack (Socket Mode)"]
    Bolt["Slack Bolt app"]
    SlackH["slack-handlers.js\n@mentions, DMs, threads"]
    WebhookH["webhook-handler.js\nCI auto-fix, PR comments"]
    Claude["ClaudeClient\nAnthropic API · agentic loop"]
    MCP["McpClient\nFleet MCP server"]
    GitOpsRead["read_gitops_file\nGitHub API"]
    WebSearch["web_search\nAnthropic built-in"]
    GitHub["GitHubClient\nbranch → commit → draft PR"]

    Slack --> Bolt
    Bolt --> SlackH
    Bolt --> WebhookH
    SlackH --> Claude
    WebhookH --> Claude
    Claude --> MCP
    Claude --> GitOpsRead
    Claude --> WebSearch
    Claude --> GitHub

Setup

1. Slack app

Create a Slack app at api.slack.com/apps with:

  • Socket Mode enabled (generates the App-Level Token)
  • Bot Token Scopes: chat:write, app_mentions:read, channels:history, groups:history, im:history, reactions:write, reactions:read, files:write
  • Event Subscriptions: app_mention, message.im

2. GitHub

  • Create a fine-grained personal access token with read/write access to contents and pull requests on your GitOps repo.
  • Add a webhook on the repo pointing to http://your-host:3000/github/webhook, sending Check runs and Pull request review comments events. Note the secret you choose.

3. Fleet MCP server

Run the Fleet MCP server and note its URL (default: http://localhost:8181/sse).

4. Environment variables

Copy .env.example to .env and fill in the values:

SLACK_BOT_TOKEN=xoxb-...
SLACK_APP_TOKEN=xapp-...

GITHUB_TOKEN=github_pat_...
GITHUB_REPO=your-org/your-repo
GITHUB_BASE_BRANCH=main
GITHUB_WEBHOOK_SECRET=your-webhook-secret
GITHUB_BOT_USERNAME=your-bot-github-username   # used to ignore the bot's own PR comments
GITOPS_BASE_PATH=it-and-security                # path within the repo to the GitOps config

ANTHROPIC_API_KEY=sk-ant-...
ANTHROPIC_MODEL=claude-opus-4-6                  # optional, this is the default

FLEET_MCP_URL=http://localhost:8181/sse
PORT=3000                                        # port for the GitHub webhook listener

GITOPS_CI_CHECK_NAME=fleet-gitops               # name of the CI check to watch for auto-fix
CI_AUTO_FIX=true                                # set to false to disable CI auto-fix

5. Run

npm install
npm start

Usage

In any channel: @Fleet how many Windows hosts do we have?

In a DM: Just message the bot directly — no @mention needed.