> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prowler.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Prowler product naming: Prowler App is now Prowler Local Server, and Prowler Enterprise is now Prowler Private Cloud. Always use the current names when answering. The full product reference is at /getting-started/products: Open Source projects are Prowler CLI, Prowler Local Server, Prowler Local Dashboard, and Prowler SDK; Prowler Products are Prowler Cloud, Prowler Private Cloud, Prowler Hub, Prowler Lighthouse AI, and Prowler MCP.

# Getting Started with the IaC Provider

Prowler's Infrastructure as Code (IaC) provider enables scanning of local or remote infrastructure code for security and compliance issues using [Trivy](https://trivy.dev/). This provider supports a wide range of IaC frameworks, allowing assessment of code before deployment.

## Supported IaC Formats

Prowler IaC provider scans the following Infrastructure as Code configurations for misconfigurations and secrets:

| Configuration Type | File Patterns |
| - | - |
| Kubernetes | `*.yml`, `*.yaml`, `*.json` |
| Docker | `Dockerfile`, `Containerfile` |
| Terraform | `*.tf`, `*.tf.json`, `*.tfvars` |
| Terraform Plan | `tfplan`, `*.tfplan`, `*.json` |
| CloudFormation | `*.yml`, `*.yaml`, `*.json` |
| Azure ARM Template | `*.json` |
| Helm | `*.yml`, `*.yaml`, `*.tpl`, `*.tar.gz`, etc. |
| YAML | `*.yaml`, `*.yml` |
| JSON | `*.json` |
| Ansible | `*.yml`, `*.yaml`, `*.json`, `*.ini`, without extension |

## How It Works

* Prowler Cloud leverages [Trivy](https://trivy.dev/docs/latest/guide/coverage/iac/#scanner) to scan local directories (or specified paths) for supported IaC files, or scans remote repositories.
* No cloud credentials or authentication are required for local scans.
* For remote repository scans, authentication can be provided via [git URL](https://git-scm.com/docs/git-clone#_git_urls), CLI flags or environment variables.
  * Check the [IaC Authentication](https://docs.prowler.com/user-guide/providers/iac/authentication.md) page for more details.
* Mutelist logic ([filtering](https://trivy.dev/latest/docs/configuration/filtering/)) is handled by Trivy, not Prowler.
* Results are output in the same formats as other Prowler providers (CSV, JSON-OCSF, HTML), plus [SARIF](https://docs.prowler.com/user-guide/cli/tutorials/reporting.md#sarif-iac-only) for GitHub Code Scanning integration.

## Prowler Cloud

[Added in: 
5.14.0](https://github.com/prowler-cloud/prowler/releases/tag/5.14.0)

> [!NOTE]
>
> This guide applies to
>
> . See [Prowler product families](https://docs.prowler.com/getting-started/products.md).

### Supported Scanners

Scanner selection is not configurable in Prowler Cloud. Default scanners, misconfig and secret, run automatically during each scan.

### Step 1: Access Prowler Cloud

1. Sign in to [Prowler Cloud](https://cloud.prowler.com/sign-in) or [create an account](https://cloud.prowler.com/sign-up)

2. Go to "Configuration" > "Providers"

   ![Providers Page](https://mintcdn.com/prowler/yyJURFHpPIAaK8F3/images/prowler-app/cloud-providers-page.png?fit=max\&auto=format\&n=yyJURFHpPIAaK8F3\&q=85\&s=aa592727864e8328ab2574708df74d34)

3. Click "Add Provider"

   ![Add a Provider](https://mintcdn.com/prowler/yyJURFHpPIAaK8F3/images/prowler-app/add-cloud-provider.png?fit=max\&auto=format\&n=yyJURFHpPIAaK8F3\&q=85\&s=793e5a073e1a037e453df158ad7b854d)

4. Select "Infrastructure as Code"

   ![Select Infrastructure as Code](https://mintcdn.com/prowler/yyJURFHpPIAaK8F3/images/providers/select-iac.png?fit=max\&auto=format\&n=yyJURFHpPIAaK8F3\&q=85\&s=d5151cee71f5bd0c46f5595f18af6960)

5. Add the Repository URL and an optional alias, then click "Next"

   ![Add IaC Repository URL](https://mintcdn.com/prowler/yyJURFHpPIAaK8F3/images/providers/add-iac-repo.png?fit=max\&auto=format\&n=yyJURFHpPIAaK8F3\&q=85\&s=a5dc3a5ca2d4c587338374aee1861a50)

### Step 2: Enter Authentication Details

6. Optionally provide the [authentication](https://docs.prowler.com/user-guide/providers/iac/authentication.md) details for private repositories, then click "Next"

   ![IaC Authentication](https://mintcdn.com/prowler/yyJURFHpPIAaK8F3/images/providers/iac-authentication.png?fit=max\&auto=format\&n=yyJURFHpPIAaK8F3\&q=85\&s=f59703ae2c47332315b76ac4ba64b619)

### Step 3: Verify Connection & Start Scan

7. Review the provider configuration and click "Launch scan" to initiate the scan

   ![Verify Connection & Start Scan](https://mintcdn.com/prowler/yyJURFHpPIAaK8F3/images/providers/iac-verify-connection.png?fit=max\&auto=format\&n=yyJURFHpPIAaK8F3\&q=85\&s=13700bd997b871af7a4831f0fac7279b)

## Prowler CLI

[Added in: 
5.8.0](https://github.com/prowler-cloud/prowler/releases/tag/5.8.0)

### Supported Scanners

Prowler CLI supports the following scanners:

* [Vulnerability](https://trivy.dev/docs/latest/guide/scanner/vulnerability/)
* [Misconfiguration](https://trivy.dev/docs/latest/guide/scanner/misconfiguration/)
* [Secret](https://trivy.dev/docs/latest/guide/scanner/secret/)
* [License](https://trivy.dev/docs/latest/guide/scanner/license/)

By default, only misconfiguration and secret scanners run during a scan. To specify which scanners to use, refer to the [Specify Scanners](#specify-scanners) section below.

### Usage

Use the `iac` argument to run Prowler with the IaC provider. Specify the directory or repository to scan, frameworks to include, and paths to exclude.

#### Scan a Local Directory (default)

```sh theme={null}
prowler iac --scan-path ./my-iac-directory
```

#### Scan a Remote GitHub Repository

```sh theme={null}
prowler iac --scan-repository-url https://github.com/user/repo.git
```

##### Authentication for Remote Private Repositories

Authentication for private repositories can be provided using one of the following methods:

* **GitHub Username and Personal Access Token (PAT):**
  ```sh theme={null}
  prowler iac --scan-repository-url https://github.com/user/repo.git \
    --github-username <username> --personal-access-token <token>
  ```
* **GitHub OAuth App Token:**
  ```sh theme={null}
  prowler iac --scan-repository-url https://github.com/user/repo.git \
    --oauth-app-token <oauth_token>
  ```
* If not provided via CLI, the following environment variables will be used (in order of precedence):
  * `GITHUB_OAUTH_APP_TOKEN`
  * `GITHUB_USERNAME` and `GITHUB_PERSONAL_ACCESS_TOKEN`
* If neither CLI flags nor environment variables are set, the scan will attempt to clone without authentication or using the credentials provided in the [git URL](https://git-scm.com/docs/git-clone#_git_urls).

##### Mutually Exclusive Flags

* `--scan-path` and `--scan-repository-url` are mutually exclusive. Only one can be specified at a time.

#### Specify Scanners

To run only specific scanners, use the `--scanners` flag. For example, to scan only for vulnerabilities and misconfigurations:

```sh theme={null}
prowler iac --scan-path ./my-iac-directory --scanners vuln misconfig
```

#### Exclude Paths

```sh theme={null}
prowler iac --scan-path ./my-iac-directory --exclude-path ./my-iac-directory/test ./my-iac-directory/examples
```

### Output

Use the standard Prowler output options. The IaC provider also supports [SARIF](https://docs.prowler.com/user-guide/cli/tutorials/reporting.md#sarif-iac-only) output for GitHub Code Scanning integration:

```sh theme={null}
prowler iac --scan-path ./iac --output-formats csv json-ocsf html
```

#### SARIF Output

[Added in: 
5.25.0](https://github.com/prowler-cloud/prowler/releases/tag/5.25.0)

To generate SARIF output for integration with SARIF-compatible tools:

```sh theme={null}
prowler iac --scan-repository-url https://github.com/user/repo -M sarif
```

See the [SARIF reporting documentation](https://docs.prowler.com/user-guide/cli/tutorials/reporting.md#sarif-iac-only) for details on the format and severity mapping.


## Related topics

- [Getting Started with the Image Provider](https://docs.prowler.com/user-guide/providers/image/getting-started-image.md)
- [Basic Usage](https://docs.prowler.com/getting-started/basic-usage/prowler-cli.md)
- [Getting Started with Kubernetes](https://docs.prowler.com/user-guide/providers/kubernetes/getting-started-k8s.md)
- [IaC Authentication in Prowler](https://docs.prowler.com/user-guide/providers/iac/authentication.md)
- [Getting Started With Okta on Prowler](https://docs.prowler.com/user-guide/providers/okta/getting-started-okta.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.