Skip to content

fix: sync server config (bot_name, allowed_users, null-safety guards) - #4

Merged
temper-pulseengine[bot] merged 1 commit into
mainfrom
fix/server-config-sync
Mar 1, 2026
Merged

temper-pulseengine[bot] merged 1 commit into
mainfrom
fix/server-config-sync

Conversation

@temper-pulseengine

Copy link
Copy Markdown
Contributor

Commits the running server config that has been stable for 14+ days.

  • Add bot_name and allowed_command_users to config.yml
  • Add null-safety guards for context.octokit in app.js
  • Remove unused config sections

@temper-pulseengine
temper-pulseengine Bot requested a review from avrabe as a code owner March 1, 2026 12:29
- Add bot_name and allowed_command_users to config.yml
- Add null-safety guards for context.octokit in app.js
- Add debug logging for command parsing
- Remove unused config sections (fork_overrides, pull_request_rules,
  signed_commit_strategy, ci_attestation, dependabot, change_strategy,
  templates, codeowners, ai_review)
@temper-pulseengine
temper-pulseengine Bot force-pushed the fix/server-config-sync branch from a4660d7 to 30b2dc3 Compare March 1, 2026 12:34
@temper-pulseengine
temper-pulseengine Bot merged commit f98fa64 into main Mar 1, 2026
3 checks passed
@temper-pulseengine
temper-pulseengine Bot deleted the fix/server-config-sync branch March 1, 2026 12:34
avrabe added a commit that referenced this pull request Oct 3, 2026
…rg membership (#48)

## Why
Wave-1 Security auditor flagged this as Bug #4 in
`docs/agent-fleet/bugs.md`: comment-driven ChatOps already required
`requireOrgMember` AND `allowed_command_users`, but the parallel
issue-form provisioning path (`controller_repo`, Cut A) had no such
gate. Anyone able to file an issue with the configured `repo-request`
label could trigger real org-repo creation, including via the public
GitHub API.

## What
Two-layer gate inserted *before* validation/enqueue in the
`issues.opened` handler's controller_repo branch:

1. **`allowed_command_users`** — same allowlist that comment-driven
   ChatOps consults. Empty list = open to everyone (back-compat).
2. **`checkOrganizationMembership`** — defence in depth. The sender
   must be a member of the controller repo's owner org. The function
   already returns `false` on 404 / network errors, so an
   uncertain-membership case fails closed.

Each rejection posts a specific, actionable error comment back on
the issue. Sender is now read out of `context.payload.sender`.

## Source
Bug #4, wave-1 Security auditor (`docs/agent-fleet/bugs.md`).

## Test plan
- [x] 836 tests pass (was 834; +2 covering: not-allowed-user rejected
      with `not authorised` comment; sender failing org-membership
      check rejected with `must be a member` comment)
- [x] eslint clean
- [ ] After deploy: open a `repo-request`-labelled issue from a
      non-allowed-list account in `pulseengine/repo-requests` (when
      `controller_repo.enabled: true`). Bot should refuse rather than
      provision.

## Risk & rollout
- Risk: low. Default behaviour for `allowed_command_users: []` is
  unchanged (still requires org membership, which existing maintainers
  already have). Anyone who'd previously rely on "no allowlist + no
  org check" must now be in the org — which is a sensible default for
  issue-form provisioning.
- Rollout: self-update on merge.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

0 participants