Use the Drata Compliance as Code action to scan for infrastructure-as-code findings in your pipeline. By utilizing this GitHub action in your workflow, you can automatically start to find, fix and monitor for compliance related configuration errors in Terraform.
Using this Action provides the following features:
- App Security Design
- Infrastructure-as-Code Security Checks
- Automated Security Design Integration
- Security Design Enforcement
- Security Design Change Management
- Out of the box compliance regulations including: SOC 2, PCI DSS, ISO 27001, GDPR, CCPA HIPAA, HI TECH, State Regulations, NIS SP 800- 53
To run a scan on your code, you need access to Drata platform.
The following is an example GitHub Actions workflow:
on: push
jobs:
drata-iac-scan:
runs-on: ubuntu-latest
name: compliance-as-code-action
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Drata Github Action
id: drata
uses: drata/[email protected]
env:
DRATA_API_TOKEN: ${{ secrets.DRATA_IAC_PIPELINE_KEY }}
GITHUB_REPOSITORY: $GITHUB_REPOSITORY
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
minimumSeverity: 'CRITICAL'
minimumSeverity
- (Required) The threshold at which a detected findings will cause your workflow to fail. One ofnone
,low
,moderate
,high
, orcritical
.workspaceId
- (Optional) Your Drata platform workspace Id. Defaults to 1.region
- (Optional) Your Drata platform region. One of 'US' or 'EU'. Defaults to 'US'.verboseLogging
- (Optional) An indicator of whether you'd like any detected findings output to the GitHub Actions build log. Defaults tofalse
.timeoutSeconds
- (Optional) Time in seconds to wait for Drata tests to complete before failing. Defaults to600
DRATA_API_TOKEN
- (Required) This is the API key for your Drata Compliance as Code action workflow. The pipeline key can be created in DrataGITHUB_REPOSITORY
: $GITHUBREPOSITORY - **(Optional)_** Your GitHub Repository referenced in the Pipeline.GITHUB_TOKEN
: ${{ secrets.GITHUB_TOKEN }} - (Optional) Your GitHub Token.- Platform.
This project is released under the Apache 2.0 License.