Skip to content

Commit 36e3a87

Browse files
committed
docs: remove chat:write.public scope for best practice
1 parent f093919 commit 36e3a87

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

docs/guides/using-environment-variables-with-the-slack-cli.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ MY_ENV_VAR=asdf1234
2222

2323
Note that changes to your `.env` file will be reflected when you restart your local development server.
2424

25-
While the `.env` file should **never** be committed to source control for security reasons, you can see a sample `.env` file we've included in the [Timesheet approval sample app](https://github.com/slack-samples/deno-timesheet-approval) and the [Incident management sample app](https://github.com/slack-samples/deno-incident-management).
25+
While the `.env` file should **never** be committed to source control for security reasons, you can see a sample `.env` file we've included in the [Timesheet approval sample app](https://github.com/slack-samples/deno-timesheet-approval) and the [Incident management sample app](https://github.com/slack-samples/deno-incident-management).
2626

2727
### Storing deployed environment variables {#deployed-env-vars}
2828

@@ -40,7 +40,7 @@ If your token contains non-alphanumeric characters, wrap it in quotes like this:
4040
slack env add SLACK_API_URL "https://dev<yournumber>.slack.com/api/"
4141
```
4242

43-
Your environment variables are always encrypted before being stored on our servers and will be automatically decrypted when you use them&mdash;including when listing environment variables with `slack env list`.
43+
Your environment variables are always encrypted before being stored on our servers and will be automatically decrypted when you use them&mdash;including when listing environment variables with `slack env list`.
4444

4545
### Access variables from within function {#access-function}
4646

@@ -108,7 +108,7 @@ export default Manifest({
108108
outgoingDomains: [
109109
Deno.env.get("CHATBOT_API_URL")!,
110110
],
111-
botScopes: ["commands", "chat:write", "chat:write.public"],
111+
botScopes: ["commands", "chat:write"],
112112
});
113113
```
114114

@@ -134,7 +134,7 @@ With this addition, running `slack deploy` without defining a value for `CHATBOT
134134

135135
## Enabling debug mode {#debug}
136136

137-
The included environment variable `SLACK_DEBUG` can enable a basic debug mode. Set `SLACK_DEBUG` to `true` to have all function-related payloads logged.
137+
The included environment variable `SLACK_DEBUG` can enable a basic debug mode. Set `SLACK_DEBUG` to `true` to have all function-related payloads logged.
138138

139139
For local apps, add the following to your `.env` file:
140140

internal/goutils/strings_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,8 @@ func Test_RedactPII(t *testing.T) {
326326
},
327327
{
328328
name: "Escape sensitive data from mock HTTP response",
329-
text: `{"ok":true,"app_id":"A123","credentials":{"client_id":"123","client_secret":"123","verification_token":"123","signing_secret":"123"},"oauth_authorize_url":"123":\/\/slack.com\/oauth\/v2\/authorize?client_id=123&scope=commands,chat:write,chat:write.public"}`,
330-
expected: `{"ok":true,"app_id":"A123","credentials":{"client_id":"...","client_secret":"...","verification_token":"...","signing_secret":"..."},"oauth_authorize_url":"...":\/\/slack.com\/oauth\/v2\/authorize?client_id=...&scope=commands,chat:write,chat:write.public"}`,
329+
text: `{"ok":true,"app_id":"A123","credentials":{"client_id":"123","client_secret":"123","verification_token":"123","signing_secret":"123"},"oauth_authorize_url":"123":\/\/slack.com\/oauth\/v2\/authorize?client_id=123&scope=commands,chat:write"}`,
330+
expected: `{"ok":true,"app_id":"A123","credentials":{"client_id":"...","client_secret":"...","verification_token":"...","signing_secret":"..."},"oauth_authorize_url":"...":\/\/slack.com\/oauth\/v2\/authorize?client_id=...&scope=commands,chat:write"}`,
331331
},
332332
{
333333
name: "Escape from `Command` for external-auth add-secret",

test/testdata/manifest-sdk-app-name.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ export default Manifest({
1818
"icon": "assets/icon.png",
1919
"functions": [ReverseFunction],
2020
"outgoingDomains": [],
21-
"botScopes": ["commands", "chat:write", "chat:write.public"],
21+
"botScopes": ["commands", "chat:write"],
2222
});

test/testdata/manifest-sdk.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ export default Manifest({
1818
"icon": "assets/icon.png",
1919
"functions": [ReverseFunction],
2020
"outgoingDomains": [],
21-
"botScopes": ["commands", "chat:write", "chat:write.public"],
21+
"botScopes": ["commands", "chat:write"],
2222
});

0 commit comments

Comments
 (0)