# Policy Driven PRs

{% hint style="warning" %}
**Available for Enterprise Tier only**
{% endhint %}

This allows you to automate security remediation across your repositories by either creating GitHub Issues to track vulnerabilities or automatically generating Pull Requests to fix them.

With this setting, you can configure how StepSecurity responds when security misconfigurations or vulnerabilities are detected in your workflows or repositories.

<figure><img src="https://754495266-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQJRZY4cfEeY3I7DXTOCp%2Fuploads%2FpogPFagnaxVqzinYLD24%2FScreenshot%202025-05-14%20at%2008.18.13.png?alt=media&#x26;token=60ffe978-3b6e-44eb-a447-57197f227a11" alt=""><figcaption><p>Policy-based PRs page</p></figcaption></figure>

### Remediation Options

Choose how StepSecurity should remediate the vulnerabilities:

* **Pull Requests**: Automatically generates PRs that fix security issues (e.g., hardening actions, updating tags).&#x20;

{% embed url="https://app.storylane.io/share/fqqaobdwgodp" %}

**GitHub Issues**: Automatically creates GitHub Issues to track and discuss detected security vulnerabilities.

### Controls

These controls enable automatic detection and remediation of specific risks:

* **Harden GitHub-Hosted Runner**: Ensures [Harden-Runner](../harden-runner) is installed on GitHub-hosted runners to:
  * Prevent exfiltration of credentials
  * Monitor the build process
  * Detect compromised dependencies
* **Pin Actions to Full-Length Commit SHA**: GitHub Action tags and Docker tags are mutable, which poses a security risk. GitHub’s Security Hardening Guide recommends pinning actions to full-length commit SHAs for better security.
  * You can exempt specific actions using the Exempted Actions input (e.g., actions/checkout@v3 or actions/\*).
* **Restrict GitHub Token Permissions**: GitHub Actions workflows have read/write permissions by default, which can pose a security risk. It is recommended to restrict permissions to the minimum required.
* **Replace third party actions with StepSecurity maintained actions:** Use secure, audited GitHub actions maintained by StepSecurity to reduce supply chain risks.
* **Enable GitHub Advanced Security Alerts**: Provides additional security alerts alongside GitHub Issues, helping to identify and address vulnerabilities more effectively.

### Repository Selection

{% hint style="info" %}
Once you enable this feature on your repositories, automated Issues/Pull Requests should appear within 24 hours
{% endhint %}

Specify which repositories should use this configuration by selecting them from the list.

You can search for repositories and apply the configuration individually by checking the corresponding box under Configuration Applied.

<figure><img src="https://754495266-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQJRZY4cfEeY3I7DXTOCp%2Fuploads%2FcIg9b8LoxY4OyZog1Zze%2FScreenshot%202025-05-28%20at%2006.50.43.png?alt=media&#x26;token=78bf8312-5aaa-43b9-b534-8e8d9d3c8c45" alt=""><figcaption><p>Repository Selection for Policy Driven PRs</p></figcaption></figure>
