Skip to content

Commit dd54c01

Browse files
Zie619claude
andcommitted
fix(ci): scope policy gate scan to src/ to avoid demo key false positives
The policy-gate job was failing because it scanned the entire repo including examples/ and tests/ which contain intentional demo API keys. Scoping to src/ gives a clean pass while still demonstrating the feature. Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 parent 2c25f8d commit dd54c01

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

.github/workflows/ai-bom-example.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,20 +71,18 @@ jobs:
7171
# ──────────────────────────────────────────────
7272
# Job 4: Policy gate — fail on high severity
7373
# ──────────────────────────────────────────────
74-
# Note: This job intentionally uses continue-on-error because the ai-bom
75-
# repo itself contains demo/test API keys (sk-demo*) that trigger
76-
# the high-severity gate. In your own repo, remove continue-on-error
77-
# to enforce the policy gate as a hard failure.
74+
# Scans only src/ to avoid demo/test API keys in examples/ and tests/.
75+
# In your own repo, use path: "." to scan the full codebase.
7876
policy-gate:
7977
name: Security policy gate
8078
runs-on: ubuntu-latest
81-
continue-on-error: true
8279
steps:
8380
- uses: actions/checkout@v4
8481

8582
- name: Run AI-BOM scan with policy
8683
uses: trusera/ai-bom@main
8784
with:
85+
path: "src"
8886
format: "table"
8987
fail-on: "high"
9088
scan-level: "deep"

0 commit comments

Comments
 (0)