Interview Prep/DevSecOps/Application Security Testing (SAST, DAST, SCA, Secrets)

What are pre-commit hooks and what security checks suit them?

BeginnerConceptApplication Security Testing (SAST, DAST, SCA, Secrets)
Answer

Pre-commit hooks run scripts before a commit is created. The pre-commit framework manages them from .pre-commit-config.yaml.

repos:
  - repo: https://github.com/gitleaks/gitleaks
    rev: v8.18.4
    hooks:
      - id: gitleaks

Good fits: secret detection, large-file checks, Terraform fmt/validate, tfsec/Checkov on changed files. Keep them under a few seconds or developers will skip them.

All DevSecOps questions Roadmap: Security in the pipeline

More on Application Security Testing (SAST, DAST, SCA, Secrets)