Scope the PR private-key check to first-party sources
The documentation- and workflow-only PR checks grepped every tracked file for private-key headers, so the test fixtures inside vendored upstream crates (openssl, rustls-pemfile, aws-lc) failed every such PR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -42,7 +42,9 @@ jobs:
|
||||
run: |
|
||||
base="$(git merge-base HEAD "origin/$GITHUB_BASE_REF")"
|
||||
git diff --check "$base" HEAD
|
||||
if git grep -nIE '^[[:space:]]*-----BEGIN (RSA |EC |OPENSSH )?PRIVATE KEY-----[[:space:]]*$' --; then
|
||||
# Vendored upstream trees carry their own test-fixture keys (openssl,
|
||||
# rustls-pemfile, aws-lc); only first-party sources are checked.
|
||||
if git grep -nIE '^[[:space:]]*-----BEGIN (RSA |EC |OPENSSH )?PRIVATE KEY-----[[:space:]]*$' -- ':!vendor' ':!thirdparty'; then
|
||||
echo "private key material found in tracked source" >&2
|
||||
exit 1
|
||||
else
|
||||
@@ -74,7 +76,9 @@ jobs:
|
||||
for script in ci/*.sh; do bash -n "$script"; done
|
||||
base="$(git merge-base HEAD "origin/$GITHUB_BASE_REF")"
|
||||
git diff --check "$base" HEAD
|
||||
if git grep -nIE '^[[:space:]]*-----BEGIN (RSA |EC |OPENSSH )?PRIVATE KEY-----[[:space:]]*$' --; then
|
||||
# Vendored upstream trees carry their own test-fixture keys (openssl,
|
||||
# rustls-pemfile, aws-lc); only first-party sources are checked.
|
||||
if git grep -nIE '^[[:space:]]*-----BEGIN (RSA |EC |OPENSSH )?PRIVATE KEY-----[[:space:]]*$' -- ':!vendor' ':!thirdparty'; then
|
||||
echo "private key material found in tracked source" >&2
|
||||
exit 1
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user