Skip to content

Feature: Slack Notification Provider#834

Merged
Wikid82 merged 62 commits intodevelopmentfrom
feature/beta-release
Mar 16, 2026
Merged

Feature: Slack Notification Provider#834
Wikid82 merged 62 commits intodevelopmentfrom
feature/beta-release

Conversation

@Wikid82
Copy link
Copy Markdown
Owner

@Wikid82 Wikid82 commented Mar 12, 2026

No description provided.

actions-user and others added 12 commits March 11, 2026 22:19
- Removed duplicate @typescript-eslint/utils dependency in frontend/package.json
- Updated TypeScript version from 5.9.3 to 6.0.1-rc in frontend/package.json and package.json
- Adjusted ResizeObserver mock to use globalThis in tests
- Modified tsconfig.json and tsconfig.node.json to include empty types array
- Cleaned up package-lock.json to reflect TypeScript version change and updated dev dependencies
- Updated @eslint/js and eslint to version 10.0.0 in package.json.
- Adjusted overrides for eslint-plugin-react-hooks, eslint-plugin-jsx-a11y, and eslint-plugin-promise to ensure compatibility with ESLint v10.
- Modified lefthook.yml to reflect the upgrade and noted the need for plugin support for ESLint v10.
- Bump versions of @vitejs/plugin-react, @vitest/coverage-istanbul, @vitest/coverage-v8, and @vitest/ui to their beta releases.
- Upgrade Vite and Vitest to their respective beta versions.
- Adjust Vite configuration to disable code splitting for improved React initialization stability.
…n-major-updates

fix(deps): update non-major-updates (feature/beta-release)
…n-major-updates

chore(deps): update non-major-updates (feature/beta-release)
@Wikid82 Wikid82 self-assigned this Mar 12, 2026
@Wikid82 Wikid82 added the enhancement New feature or request label Mar 12, 2026
@Wikid82 Wikid82 added this to Charon Mar 12, 2026
@Wikid82 Wikid82 added the feature New functionality label Mar 12, 2026
@github-project-automation github-project-automation bot moved this to Backlog in Charon Mar 12, 2026
@Wikid82 Wikid82 changed the base branch from main to development March 12, 2026 17:52
@github-advanced-security
Copy link
Copy Markdown
Contributor

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 12, 2026

✅ Supply Chain Verification Results

PASSED

📦 SBOM Summary

  • Components: 1483

🔍 Vulnerability Scan

Severity Count
🔴 Critical 0
🟠 High 0
🟡 Medium 4
🟢 Low 2
Total 6

📎 Artifacts

  • SBOM (CycloneDX JSON) and Grype results available in workflow artifacts

Generated by Supply Chain Verification workflow • View Details

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 12, 2026

Codecov Report

❌ Patch coverage is 91.25000% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
backend/internal/services/notification_service.go 91.11% 2 Missing and 2 partials ⚠️
frontend/src/pages/Notifications.tsx 82.35% 2 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

- Updated the notification provider types to include 'slack'.
- Modified API tests to handle 'slack' as a valid provider type.
- Enhanced frontend forms to display Slack-specific fields (webhook URL and channel name).
- Implemented CRUD operations for Slack providers, ensuring proper payload structure.
- Added E2E tests for Slack notification provider, covering form rendering, validation, and security checks.
- Updated translations to include Slack-related text.
- Ensured that sensitive information (like tokens) is not exposed in API responses.
@Wikid82 Wikid82 moved this from Backlog to In Progress in Charon Mar 13, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a Slack notification provider (Incoming Webhooks) across backend + frontend, along with substantial supporting updates to tests, documentation, CI security workflows, and container/runtime tooling to support the new behavior and ongoing security posture.

Changes:

  • Add Slack as a supported notification provider type (UI form fields, payload normalization, backend dispatch gating via feature flag, and handler validations).
  • Expand test coverage (Playwright + frontend unit tests + Go handler/service tests) and update docs/CHANGELOG for Slack setup and security expectations.
  • Update build/ops tooling (TypeScript/Vite upgrades, Semgrep hook behavior, Dockerfile and integration scripts moving curl→wget, CI workflow tweaks, dependency bumps, and Grype suppression maintenance).

Reviewed changes

Copilot reviewed 64 out of 67 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/settings/telegram-notification-provider.spec.ts Adjust GET interception to avoid response race in token-exposure test.
tests/settings/notifications.spec.ts Update provider fixtures and ensure Slack appears in provider type select.
tests/settings/notifications-payload.spec.ts Add Slack payload scenario + tighten preview/test request payload captures.
scripts/waf_integration.sh Switch httpbin image and curl→wget readiness checks; increase wait loop.
scripts/rate_limit_integration.sh Switch httpbin image and curl→wget readiness checks; increase wait loop.
scripts/pre-commit-hooks/semgrep-scan.sh Expand Semgrep configs to cover multiple languages and Docker/Bash.
scripts/diagnose-test-env.sh Replace curl-based health probe with wget.
scripts/crowdsec_startup_test.sh Replace curl-based health probe with wget.
scripts/coraza_integration.sh Switch httpbin image and curl→wget readiness checks.
scripts/cerberus_integration.sh Switch httpbin image and curl→wget readiness checks; increase wait loop.
package.json Move TS/Vite into dev deps and bump tooling versions.
lefthook.yml Update hook behavior (notably Semgrep now in pre-commit).
go.work.sum Refresh Go workspace sums (x/term).
frontend/vite.config.ts Switch build config to Rolldown-specific options and disable code splitting.
frontend/tsconfig.node.json Adjust TS config (explicit types: []).
frontend/tsconfig.json Adjust TS libs/types configuration.
frontend/src/test/setup.ts Use globalThis.ResizeObserver for test environment compatibility.
frontend/src/pages/tests/Notifications.test.tsx Add Slack UI behavior tests and update supported types assertions.
frontend/src/pages/Notifications.tsx Add Slack provider UI fields + payload normalization + template support inclusion.
frontend/src/locales/en/translation.json Add Slack-specific i18n strings for labels/placeholders/help text.
frontend/src/components/tests/SecurityNotificationSettingsModal.test.tsx Update supported provider type list assertions to include Slack.
frontend/src/components/tests/AccessListForm.test.tsx Use globalThis.ResizeObserver in tests.
frontend/src/api/notifications.ts Add Slack to supported provider types and token sanitization rules.
frontend/src/api/notifications.test.ts Update unsupported provider type test cases (pushover).
frontend/src/api/tests/notifications.test.ts Update unsupported provider type test cases (pushover).
frontend/package.json Upgrade ESLint/Vite/TS/Vitest toolchain and add overrides for peer deps.
docs/reports/qa_report_ts6_upgrade_2026-03-11.md Add QA report documenting TS6 upgrade verification steps/results.
docs/reports/qa_report.md Replace prior report content with script-focused QA report for curl→wget changes.
docs/plans/archive/cve_remediation_spec.md Add archived plan for CVE remediation via curl/binutils removal.
docs/issues/vite-8-beta-manual-testing.md Add manual test plan for Vite 8 beta upgrade risks.
docs/issues/slack-manual-testing.md Add manual test plan specifically for Slack provider behavior/security.
docs/getting-started.md Document required secrets for stable sessions and encryption at rest.
docs/features/notifications.md Document Slack provider setup, templates, and rate limits.
backend/internal/services/notification_service_json_test.go Update Slack JSON dispatch test to use token as webhook URL.
backend/internal/services/notification_service_discord_only_test.go Update discord-only constraints now that Slack is supported.
backend/internal/services/notification_service.go Add Slack support (feature flag, dispatch, payload normalization, URL validator hook).
backend/internal/notifications/feature_flags.go Add Slack feature flag key constant.
backend/internal/api/handlers/notification_provider_handler.go Allow Slack create/update and add Slack-specific test error classification.
backend/internal/api/handlers/notification_provider_discord_only_test.go Update expectations to allow Slack provider creation.
backend/internal/api/handlers/notification_provider_blocker3_test.go Update expectations to allow Slack provider creation.
backend/internal/api/handlers/notification_coverage_test.go Add coverage tests for Slack error classification + token rejection on test request.
backend/go.mod Bump golang.org/x deps and goccy/go-json.
backend/go.sum Sync sums for updated dependencies.
Dockerfile Remove curl/binutils, use wget for GeoIP download/healthcheck, bump Caddy security plugin, improve CI build arg handling.
CHANGELOG.md Add Slack notification provider entry and related details.
ARCHITECTURE.md Update documented toolchain versions (TS/Vite/Vitest) and config filename.
.grype.yaml Remove resolved zlib suppression and extend nebula suppression expiry.
.github/workflows/waf-integration.yml Pass CI build arg through to Docker build.
.github/workflows/supply-chain-pr.yml Make PR commenting resilient to permission errors; avoid failing job.
.github/workflows/security-pr.yml Bump pinned action SHAs.
.github/workflows/rate-limit-integration.yml Pass CI build arg through to Docker build.
.github/workflows/crowdsec-integration.yml Pass CI build arg through to Docker build.
.github/workflows/cerberus-integration.yml Pass CI build arg through to Docker build.
.github/workflows/auto-versioning.yml Bump pinned action SHA.
.github/workflows/auto-changelog.yml Bump release-drafter action SHA (major version).
.docker/docker-entrypoint.sh Replace curl readiness probe with wget.
.docker/compose/docker-compose.yml Replace curl healthcheck with wget.
.docker/compose/docker-compose.playwright-local.yml Replace curl healthcheck with wget.
.docker/compose/docker-compose.playwright-ci.yml Replace curl healthcheck with wget.
.docker/compose/docker-compose.local.yml Replace curl healthcheck with wget.

You can also share your feedback on Copilot code review. Take the survey.

The slack sub-tests in TestDiscordOnly_CreateRejectsNonDiscord and
TestBlocker3_CreateProviderRejectsNonDiscordWithSecurityEvents were
omitting the required token field from their request payloads.
CreateProvider enforces that Slack providers must have a non-empty
token (the webhook URL) at creation time. Without it the service
returns "slack webhook URL is required", which the handler does not
classify as a 400 validation error, so it falls through to 500.

Add a token field to each test struct, populate it for the slack
case with a valid-format Slack webhook URL, and use
WithSlackURLValidator to bypass the real format check in unit tests —
matching the pattern used in all existing service-level Slack tests.
@Wikid82 Wikid82 requested a review from Copilot March 15, 2026 21:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@Wikid82 Wikid82 requested a review from Copilot March 16, 2026 11:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 64 out of 67 changed files in this pull request and generated 2 comments.


You can also share your feedback on Copilot code review. Take the survey.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 70 out of 73 changed files in this pull request and generated 2 comments.


You can also share your feedback on Copilot code review. Take the survey.

@Wikid82 Wikid82 merged commit 816c059 into development Mar 16, 2026
45 of 46 checks passed
@github-project-automation github-project-automation bot moved this from In Review to Done in Charon Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request feature New functionality

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants