Skip to content

fix: restrict github repo monitor triggers by login#262

Merged
enyst merged 1 commit into
mainfrom
add-github-repo-monitor-login-check
May 23, 2026
Merged

fix: restrict github repo monitor triggers by login#262
enyst merged 1 commit into
mainfrom
add-github-repo-monitor-login-check

Conversation

@enyst
Copy link
Copy Markdown
Member

@enyst enyst commented May 23, 2026

Summary

  • Adds ALLOWED_GITHUB_LOGINS to the GitHub repo monitor script, defaulting to the authenticated GITHUB_TOKEN owner.
  • Skips trigger comments from unauthorized GitHub logins before creating, resuming, or forwarding to conversations.
  • Updates the skill setup workflow and README to ask who may trigger the automation.
  • Adds unit coverage for token-owner, explicit allowlist, wildcard, and missing-author behavior.

Validation

  • uv run pytest -q
  • uv run python scripts/sync_extensions.py --check

This PR was created by an AI agent (OpenHands) on behalf of the requester.

@enyst can click here to continue refining the PR

Co-authored-by: openhands <openhands@all-hands.dev>
Copy link
Copy Markdown
Contributor

@all-hands-bot all-hands-bot left a comment

Choose a reason for hiding this comment

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

🟢 Good taste - Clean security improvement with secure defaults.

VERDICT:Worth merging - Adds access control for automation triggers with comprehensive tests and clear documentation.

KEY INSIGHT: Elegant security-by-default design using token-owner sentinel that resolves at runtime, preventing unauthorized trigger abuse while maintaining flexibility through explicit allowlists.

[RISK ASSESSMENT]

  • [Overall PR] ⚠️ Risk Assessment: 🟢 LOW

Security improvement that adds access control for GitHub repo monitor triggers. Clean implementation with secure defaults (token owner only), comprehensive test coverage, and no breaking changes to existing deployments. The bot check before auth check correctly prevents bot loops. The conditional logging provides useful security audit information without log spam.


Was this automated review useful? React with 👍 or 👎 to this review to help us measure review quality.
Workflow run: https://github.com/OpenHands/extensions/actions/runs/26334073422

@enyst enyst merged commit b8c1869 into main May 23, 2026
5 checks passed
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.

3 participants