GitHub Actions cache poisoning risk — should we pin cache keys to commit hashes?
Security audit flagged our GitHub Actions workflows. We use actions/cache with key patterns like node-modules-${{ hashFiles('package-lock.json') }}. Concern: a malicious PR could modify package-lock.json to poison the cache for subsequent runs. We could pin to ${{ github.sha }} but that defeats cache sharing across PRs. What's the practical risk and what are real mitigation strategies?