From c17dcfb734b925a17e557eac660595c5be20affc Mon Sep 17 00:00:00 2001 From: Claude Code Date: Tue, 28 Apr 2026 08:50:07 -0500 Subject: [PATCH] fix(compliance): disable false positive reusable-workflow-path-duplicate-github check The check incorrectly flagged petry-projects/.github/.github/workflows/ as invalid, but this is the CORRECT pattern per GitHub's reusable workflow syntax: - First .github = repository name - Second .github/workflows = directory path within that repository This check was producing false positives across all repos: - petry-projects/TalkTerm (issues #131, #130, #129) - petry-projects/broodly (issues #159, #158) - petry-projects/google-app-scripts (issues #226, #225) - petry-projects/ContentTwin (issues #111, #110) - petry-projects/markets (issues #137, #136) - petry-projects/bmad-bgreat-suite (issues #123, #122) Disable the check to reduce compliance audit noise and prevent auto-issue creation for valid patterns. Co-Authored-By: Claude Haiku 4.5 --- scripts/compliance-audit.sh | 43 +++++++++---------------------------- 1 file changed, 10 insertions(+), 33 deletions(-) diff --git a/scripts/compliance-audit.sh b/scripts/compliance-audit.sh index f3d149778..241e1f6bf 100755 --- a/scripts/compliance-audit.sh +++ b/scripts/compliance-audit.sh @@ -220,42 +220,19 @@ check_action_pinning() { } # --------------------------------------------------------------------------- -# Check: Reusable workflow path syntax (no duplicate .github/ segments) +# Check: Reusable workflow path syntax # --------------------------------------------------------------------------- +# NOTE: The correct pattern IS petry-projects/.github/.github/workflows/... +# because the first .github is the repository name, and the second .github +# is the directory path within that repository. This check is disabled as +# a known false positive per petry-projects/.github standards. +# +# Reference: https://docs.github.com/en/actions/using-workflows/reusing-workflows +# Example: uses: petry-projects/.github/.github/workflows/claude-code-reusable.yml@v1 check_reusable_workflow_paths() { local repo="$1" - - # List workflow files - local workflows - workflows=$(gh_api "repos/$ORG/$repo/contents/.github/workflows" --jq '.[].name' 2>/dev/null || echo "") - - for wf in $workflows; do - [[ "$wf" != *.yml && "$wf" != *.yaml ]] && continue - - local content - content=$(gh_api "repos/$ORG/$repo/contents/.github/workflows/$wf" --jq '.content' 2>/dev/null || echo "") - [ -z "$content" ] && continue - - local decoded - decoded=$(echo "$content" | base64 -d 2>/dev/null || echo "") - [ -z "$decoded" ] && continue - - # Check for incorrect path with duplicate .github/ segment - # INCORRECT: petry-projects/.github/.github/workflows/... - # CORRECT: petry-projects/.github/workflows/... - local bad_paths - bad_paths=$(echo "$decoded" | grep -E 'uses:[[:space:]]*petry-projects/\.github/\.github/workflows/' || true) - - if [ -n "$bad_paths" ]; then - local count - count=$(echo "$bad_paths" | wc -l | tr -d ' ') - local examples - examples=$(echo "$bad_paths" | head -2 | sed 's/^[[:space:]]*//' | paste -sd ', ' -) - add_finding "$repo" "workflow-syntax" "reusable-workflow-path-duplicate-github" "error" \ - "CRITICAL: Workflow \`$wf\` has $count reusable workflow reference(s) with incorrect path syntax (path does not exist). This causes the workflow to FAIL at runtime. MUST be fixed. Change from: \`petry-projects/.github/.github/workflows/\` Change to: \`petry-projects/.github/workflows/\` (remove the first .github/ — the second is the path within the repo)" \ - "standards/ci-standards.md#action-pinning-policy" - fi - done + # This check is intentionally disabled — the double .github/ pattern is correct + return 0 } # ---------------------------------------------------------------------------