Why GitHub audit log monitoring belongs in your Wazuh deployment
This page explains how to bring GitHub organization audit events into Wazuh and alert on permission changes, membership changes and repository activity. The reason is practical: GitHub holds your source code, CI secrets and deploy paths, and a compromised account with organization rights can add members, widen repository access or change settings without touching a single server you monitor. Those changes leave a trail in the organization audit log, but only if someone collects and reads that trail continuously.
Before any build work, confirm the collection method. The Wazuh sources available for this page do not document a GitHub-specific connector, so do not assume a ready-made module exists in your version. Check the current Wazuh documentation for supported log collection modules and the GitHub documentation for how audit log events are exposed to organization owners, including the plan and role required to read them and whether they can be streamed or must be retrieved through the API. Also confirm which GitHub plan your organization uses, because audit log availability and retention depend on it. Record the answers in writing, since they determine whether you build a custom collector, a scheduled API pull or a log forwarding path.
Wazuh's role in this design is to store and analyze the events. The Wazuh server applies decoders and rules to incoming data, the Wazuh indexer stores the resulting alerts, and the Wazuh dashboard is where analysts search them. Decide early which events count as high-risk (for example, changes to organization owners, new deploy keys, branch protection changes and token creation) and who receives those alerts. A collector that ingests everything without a rule set for these events will produce data but not detection.
What you need in place before connecting GitHub audit events to Wazuh
Most delays in GitHub audit log monitoring come from assumptions made before the first event is read. Each card below names one item to confirm, the value to record, and the person who owns it. Settle these together so the collector, the GitHub credential and the alert pipeline are built against facts rather than defaults.
Wazuh release line and target version
Confirm which Wazuh release line and patch level the team will run before writing any collector configuration. The current line is 4.14, and the patch releases in this line have arrived roughly every one to two months, so a version chosen months ago may already be behind. Record the exact version, check it against the release notes, and make the platform owner accountable for the choice and the upgrade schedule.
Wazuh release notesGitHub plan and organization owner role
Reading organization audit events depends on the GitHub plan and on the role of the account that creates the token. Confirm with the GitHub organization owner whether the plan exposes the audit log at the level you need, and which events are retained and for how long under that plan. Record the owner who will approve the credential, since that person controls who can read the trail.
Dedicated read-only GitHub credential
Create a credential used only by the Wazuh collector, scoped to read audit events and nothing else. Avoid personal access tokens from engineers, because removing that person would break collection and their permissions would silently widen the scope. Ask the GitHub administrator to record the token owner, the expiry date and the rotation procedure in the access register.
Outbound network path from the collector
The component that polls GitHub needs outbound HTTPS to the GitHub API endpoints. Check whether the collector sits behind a proxy, a egress firewall or an allowlist, and confirm the exact hosts with the network team before testing. Record whether TLS inspection is applied, because interception can break certificate validation and produce collection errors that look like authentication failures.
Working Wazuh server and indexer
Alerts from GitHub events are only useful if the Wazuh server analyzes them and the indexer stores them. Confirm that both components are healthy, that the dashboard can search recent alerts from an existing agent, and that someone has checked disk capacity for the indexer. Test ingestion with a harmless sample event before connecting the live organization, so any decoder or rule problem appears early.
Wazuh componentsOwner for alert handling and retention
Decide who receives GitHub alerts, who triages them, and how long the raw audit events are kept for your investigation and audit needs. Without a named owner, permission-change alerts will be generated but not reviewed. Confirm retention with your compliance lead, because the GitHub retention window and your internal retention requirement may differ and only the Wazuh side is under your control.
How a GitHub audit event becomes a Wazuh alert
The path starts at the GitHub organization audit log, which the client's team reads with a credential scoped to that organization. The collection method (an API poll or a log export) is confirmed by the team before build, and it crosses from the client's network to GitHub. Collected events reach the Wazuh server, where decoders and rules are applied; this is where custom content is written and tested. Alerts are then stored in the Wazuh indexer and viewed in the Wazuh dashboard. Check the credential boundary and each hand-off before trusting the alerts.
Audit events flow from GitHub through the client's collector and Wazuh components to the dashboard.
Choosing how GitHub audit events reach Wazuh
A scheduled script calls the GitHub REST API for organization audit log events, appends new events as lines to a local file, and the Wazuh agent on that host reads the file and forwards the lines to the Wazuh server for decoding and rules. Every part of this path lives on one host you control: the script, its state file, its schedule and the agent configuration. That makes it the easiest option to review line by line before it runs.
- Plan and API access: Confirm which GitHub plan and token type can read the organization audit log and which role the token needs before writing any code.
- Retention and gaps: Confirm how far back the API returns events and how the script resumes from its saved position after a host outage or a state reset.
- Rate limits: Confirm the request limits for your token type and build paging and backoff into the script so a large backlog is fetched in steps.
- Host needs: Outbound HTTPS to GitHub, a scheduler, a token file readable only by the service account, a writable state directory, and log rotation for the output file.
- Failure modes: An expired token that fails without an alert, duplicate lines after a state reset, or an unrotated file that stops the agent from picking up new events.
Check who owns the script after launch, who rotates the token, and whether your Wazuh release documents this localfile pattern for the agent version you run.
A forwarder service on a host you control collects GitHub audit events and sends them over syslog to a Wazuh listener. Wazuh documents syslog collection for devices that cannot run an agent, so the same receiving path can carry events from a forwarder, but the exact listener settings and decoders depend on your release. The forwarder becomes a separate system with its own patching, uptime and access controls.
- Forwarder selection: Confirm the forwarder supports GitHub audit data, is actively maintained, and carries a license your organization accepts.
- Transport: Confirm whether the syslog stream uses UDP, TCP or TLS, and whether your release's remote configuration accepts that transport.
- Message format: Decide whether events arrive as JSON that existing decoders can read or as a wrapped format that needs custom decoders and test cases.
- Host needs: A forwarder host with outbound access to GitHub, a network route to the Wazuh remote port, and time synchronization so event timestamps line up with other sources.
- Failure modes: UDP drops events silently under load, a forwarder restart can lose its position in the stream, and a changed message format breaks decoding without raising an error.
Confirm the forwarder's supported GitHub event types and its delivery guarantees in writing, and test with a sample of real events before you rely on the path for alerts.
A service your team builds calls the GitHub API and then sends results into Wazuh through the Wazuh API, or uses the Wazuh API for lookups around events that arrive by another route. The Wazuh API is documented mainly for managing the platform and its agents, so confirm in the documentation for your release whether it supports the write path you intend before you design around it. This option gives the most control over event shape and error handling, and it also gives your team the most code to maintain.
- Documented path: Confirm the Wazuh documentation for your release describes the ingestion method you plan to use, and do not adopt a method the docs do not support.
- Credentials: Scope the Wazuh API account and the GitHub token to the actions the job needs, and store both in a secrets manager.
- Version drift: Each Wazuh or GitHub API change can break the integration, so plan a retest with every platform upgrade.
- Host needs: A network route to the Wazuh API port, a runtime your team can patch, and monitoring for the job itself, including a check that events keep arriving.
- Failure modes: Token expiry, API version changes, and events that the API accepts but that never match a rule because the decoders expect a different shape.
Decide before the build who owns the code after launch, whether that is your platform team or a partner under a written support scope.
How to configure GitHub audit collection and confirm the first events
This sequence connects a read-only GitHub audit credential to a Wazuh agent, confirms that a sample permission change reaches the Wazuh server, and ends with a matching alert visible in the dashboard. Each step closes with a check you can repeat before alerting is trusted.
Create a read-only audit credential
An owner of the GitHub organization creates a token or app credential whose only permission is reading the organization audit log. Confirm first which plan and token types expose the audit log API, since this varies by GitHub offering and should be checked in GitHub's current documentation. Store the credential in a secrets location the collector can read, not in a shared document. The step is done when a single test call with the credential returns audit entries from a sandbox organization and the same call fails for any write action.
Place the collector on a readable host
A systems engineer installs the collector script on a host that already runs a Wazuh agent, with the token loaded from a root-only environment file. Set ownership and permissions so the user the agent runs as can read the output directory but cannot change the script or the token. The step is done when a manual run writes JSON lines to the output file and the agent's service account can open that file, which you can check with a test read under that account.
Choose and configure the collection method
Decide between a polling script that writes a local JSON file and any streaming or syslog option your GitHub plan offers, and confirm the chosen path against GitHub's current audit log documentation. For the file method, add a localfile block to the agent's ossec.conf with the file path and the json log format, then restart the agent. The step is done when the agent's own log shows the file being monitored and no read errors appear for that path.
Enable decoding for the audit events
A detection engineer checks whether the shipped Wazuh decoders and rules recognize the audit event fields, such as the action name, actor and organization. Where they do not, add a custom decoder and a first rule in the local decoder and rules files on the Wazuh server. Paste a representative sample event into wazuh-logtest and confirm the output shows the decoder name and the expected field extraction. The step is done when logtest identifies the event type and the rule it matches, not a generic fallback.
Confirm a sample change reaches the server
In a sandbox organization, an administrator makes one controlled permission change, such as adding a test member to a team and then removing them. To see the raw event, enable full archive logging on the Wazuh server, then search the archive file for the action name and the test account. The step is done when the archived JSON entry for that change appears on the server with the same actor, organization and action values GitHub showed in the sandbox audit log.
Confirm the alert in the dashboard
A security analyst opens the Wazuh dashboard and searches the alert index for the agent name, the rule group the custom rule belongs to, and the test account. The alert should appear only if the rule level meets the alert threshold configured on the server. The step is done when the alert shows the expected rule identifier, the decoded actor and action fields, and the timestamp that matches the sandbox change, and the analyst can reproduce the same result on a second test change.
How GitHub audit fields map to Wazuh decoders and alert fields
This table lists the audit fields a Wazuh GitHub audit log pipeline usually needs and the decoded fields and rules they should reach. Use it as a checklist to confirm against your own deployment, since field names depend on the collection method and decoder version. The main takeaway is that every alert rule should be tested against a sample event from your organization before you rely on it.
| Audit field | Typical GitHub field | Wazuh field to confirm | Missing or renamed when |
|---|---|---|---|
| Actor | Account that performed the action | Decoded user or actor field used in account-activity rules | Some system-initiated events have no human actor; confirm on a sample event |
| Action | Event type, such as a membership or repository change | Decoded action field that rules match on | Event strings differ across collection methods; copy exact values from samples |
| Organization | Organization name for the event | Decoded organization field used to scope rules | May be absent if events come from a different feed; confirm per source |
| Repository | Repository name, often prefixed with the organization | Decoded repository field used in repository event rules | Present only on repository events; expect it empty on membership events |
| Target user or team | User or team the change applies to | Decoded target field used in permission-change rules | Naming differs between member and team events; confirm for each action type |
| Timestamp | Event creation time in epoch or ISO format | Timestamp field used for alert time and correlation | Time zone and format may vary; confirm normalization before correlating |
| Source IP | IP address of the actor when the event was made | Decoded source IP field used in network and allowlist rules | Missing or masked depending on plan and collection method; confirm |
| User agent | Client software string for the session or API call | Decoded user agent field, if the decoder extracts it | Often absent in polled or streamed events; do not build rules on it until confirmed |
Which permission, membership and repository events to alert on first
Start with the events that let an attacker widen access quickly. Changes to organization owners and admins come first, because a new owner or a promoted admin can change nearly every other setting. Next, watch team membership and role changes, since a compromised account often gets added to a team with write access to sensitive repositories. Then cover repository visibility changes (a private repository made public is a data exposure), deploy key and token creation (these grant access that survives a password reset), branch protection edits (a removed required review lets unreviewed code reach the default branch) and new outside collaborators added to repositories. Each one has a noisy version. Owner changes are noisy when an automation account or an IT administrator performs routine onboarding, membership changes are noisy during team reorganizations, and visibility changes are noisy for public open-source projects where public is the expected state. Deploy key and token creation is noisy when CI tooling rotates credentials on a schedule.
Do not set thresholds from guesses. Run the rules in observation mode for a baseline period in your own organization, then record which actors, automation accounts, teams and repositories generate each event type and at what volume. Decide which of those are expected, and for each expected pattern, decide whether to suppress it by actor, team, repository or time window, or to keep alerting with a lower severity. Confirm the exact field names and event actions your Wazuh decoders produce for GitHub audit events before writing rules against them, because the rule logic depends on them. Record every suppression with a reason and an owner so that a later reviewer can tell an accepted pattern from a gap. Tuning this baseline is part of the implementation work, and it should be scheduled and costed in the written scope rather than left to the security team after go-live.
Securing the GitHub credential, the collector and the alert path
The GitHub integration touches three things an attacker would want: a credential that can read the organization's audit trail, the collector that handles that credential, and the alert path that tells your team something changed. Each control below protects one of these, and together they keep a compromised account from both acting in GitHub and hiding its tracks in Wazuh.
Scope the GitHub credential to read-only audit access
The token used to pull organization audit events should carry only the permission needed to read that log, and nothing that can change membership, repositories or settings. Ask your GitHub administrator to confirm which token type and scopes the audit log endpoint requires for your organization plan, then record the chosen scopes in your change log. A read-only credential limits the damage if the Wazuh host is compromised, because the attacker cannot use it to alter the repositories the log is watching.
Keep the token out of configuration files
A token written in plain text into the Wazuh configuration or a script is readable by anyone with access to that file or to backups of it. Store the value in a restricted secrets location on the Wazuh server, reference it at runtime, and make sure it does not appear in shell history, process listings or the Wazuh dashboard. Check whether your team's backup jobs copy the file, since backups often outlive the token they contain.
Plan token rotation and revocation
Set a rotation schedule the team can actually keep, and document who revokes the token if the Wazuh host, an administrator laptop or a backup is exposed. Rotation should be tested once in a non-production setting so the collector restart and the Wazuh log entries that confirm success are known in advance. Keep a record of the date each token was issued so a missed rotation is visible during reviews.
Restrict file permissions on the collector and logs
Any collector script, wrapper or log file that the integration writes should be readable only by the service account that runs it and by the Wazuh components that need it. Confirm ownership and mode bits after each install or upgrade, because package updates and manual edits often reset them. Review whether audit event files written to disk are readable by ordinary users on the host, since those files contain membership and repository activity that an intruder would find useful.
Limit who can view or change the integration
Users who can edit the integration, its decoders or its rules can also quietly switch off GitHub alerting. Use role-based access in the Wazuh dashboard and API so that only named administrators can change the GitHub integration, and separate them from users who only read alerts. Review API tokens and dashboard accounts with access to these settings on a fixed schedule, and remove accounts that no longer need them.
Keep GitHub alerts out of the monitored account's reach
If the account that alerts about GitHub changes is also a member of the monitored organization, a compromised account could remove or suppress its own alerts. Route GitHub audit events through a Wazuh collector authenticated by a separate, non-member credential, and make sure no GitHub user can disable the integration or edit its rules. Treat a sudden silence from this source as an alert in its own right, because a quiet audit feed is a common sign of tampering.
Common GitHub audit monitoring failures and how to fix them
This table pairs each common symptom in a Wazuh GitHub audit log pipeline with its likely cause and a fix. Use it to narrow down where the chain breaks, from events never arriving to alerts firing twice or with the wrong time. Confirm every fix against the documentation for the collection method you chose and against your own Wazuh and GitHub logs before changing production settings.
| Symptom | Likely cause | Fix |
|---|---|---|
| No events arriving in the Wazuh indexer | Collection job not running, wrong organization name, or the audit log source is not enabled for the collector | Confirm the collector process is running and check its logs. Verify the organization name and that the collector is pointed at the right audit log source. Confirm steps against the chosen method's documentation. |
| Events arriving but not decoded | Log format sent to Wazuh does not match the decoder the ruleset expects, or the events are landing in a generic archive | Inspect a raw event in the archive. Compare its structure with the decoder for the GitHub audit source. Test the decoder with wazuh-logtest before editing any custom decoder. |
| Decoded events with no alerts | Rules for permission, membership or repository actions are disabled, or the event action names do not match the rule conditions | Check that the GitHub-related rule files are loaded and enabled. Compare the action names in your events with the rule conditions and adjust custom rules to match. |
| Credential rejected or lacking scope | Token expired, revoked, or created without the organization audit log read permission, or the token owner lacks organization owner rights | Regenerate the token with the minimum read scope the collection method requires. Confirm the account has the access GitHub documents for reading organization audit logs. Store the token in a secrets mechanism, not in plain configuration. |
| Rate limiting or pagination gaps | Large audit log volume during a backfill exceeds request limits, or the collector stops before reading all pages | Check collector logs for rate limit responses. Reduce the polling frequency or backfill window, and confirm the cursor or page state advances correctly. Verify event counts for a sample window against the GitHub audit log view. |
| Duplicate alerts after a restart | Collector resumes from an older position, so the same audit entries are read again and indexed twice | Check where the collector stores its last read position and confirm it persists across restarts. Review deduplication guidance in the documentation for the collection method and clear duplicates from the test index. |
| Clock or timestamp mismatches | Events parsed with the wrong time zone, or the Wazuh server and GitHub timestamps disagree, so time-based correlation misfires | Confirm NTP synchronization on the Wazuh server and collector hosts. Check the timestamp field the decoder extracts and its time zone. Compare one event's time in GitHub with its time in the dashboard. |
What buyers ask about GitHub audit monitoring in Wazuh
How much effort does GitHub audit log monitoring in Wazuh take?
The effort depends on four things: the plan your organization runs, the collection method you choose, how many custom decoders and rules you need, and how much tuning the first alerts require. A single organization on a plan that exposes the audit events you need, with one collection method and a short list of alert conditions, is a small piece of work. Each added requirement, such as covering multiple organizations, enterprise-level audit streams or detections tied to specific repositories, adds build and test time. Confirm your GitHub plan and which audit events it exposes before estimating anything.
What do we need from GitHub owners and Wazuh administrators?
You need GitHub organization owners to confirm which audit events are available, to create or approve the credential used for collection, and to agree on who can read the logs. Wazuh administrators need to confirm where the server and indexer run, how agents or modules reach the GitHub API or log stream, and who owns the custom rules and alert routing. Both groups should agree on the permission model before work starts, because the credential's scope determines what gets collected. Confirm these owners and their availability during scoping.
Can our team set up GitHub audit monitoring in Wazuh alone?
A team with working Wazuh administration experience and someone who understands GitHub organization administration can usually do the basic collection and a first set of rules without outside help. The harder parts are validating that decoders map GitHub event fields correctly, writing rules that catch compromise patterns without flooding analysts, and documenting the setup as evidence. If your team has no prior experience with Wazuh custom decoders or rules, or has no one who owns GitHub administration, a fixed-scope engagement can cover those gaps. Your own staff should still own the final configuration.
How long does the work take, and what sets the timeline?
Duration is set by the number of GitHub organizations in scope, the collection method, the number of alert conditions, the time needed for GitHub and Wazuh owners to approve access, and how long tuning takes once real events arrive. Approval cycles for credentials and change windows on the Wazuh server often take longer than the technical build. Ask for a timeline in the written scope that separates access approval, build, testing against real audit events and handover, so you can see which step controls the schedule.
What does ongoing maintenance of this integration involve?
Maintenance covers keeping the credential valid and rotated, checking that collection still runs after Wazuh upgrades, reviewing GitHub audit event names when GitHub changes its log formats, and tuning rules as your organization adds teams, repositories or automation accounts. Expect recurring time for alert review and for changes to rules as false positives appear. Confirm with your Wazuh administrators how upgrade testing will cover this integration, and decide who receives alerts after handover.
What should a fixed-scope quote for this work list?
A fixed-scope quote should list the GitHub plan and organizations covered, the audit event categories collected, the collection method and the Wazuh components changed, the decoders, rules and alert conditions to be built, the test approach and the test evidence delivered, the documentation and handover sessions, and the client responsibilities such as access approval. It should also state what is excluded, such as other GitHub features, tuning beyond an agreed period, and changes to the Wazuh platform itself. Ask for each one-time item and each recurring item to be listed separately.
Does DeployOpen provide ongoing support for this integration?
DeployOpen offers ongoing support, upgrades and continuous testing as retainers, so the integration can be maintained after the initial build. A retainer would cover the maintenance tasks listed above, and its terms would be set in writing. Confirm with DeployOpen what a retainer includes for this integration, how alert tuning is handled, and how changes from GitHub or Wazuh upgrades are scheduled before you decide between a one-time build and an ongoing arrangement.
How DeployOpen scopes and delivers GitHub audit monitoring for Wazuh
DeployOpen plans, implements, documents and supports self-hosted open-source platforms inside the client's own infrastructure, and GitHub audit log monitoring in Wazuh follows the same pattern. The work starts with a written scope covering which GitHub organizations, event categories and alert paths are in play, and the client keeps the Wazuh deployment and the data under its control.
How we scope
- Confirm which GitHub organizations, plans and audit log access your team can use before any build starts.
- Agree in writing which event categories are covered, such as membership, permission, repository and token activity.
- Define the alert conditions, owners and response steps that the monitoring must support, so detection content matches your process.
- Engagements are fixed-scope, with deliverables and timelines agreed in writing before work begins.
How we build
- Connect the GitHub audit log source to your Wazuh server using the collection method your environment supports and the documentation describes.
- Write and test decoders and rules against sample audit events, then tune them to reduce noise from routine automation activity.
- Map alerts to a severity model and dashboard views agreed with your security team during the build.
- Test the pipeline end to end, including simulated permission and membership changes, and record the results.
How we hand over
- Deliver configuration, custom rules, decoder files and a runbook that explains each alert and its expected response.
- Document the credentials, token scopes and rotation steps needed to keep the GitHub connection working.
- Walk your operations team through alert triage, false positive handling and how to change rule thresholds safely.
- Provide the written record of what was built and tested so your compliance and security reviewers can check it.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers, scoped separately from the initial build.
- Retainers can cover Wazuh version upgrades, changes to GitHub audit event types and retuning of rules as usage changes.
- Ask any provider to confirm how they handle GitHub API changes, token expiry and alert volume monitoring over time.

