# Your first scan (GitHub Action)

Similarly to the Dockerized client and all our CI/CD pipelines integrations, the [Meterian GitHub Action](https://github.com/marketplace/actions/meterian-scanner) includes all the necessary tools required to perform scans for project developed across all the languages we support. Essentially all you need to worry about is how to set it up for usage.

**Open source project repository**

Commit the following YAML workflow configuration file to your repository in the folder `.github/workflows`

```yaml
# .github/workflows/main.yml

name: Meterian Scanner workflow

on: push

jobs:
    meterian_scan:
        name: Meterian client scan
        runs-on: ubuntu-latest
        steps:
          - name: Checkout
            uses: actions/checkout@v3
          - name: Meterian Scanner
            uses: MeterianHQ/meterian-github-action@v1.0.17
            with:
              oss: true
```

**Note**: performing an open source scan with this configuration will generate a public report on the default account. To have the resulting report in your personal account provide your personal token to the configuration as explained below\.-&#x20;

**Private project repository**

First of all, generate a Meterian API token:

* Log into your account on [https://meterian.com](https://meterian.com/)
* Create an new API token from the dashboard

Then Add the above token as a GitHub secret by the name `METERIAN_API_TOKEN`

* In your repository navigate to the Secrets page ( `Your repository > Settings > Secrets` )
* Click on the `Add a new Secret`

Then commit this YAML workflow configuration file to your repository in the folder `.github/workflows`

```yaml
# .github/workflows/main.yml

name: Meterian Scanner workflow

on: push

jobs:
    meterian_scan:
        name: Meterian client scan
        runs-on: ubuntu-latest
        steps: 
          - name: Checkout
            uses: actions/checkout@v3
          - name: Meterian Scanner
            uses: MeterianHQ/meterian-github-action@v1.0.17
            env:
              METERIAN_API_TOKEN: ${{ secrets.METERIAN_API_TOKEN }}
```

Committing these action workflow configurations will trigger your first workflow run which is visible on GitHub in the Actions tab of your repository

<figure><img src="/files/H2O7oF6lp1ZbFcUYogbR" alt=""><figcaption></figcaption></figure>

Note these workflows are triggered on push, should you wish to change this behaviour for your repository consult the detailed workflow syntax documentation [here](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on). The parameters for the action configuration are listed in the [action documentation page on GitHub](https://github.com/marketplace/actions/meterian-scanner).

You can find a live example using our action [here](https://github.com/MeterianHQ/spark), and a list of working examples for all the supported languages can be found [here](https://github.com/marketplace/actions/meterian-scanner#examples).

If your workflow run is not triggered as expected ensure you have GitHub Actions enabled in your repository by reviewing the Actions Permissions in the Actions/General page of your repository settings.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.meterian.io/the-client/guide-your-first-scan/your-first-scan-github-action.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
