Skip to content

Commit edc4598

Browse files
authored
Merge branch 'main' into ale-make-ts-public
2 parents 6ddc8d3 + e513558 commit edc4598

5 files changed

Lines changed: 98 additions & 11 deletions

File tree

.github/SECURITY.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Security Policy
2+
3+
Slack takes the security of its software and services seriously, including all open-source repositories managed through the [slackapi](https://github.com/slackapi) GitHub organization.
4+
5+
## Reporting a Vulnerability
6+
7+
**Do NOT report security vulnerabilities through public GitHub issues, pull requests, or discussions.**
8+
9+
If you believe you have found a security vulnerability in `slack_sdk`, please report it through the Slack bug bounty program on HackerOne:
10+
11+
**<https://hackerone.com/slack>**
12+
13+
Even if `slack_sdk` is not explicitly listed as an in-scope asset on the HackerOne program page, reports for vulnerabilities in this package should still be submitted there. The Slack security team triages reports for all `slackapi` open-source repositories through this program.
14+
15+
If HackerOne is inaccessible, you may alternatively report the issue to [security@salesforce.com](mailto:security@salesforce.com).
16+
17+
Please do not discuss potential vulnerabilities in public without first coordinating with the security team.
18+
19+
## What to Include
20+
21+
To help us triage and respond quickly, please include:
22+
23+
- Type of vulnerability (e.g., signature bypass, token leakage, denial of service)
24+
- Affected version(s) of `slack_sdk`
25+
- Step-by-step reproduction instructions
26+
- Proof-of-concept code or payloads, if available
27+
- Impact assessment: what an attacker could achieve
28+
- Any specific configuration required to trigger the vulnerability
29+
- Affected source file paths, if known
30+
31+
## Threat Model
32+
33+
The Python Slack SDK is a collection of client libraries for interacting with Slack's APIs. It provides utilities for request signature verification, OAuth token management and storage, and real-time WebSocket communication via Socket Mode. The security boundary covers the safe handling of credentials, the integrity of cryptographic verification, and the confidentiality of data in transit and at rest.
34+
35+
### In Scope
36+
37+
The following are considered SDK vulnerabilities:
38+
39+
- Bypass of request signature verification (HMAC-SHA256 validation in `slack_sdk.signature`)
40+
- Token or credential leakage through logs, error messages, HTTP headers, or unintended network requests
41+
- OAuth state parameter validation bypass or CSRF vulnerabilities in the authorization flow (`slack_sdk.oauth`)
42+
- Cross-tenant token exposure or installation data leakage in built-in installation stores
43+
- Token storage vulnerabilities in any built-in installation store or state store backend
44+
- Failure to enforce TLS for connections to Slack's APIs (Web API, WebSocket, or webhook endpoints)
45+
- WebSocket connection hijacking or man-in-the-middle vulnerabilities in Socket Mode clients
46+
- Denial of service caused by malformed API responses or WebSocket frames that crash or hang the client
47+
- Information disclosure through SDK error responses or timing side channels
48+
- Insecure default configurations that could lead to credential exposure
49+
50+
### Out of Scope
51+
52+
The following are NOT SDK vulnerabilities:
53+
54+
- Vulnerabilities in the Python runtime, operating system, or hosting infrastructure
55+
- Security issues in Slack's server-side platform infrastructure (report those directly under Slack's main HackerOne scope)
56+
- Vulnerabilities in third-party PyPI packages chosen and installed by the developer outside of this SDK's direct dependencies (e.g., aiohttp, websockets, SQLAlchemy, boto3)
57+
- Security issues in developer application logic built on top of the SDK (e.g., storing tokens insecurely in application code)
58+
- Attacks that require possession of valid tokens or signing secrets (the SDK assumes credentials provided to it are confidential)
59+
- Rate limiting or resource exhaustion on Slack's servers caused by legitimate API usage
60+
- Issues that only affect end-of-life Python versions with no reproduction on supported versions
61+
- Security of custom API base URLs configured by the developer for testing or proxying
62+
63+
## Disclosure Policy
64+
65+
This project follows coordinated disclosure:
66+
67+
- Allow a reasonable timeframe for the team to investigate, develop, and release a fix before any public disclosure.
68+
- Researchers who follow responsible disclosure practices are eligible for recognition and bounty consideration through the Slack HackerOne program.

docs/reference/models/blocks/block_elements.html

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3392,7 +3392,7 @@ <h3>Inherited members</h3>
33923392

33933393
@property
33943394
def attributes(self) -&gt; Set[str]: # type: ignore[override]
3395-
return super().attributes.union({&#34;timestamp&#34;, &#34;format&#34;, &#34;url&#34;, &#34;fallback&#34;})
3395+
return super().attributes.union({&#34;timestamp&#34;, &#34;format&#34;, &#34;url&#34;, &#34;fallback&#34;, &#34;style&#34;})
33963396

33973397
def __init__(
33983398
self,
@@ -3401,6 +3401,7 @@ <h3>Inherited members</h3>
34013401
format: str,
34023402
url: Optional[str] = None,
34033403
fallback: Optional[str] = None,
3404+
style: Optional[Union[dict, &#34;RichTextElementParts.TextStyle&#34;]] = None,
34043405
**others: dict,
34053406
):
34063407
super().__init__(type=self.type)
@@ -3409,40 +3410,45 @@ <h3>Inherited members</h3>
34093410
self.format = format
34103411
self.url = url
34113412
self.fallback = fallback
3413+
self.style = style
34123414

34133415
class Broadcast(RichTextElement):
34143416
type = &#34;broadcast&#34;
34153417

34163418
@property
34173419
def attributes(self) -&gt; Set[str]: # type: ignore[override]
3418-
return super().attributes.union({&#34;range&#34;})
3420+
return super().attributes.union({&#34;range&#34;, &#34;style&#34;})
34193421

34203422
def __init__(
34213423
self,
34223424
*,
34233425
range: str, # channel, here, ..
3426+
style: Optional[Union[dict, &#34;RichTextElementParts.TextStyle&#34;]] = None,
34243427
**others: dict,
34253428
):
34263429
super().__init__(type=self.type)
34273430
show_unknown_key_warning(self, others)
34283431
self.range = range
3432+
self.style = style
34293433

34303434
class Color(RichTextElement):
34313435
type = &#34;color&#34;
34323436

34333437
@property
34343438
def attributes(self) -&gt; Set[str]: # type: ignore[override]
3435-
return super().attributes.union({&#34;value&#34;})
3439+
return super().attributes.union({&#34;value&#34;, &#34;style&#34;})
34363440

34373441
def __init__(
34383442
self,
34393443
*,
34403444
value: str,
3445+
style: Optional[Union[dict, &#34;RichTextElementParts.TextStyle&#34;]] = None,
34413446
**others: dict,
34423447
):
34433448
super().__init__(type=self.type)
34443449
show_unknown_key_warning(self, others)
3445-
self.value = value</code></pre>
3450+
self.value = value
3451+
self.style = style</code></pre>
34463452
</details>
34473453
<div class="desc"></div>
34483454
<h3>Class variables</h3>

docs/reference/models/blocks/index.html

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6410,7 +6410,7 @@ <h3>Inherited members</h3>
64106410

64116411
@property
64126412
def attributes(self) -&gt; Set[str]: # type: ignore[override]
6413-
return super().attributes.union({&#34;timestamp&#34;, &#34;format&#34;, &#34;url&#34;, &#34;fallback&#34;})
6413+
return super().attributes.union({&#34;timestamp&#34;, &#34;format&#34;, &#34;url&#34;, &#34;fallback&#34;, &#34;style&#34;})
64146414

64156415
def __init__(
64166416
self,
@@ -6419,6 +6419,7 @@ <h3>Inherited members</h3>
64196419
format: str,
64206420
url: Optional[str] = None,
64216421
fallback: Optional[str] = None,
6422+
style: Optional[Union[dict, &#34;RichTextElementParts.TextStyle&#34;]] = None,
64226423
**others: dict,
64236424
):
64246425
super().__init__(type=self.type)
@@ -6427,40 +6428,45 @@ <h3>Inherited members</h3>
64276428
self.format = format
64286429
self.url = url
64296430
self.fallback = fallback
6431+
self.style = style
64306432

64316433
class Broadcast(RichTextElement):
64326434
type = &#34;broadcast&#34;
64336435

64346436
@property
64356437
def attributes(self) -&gt; Set[str]: # type: ignore[override]
6436-
return super().attributes.union({&#34;range&#34;})
6438+
return super().attributes.union({&#34;range&#34;, &#34;style&#34;})
64376439

64386440
def __init__(
64396441
self,
64406442
*,
64416443
range: str, # channel, here, ..
6444+
style: Optional[Union[dict, &#34;RichTextElementParts.TextStyle&#34;]] = None,
64426445
**others: dict,
64436446
):
64446447
super().__init__(type=self.type)
64456448
show_unknown_key_warning(self, others)
64466449
self.range = range
6450+
self.style = style
64476451

64486452
class Color(RichTextElement):
64496453
type = &#34;color&#34;
64506454

64516455
@property
64526456
def attributes(self) -&gt; Set[str]: # type: ignore[override]
6453-
return super().attributes.union({&#34;value&#34;})
6457+
return super().attributes.union({&#34;value&#34;, &#34;style&#34;})
64546458

64556459
def __init__(
64566460
self,
64576461
*,
64586462
value: str,
6463+
style: Optional[Union[dict, &#34;RichTextElementParts.TextStyle&#34;]] = None,
64596464
**others: dict,
64606465
):
64616466
super().__init__(type=self.type)
64626467
show_unknown_key_warning(self, others)
6463-
self.value = value</code></pre>
6468+
self.value = value
6469+
self.style = style</code></pre>
64646470
</details>
64656471
<div class="desc"></div>
64666472
<h3>Class variables</h3>

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ classifiers = [
4242

4343
[project.urls]
4444
Documentation = "https://docs.slack.dev/tools/python-slack-sdk/"
45+
Source = "https://github.com/slackapi/python-slack-sdk"
4546

4647
[tool.setuptools.packages.find]
4748
include = ["slack*", "slack_sdk*"]

slack_sdk/models/blocks/block_elements.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2234,7 +2234,7 @@ class Date(RichTextElement):
22342234

22352235
@property
22362236
def attributes(self) -> Set[str]: # type: ignore[override]
2237-
return super().attributes.union({"timestamp", "format", "url", "fallback"})
2237+
return super().attributes.union({"timestamp", "format", "url", "fallback", "style"})
22382238

22392239
def __init__(
22402240
self,
@@ -2243,6 +2243,7 @@ def __init__(
22432243
format: str,
22442244
url: Optional[str] = None,
22452245
fallback: Optional[str] = None,
2246+
style: Optional[Union[dict, "RichTextElementParts.TextStyle"]] = None,
22462247
**others: dict,
22472248
):
22482249
super().__init__(type=self.type)
@@ -2251,37 +2252,42 @@ def __init__(
22512252
self.format = format
22522253
self.url = url
22532254
self.fallback = fallback
2255+
self.style = style
22542256

22552257
class Broadcast(RichTextElement):
22562258
type = "broadcast"
22572259

22582260
@property
22592261
def attributes(self) -> Set[str]: # type: ignore[override]
2260-
return super().attributes.union({"range"})
2262+
return super().attributes.union({"range", "style"})
22612263

22622264
def __init__(
22632265
self,
22642266
*,
22652267
range: str, # channel, here, ..
2268+
style: Optional[Union[dict, "RichTextElementParts.TextStyle"]] = None,
22662269
**others: dict,
22672270
):
22682271
super().__init__(type=self.type)
22692272
show_unknown_key_warning(self, others)
22702273
self.range = range
2274+
self.style = style
22712275

22722276
class Color(RichTextElement):
22732277
type = "color"
22742278

22752279
@property
22762280
def attributes(self) -> Set[str]: # type: ignore[override]
2277-
return super().attributes.union({"value"})
2281+
return super().attributes.union({"value", "style"})
22782282

22792283
def __init__(
22802284
self,
22812285
*,
22822286
value: str,
2287+
style: Optional[Union[dict, "RichTextElementParts.TextStyle"]] = None,
22832288
**others: dict,
22842289
):
22852290
super().__init__(type=self.type)
22862291
show_unknown_key_warning(self, others)
22872292
self.value = value
2293+
self.style = style

0 commit comments

Comments
 (0)