Skip to content

[New Rule] GitHub OAuth Application Authorized - #6896

Merged
bryans3c merged 11 commits into
mainfrom
new-rule/github-oauth-application-authorized
Oct 1, 2026
Merged

bryans3c merged 11 commits into
mainfrom
new-rule/github-oauth-application-authorized

Conversation

@bryans3c

@bryans3c bryans3c commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Pull Request

Issue link(s):

Summary - What I changed

Added persistence_github_oauth_application_authorized, an ES|QL rule for oauth_authorization.create. Severity is low (Login-with-GitHub is routine). On non-EMU GHEC this user-security-log action often does not stream to enterprise audit.

Why it matters

Authorizing an OAuth app grants a token that can clone and ZIP private repos (Heroku/Travis 2022). The audit action is also everyday developer behavior, so severity is low. EMU is required for reliable enterprise-stream coverage.

How To Test

Authorize a lab OAuth App (localhost callback is expected). On non-EMU, check the user security log; enterprise logs-github.audit-* may not contain oauth_authorization.create.

from logs-github.audit-* metadata _id, _index, _version
| where
  event.module == "github" and data_stream.dataset == "github.audit"
    and event.action == "oauth_authorization.create"
| keep
    _id,
    _index,
    _version,
    @timestamp,
    event.action,
    user.name,
    github.org,
    github.repo,
    github.actor_ip,
    github.hashed_token,
    github.programmatic_access_type,
    github.user_agent,
    github.name

Checklist

  • Added a label for the type of pr: Rule: New
  • query is inclusive, not overly exclusive
  • name and description are descriptive and free of typos
  • Secret and sensitive material has been managed correctly
  • Reviewed the PR telemetry comment (informational)

Copilot AI lite review requested due to automatic review settings September 24, 2026 12:30
@bryans3c bryans3c added Rule: New Proposal for new rule Integration: GitHub GitHub integration labels Sep 24, 2026
@bryans3c bryans3c self-assigned this Sep 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Unresolved review findings must be addressed before approval.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity · 4 Low severity

Open (5)
What changed in this PR

Adds a GitHub EQL rule detecting oauth_authorization.create events.

Changes:

  • Adds low-severity detection and ATT&CK mappings.
  • Includes investigation guidance, references, and analyst fields.
  • Configures GitHub audit-log ingestion handling.
File Summary
rules/​integrations/​github/​persistence_github_oauth_application_authorized.toml New GitHub OAuth authorization detection rule.

Review findings require correcting OAuth application fields, adding them to investigation fields, and updating taxonomy and data-source tags.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread rules/integrations/github/persistence_github_oauth_application_authorized.toml Outdated
[[rule.threat.technique.subtechnique]]
id = "T1078.004"
name = "Cloud Accounts"
reference = "https://attack.mitre.org/techniques/T1078/004/"
@bryans3c
bryans3c marked this pull request as draft September 24, 2026 15:17
@bryans3c
bryans3c marked this pull request as ready for review October 1, 2026 14:17
bryans3c and others added 5 commits October 1, 2026 16:18
@bryans3c
bryans3c requested a review from Samirbous October 1, 2026 14:27
Comment thread rules/integrations/github/persistence_github_oauth_application_authorized.toml Outdated
bryans3c and others added 2 commits October 1, 2026 16:54
…_authorized.toml

Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com>
@bryans3c
bryans3c enabled auto-merge October 1, 2026 14:59
@bryans3c
bryans3c added this pull request to the merge queue Oct 1, 2026
Merged via the queue into main with commit ac85f42 Oct 1, 2026
8 checks passed
@bryans3c
bryans3c deleted the new-rule/github-oauth-application-authorized branch October 1, 2026 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport: auto Integration: GitHub GitHub integration Rule: New Proposal for new rule

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants