Guard against committed credentials: ignore secret files, secret scan in CI
This commit is contained in:
1 parent
6aa398c2e9
commit
21e63089b9
2 files changed
+15
No files matched your search
@@ -15,6 +15,11 @@ jobs:
|
||||
- uses: astral-sh/setup-uv@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python }}
|
||||
- name: Secret scan (no cloud keys or private keys in the repository)
|
||||
run: |
|
||||
if git grep -nIE '(AKIA|ASIA)[A-Z0-9]{16}|aws_secret_access_key *=|BEGIN [A-Z ]*PRIVATE KEY'; then
|
||||
echo "::error::credential-like content found"; exit 1
|
||||
fi
|
||||
- name: Install
|
||||
# setup-uv >= 5.x already creates and activates .venv when python-version is set; --clear works either way
|
||||
run: uv venv --clear && uv pip install -e ".[dev]"
|
||||
|
||||
Reference in new issue
Block a user