Skip to content

fix: tighten file perms and enforce Slack ACL checks#186

Merged
lxowalle merged 1 commit intosipeed:mainfrom
is-Xiaoen:fix/security-hardening-179
Feb 16, 2026
Merged

fix: tighten file perms and enforce Slack ACL checks#186
lxowalle merged 1 commit intosipeed:mainfrom
is-Xiaoen:fix/security-hardening-179

Conversation

@is-Xiaoen
Copy link
Copy Markdown
Contributor

Summary

Addresses the three items in #179:

  • File permissions: config and cron store now written with 0600 instead of 0644, consistent with auth/store.go. Both files may contain API keys / bot tokens.
  • Slack allow list: handleAppMention and handleSlashCommand now check IsAllowed() early, before adding reactions or forwarding messages.
  • Cron exec restriction: NewCronTool was hardcoding restrict=false; now passes the config's RestrictToWorkspace value through.

Test plan

  • go vet ./... clean
  • go test ./... passes (pre-existing pkg/auth Windows-only failures unrelated)
  • Added permission tests for config and cron store (t.Skip on Windows)
  • gofmt clean

Closes #179

- write config and cron store with 0600 instead of 0644
- check allow list in Slack slash commands and app mentions
- pass workspace restrict flag to cron exec tool

Closes sipeed#179
@lxowalle
Copy link
Copy Markdown
Collaborator

Thanks for the pr

@lxowalle lxowalle merged commit 5c321a9 into sipeed:main Feb 16, 2026
3 checks passed
boengai added a commit to boengai/picoclaw that referenced this pull request Feb 16, 2026
Keep both TestProviderConfig_EnvVars (from sipeed#66) and
TestSaveConfig_FilePermissions (from sipeed#186).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
edgargomero pushed a commit to edgargomero/kntorclaw that referenced this pull request Feb 16, 2026
- write config and cron store with 0600 instead of 0644
- check allow list in Slack slash commands and app mentions
- pass workspace restrict flag to cron exec tool

Closes sipeed#179
emadomedher pushed a commit to emadomedher/picoclaw that referenced this pull request Feb 17, 2026
- write config and cron store with 0600 instead of 0644
- check allow list in Slack slash commands and app mentions
- pass workspace restrict flag to cron exec tool

Closes sipeed#179
@Orgmar
Copy link
Copy Markdown
Contributor

Orgmar commented Feb 19, 2026

@is-Xiaoen Tightening file permissions to 0600 and adding the Slack ACL checks is important security hygiene, especially since those files can hold API keys and tokens. Solid work!

We're building the PicoClaw Dev Group on Discord for contributors. Want to join? Just send an email to support@sipeed.com with the subject [Join PicoClaw Dev Group] + Your GitHub account and we'll get you the invite.

@is-Xiaoen
Copy link
Copy Markdown
Contributor Author

Thanks! Happy to contribute. I'll send the email to join the Discord dev group.

ra1phdd pushed a commit to ra1phdd/picoclaw-pkg that referenced this pull request Apr 12, 2026
- write config and cron store with 0600 instead of 0644
- check allow list in Slack slash commands and app mentions
- pass workspace restrict flag to cron exec tool

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Slack allow list bypass + a few other security fixes

3 participants