From e6e45ffca4abc66f9f33ac232150b11010f63ee8 Mon Sep 17 00:00:00 2001 From: Ponshu Developer Date: Mon, 16 Feb 2026 09:58:30 +0900 Subject: [PATCH] fix: Check git-tracked status instead of file existence for secrets check Co-authored-by: Cursor --- .github/workflows/quality_check.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/quality_check.yml b/.github/workflows/quality_check.yml index d80f943..f444e29 100644 --- a/.github/workflows/quality_check.yml +++ b/.github/workflows/quality_check.yml @@ -36,11 +36,11 @@ jobs: - name: Check for secret files run: | - if [ -f "lib/secrets.local.dart" ]; then - echo "secrets.local.dart found in repository! This file contains API keys and must not be committed." + if git ls-files --error-unmatch lib/secrets.local.dart 2>/dev/null; then + echo "ERROR: secrets.local.dart is tracked by git! This file contains API keys and must not be committed." exit 1 else - echo "secrets.local.dart is properly excluded" + echo "secrets.local.dart is properly excluded from git tracking" fi if grep -r "AIzaSy" lib/ --include="*.dart" 2>/dev/null; then echo "Possible API key found in source code!"