# Xygeni Sensor for GitHub

The [Xygeni Sensor for GitHub](https://github.com/marketplace/xygeni-sensor) monitors activity in an Organization (or User) and its repositories.

When Xygeni detects an unusual activity, it will raise an alert for tracking the origin and taking immediate action to mitigate the risk and prevent further damage.

### How it works

The sensor is a [GitHub App](https://docs.github.com/en/apps/using-github-apps/about-using-github-apps) that extends GitHub’s functionality. GitHub will send a real-time webhook event to Xygeni for subscribed events.

See [Webhook events](https://docs.github.com/en/webhooks-and-events/webhooks/webhook-events-and-payloads) for further information on the events and payloads sent from GitHub to Xygeni platform.

{% hint style="info" %}
The webhook URL is `https://api.xygeni.io/githubapp/webhook` for the Xygeni cloud platform. The webhook is secured with a shared secret and TLS, following the recommendations in [Securing your webhooks](https://docs.github.com/en/webhooks-and-events/webhooks/securing-your-webhooks).
{% endhint %}

### Installation

* Navigate to our app’s page at the GitHub marketplace: [Xygeni Sensor](https://github.com/marketplace/xygeni-sensor)

<br>

<figure><img src="https://4096647782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUTz59rJLkJBjiRWAMknU%2Fuploads%2FVYeszQ8xB8yaV8eEzvqk%2Fimage.png?alt=media&#x26;token=82d11acb-b08c-413a-a69a-26de279103b8" alt=""><figcaption></figcaption></figure>

* Click `Set up a plan`, and then click on free to proceed with the installation into your `organization`.
* On the next screen, select the `repositories` where you want to install the app and click `Install` again.
* Now, the installation will redirect you to the browser where you have to log in into your Xygeni account, so we can link your app installation with your Xygeni account.

<figure><img src="https://4096647782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUTz59rJLkJBjiRWAMknU%2Fuploads%2FL88C5COHhwBTCt5Z7GZv%2Fimage.png?alt=media&#x26;token=2d97b8bf-04af-4d52-a22d-631c0e7df435" alt=""><figcaption></figcaption></figure>

<figure><img src="https://4096647782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUTz59rJLkJBjiRWAMknU%2Fuploads%2FTI69IDJ9D58mQ94YFbSa%2Fimage.png?alt=media&#x26;token=2978a641-e4b1-4a0e-89da-10b48821341f" alt=""><figcaption></figcaption></figure>

* And it is done ! The installed Sensor will be monitoring your organization and repositories for you. You will receive `email notifications` when any unusual activity is detected.

### Installation for GitHub Enterprise <a href="#installation_for_github_enterprise" id="installation_for_github_enterprise"></a>

* Navigate to the integrations tab in the configuration of your Xygeni account, and select Code repositories:

<figure><img src="https://4096647782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUTz59rJLkJBjiRWAMknU%2Fuploads%2FxahDFJi5ybATSyyplkMT%2Fimage.png?alt=media&#x26;token=4f76b0c6-00e8-44db-9ac2-ff5afe8d66d8" alt=""><figcaption></figcaption></figure>

* Configure your Github Enterprise’s domain and you will be redirected to your GitHub Enterprise Instance to authenticate and confirm the installation.

<figure><img src="https://4096647782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUTz59rJLkJBjiRWAMknU%2Fuploads%2FPZkRcxuaCp9R5AeVqEJI%2Fimage.png?alt=media&#x26;token=ed8cf70f-1a54-4b69-bb15-b548d9be53bf" alt="" width="318"><figcaption></figcaption></figure>

* Once configured on GitHub’s side, the installation will redirect you back to your Xygeni account, so we can link your app installation with your Xygeni account.

<figure><img src="https://4096647782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUTz59rJLkJBjiRWAMknU%2Fuploads%2FlyhDU32rRaWRcIhQbxuF%2Fimage.png?alt=media&#x26;token=44f5b618-7b42-42c4-9600-eeb15ef5db4c" alt=""><figcaption></figcaption></figure>

* Configure your Github token with administrator permissions to install an app and it is done! The installed Sensor will be monitoring your organization and repositories for you. You will receive `email notifications` when any unusual activity is detected.

### Alerts Tracking <a href="#alerts_tracking" id="alerts_tracking"></a>

You can navigate to the dashboard to keep track of all the Unusual Activity detected at the moment, ordered by time of exposure from most recent to less recent. Open [Anomalous Activity Summary](https://docs.xygeni.io/xygeni-products/anomaly-detection/anomaly-detection-user-interface-guide).
