Skip to content

Fix/replace axios with fetch slack#7521

Open
SahilJat wants to merge 1 commit into
Flagsmith:mainfrom
SahilJat:fix/replace-axios-with-fetch-slack
Open

Fix/replace axios with fetch slack#7521
SahilJat wants to merge 1 commit into
Flagsmith:mainfrom
SahilJat:fix/replace-axios-with-fetch-slack

Conversation

@SahilJat
Copy link
Copy Markdown
Contributor

Thanks for submitting a PR! Please check the boxes below:

  • [ x ] I have read the Contributing Guide.
  • [ x ] I have added information to docs/ if required so people know about the feature.
  • [ x ] I have filled in the "Changes" section below.
  • [ x ] I have filled in the "How did you test this code" section below.

Changes

Closes #7431

Replace @slack/web-api with native fetch calls to eliminate transitive Axios dependency which triggered multiple critical/high CVEs.
1)Rewrote api/slack-client.js to use fetch directly instead of WebClient.chat.postMessage
2)Rewrote e2e/slack-e2e-reporter.ts to replace postMessage and files.uploadV2 with direct Slack API calls (3-step upload flow: get upload URL → upload bytes → complete upload)
3)Removed axios override from package.json overrides block

No functional behaviour changes — all Slack messaging and file upload behaviour is preserved.

How did you test this code?

1)Confirmed package.json no longer contains the axios override
2)The existing E2E pipeline will exercise slack-e2e-reporter.ts naturally on the next test run with failures
3)api/slack-client.js can be smoke tested by triggering a Slack message in a dev/staging environment with SLACK_TOKEN set

@SahilJat SahilJat requested review from a team as code owners May 15, 2026 04:34
@SahilJat SahilJat requested review from emyller and kyle-ssg and removed request for a team May 15, 2026 04:34
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 15, 2026

@SahilJat is attempting to deploy a commit to the Flagsmith Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added front-end Issue related to the React Front End Dashboard api Issue related to the REST API labels May 15, 2026
@SahilJat SahilJat force-pushed the fix/replace-axios-with-fetch-slack branch from a2b220b to 2d3a25b Compare May 15, 2026 04:41
@SahilJat
Copy link
Copy Markdown
Contributor Author

The Django migration failure (relation "app_analytics_analyticsmodel" already exists) in the Python test is a pre-existing flaky CI issue unrelated to this PR. This PR only touches api/slack-client.js, e2e/slack-e2e-reporter.ts, and package.json (frontend/Node files). No Python/Django code was modified.

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

Labels

api Issue related to the REST API front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drop slack/web-api to replace axios with fetch

1 participant