Hardcoded Secrets in Makefiles

Detects API keys, tokens, and passwords hardcoded in Makefile targets and variables.

zakirkun Updated

File contents

Hardcoded Secrets in Makefiles

Overview

Makefiles often contain deployment commands that require credentials. These credentials hardcoded in Makefiles are committed to version control and visible in CI/CD logs.

Remediation

  • Use environment variables for all credentials: $(API_KEY) from shell environment
  • Use .env files loaded before make commands (not committed)
  • Use vault agents or cloud secrets in production pipelines

zakirkun/ice-tea/tree/main/skills/devops/makefile-secrets commit 80c21e5844

Frequently asked questions

npx skillmds@latest add zakirkun/hardcoded-secrets-in-makefiles