security: add credential patterns to .gitignore + SECURITY.md#5521
security: add credential patterns to .gitignore + SECURITY.md#5521k4w1992-lgtm wants to merge 1 commit intogoogle:mainfrom
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
Response from ADK Triaging Agent Hello @k4w1992-lgtm, thank you for your contribution! To help us review your PR, could you please add a Additionally, it looks like the Contributor License Agreement (CLA) check has failed. Please ensure you have signed the CLA, which is a requirement for us to accept your contribution. You can find more information in the "Details" link of the Thank you! |
|
I have signed the CLA |
- Adds common credential file patterns to .gitignore (*.pem, *.key, .env, credentials.json, etc.) - Adds SECURITY.md with credential handling guidance and pre-commit check instructions Refs: Google OSS VRP Issue #504158909 Closes: google#5520 Reported-by: k4w_wak (k4w1992@gmail.com)
Summary
This PR adds security hardening to prevent future credential leaks, following the discovery of a hardcoded OAuth token in the repository (Google OSS VRP Issue #504158909).
Changes
.gitignore: Added common credential file patterns (*.pem,*.key,.env,credentials.json, etc.)SECURITY.md: New security policy with credential handling guidance and pre-commit check instructionsWhy
A Google OAuth access token was previously committed to this repository. While it has since been redacted, this PR prevents similar incidents by:
Testing Plan
.gitignorepatterns block credential files:echo "test" > test.pem && git add test.pem→ file is ignored.envfiles are ignored:echo "KEY=val" > .env && git add .env→ file is ignoredcredentials.jsonpattern matches:echo "{}" > credentials.json && git add credentials.json→ file is ignoredecho "code" > main.py && git add main.py→ file is tracked normallySECURITY.mdrenders correctly in GitHub markdown preview.gitignore(ignore rules) andSECURITY.md(documentation) modifiedRelated