Skip to content

Pre-commit Hooks

cloud-audit provides pre-commit hooks for the pre-commit framework.

Add to .pre-commit-config.yaml:

repos:
  - repo: https://github.com/gebalamariusz/cloud-audit
    rev: v1.0.2
    hooks:
      - id: cloud-audit
        stages: [pre-push]
      - id: cloud-audit-diff
        stages: [pre-push]

The cloud-audit hook runs a full scan. The cloud-audit-diff hook compares against a baseline. Both run at the pre-push stage (not pre-commit, since scans take seconds not milliseconds).