---
title: "GitHub Action"
diataxis: how-to
applies_to:
  product: "nirmata-control-hub"
audience: ["platform-engineer","cluster-admin"]
last_updated: 2026-03-25
url: https://docs.nirmata.io/docs/control-hub/how-to/pipelinescanning/github-action/
---


A dedicated GitHub Action is available through the [GitHub marketplace](https://github.com/marketplace/actions/nctl-scan-installer). With this action, `nctl scan` can be used in GitHub Actions workflows to scan the configuration files present in the repository against policies that are defined centrally. In case of a failure, the entire action can be configured to fail, meaning that the test pipeline will fail, and users will get quick feedback on their changes. The results of the scan are available in Nirmata Control Hub for viewing. Nirmata Control Hub provides insights to platform administrators on the overall governance of different code repositories in their organization.

### Understanding the GitHub Action Workflow

To have a look at the workflow manifest file, refer to the `scan-outputs.yaml` file in the `.github/workflows` section of the **nctl-shift-left** [Github repository](https://github.com/nirmata/nctl-shift-left/).

Use the readily available `nctl` action.

````bash
- name: nctl-scan-installer
        uses: nirmata/action-install-nctl-scan@v0.0.6
````

Set the right environment secrets.
````bash
env:
  NIRMATA_TOKEN: ${{secrets.NIRMATA_TOKEN}}
  NIRMATA_URL: ${{secrets.NIRMATA_URL}}
````

Perform repository scan.
````bash
- name: NCTL Scan Repository
        run: nctl scan repository --policies <path|url to policy folder|repo>

````


## View Scan Reports in Nirmata Control Hub

By default, the results of the scan action are published to Nirmata Control Hub. This allows administrators to govern their repositories alongside clusters and namespaces. Below is a snap shot of viewing scan reports in Nirmata Control Hub.

**Note:** This is available as a private preview feature. Reach out to [Nirmata Support](mailto:support@nirmata.com) to enrol for this feature.

