skills
gitlabProduction-ready agent skills, automation recipes, and developer workflows for AI coding assistants.
clone
https://gitlab.com/bitzzdev/skills.gitAntigravityWorkflowsagent-skillsai-agentsautomationcoding-assistantprompt-engineering
---name: credential-safetydescription: Prevents agents from committing or pushing API keys, passwords, tokens, private keys, certificates, or other credentials to remote repositories. Use before commits, pushes, releases, and whenever configuration or authentication code changes.---# Credential SafetyKeep secrets out of commits and remote repositories. Treat the currentworktree, index, commit history, and remote branch state as separate surfacesthat must be checked before pushing.## Check for skill folder updatesBefore applying this skill, check whether the skill folder has updates:1. Identify the directory where this skill is installed (such as `~/.copilot/skills/`, `~/.gemini/antigravity-cli/skills/`, `~/.claude/skills/`, or the active repository).2. If the folder is inside a git repository, check git status:```bashgit -C <skill-folder> status --short --branch```3. When network access is available, check for upstream changes:```bashgit -C <skill-folder> fetch --dry-run```4. If updates are available, pull them before proceeding so you use the latest instructions. If the folder is not a git repository, proceed with the installed files.## Inspect before committing or pushing- Read repository instructions and identify the intended secret-managementmethod, such as environment variables, ignored local files, or a secretmanager.- Inspect staged, unstaged, and untracked files. Check filenames and contentfor API keys, access tokens, passwords, connection strings, session cookies,private keys, certificates, signing files, cloud credential files, andproduction configuration.- Check the commits being pushed, not only the current working tree. A secretin an earlier commit is still exposed when that commit is reachable from theremote branch.- Use available repository-approved secret scanners and review their fullresults. If no scanner is available, use targeted searches and inspectsuspicious files without printing complete credential values.- Check ignore rules for local secret files. Do not treat `.gitignore` asproof that a file is safe if it is already tracked.## What to do when a secret is found- Stop the commit or push. Do not work around a scanner finding by weakeningpatterns, hiding output, or adding the file to an allowlist without review.- Remove the secret from the change and replace it with a documentedplaceholder or environment-based configuration.- Revoke or rotate any exposed credential before continuing. Removing a valuefrom the latest file does not invalidate a credential already present inhistory or logs.- If the secret exists in reachable history, explain the exposure and use therepository's approved history-rewrite process only with explicitauthorization. Coordinate force-pushes and verify every affected remotebranch afterward.- Never paste full secrets into chat, commit messages, issue comments, logs, orreports. Identify the file, type, and remediation state without exposing thevalue.## Push gateBefore any remote push, verify that:1. The staged diff contains no credentials.2. The commits being pushed contain no credentials.3. Secret files are ignored and not tracked unless the repository explicitlyrequires a safe, non-secret template.4. The scanner result and manual review cover the complete push range.5. Any finding is resolved, rotated, and documented before proceeding.Do not claim a push is safe because tests pass, the scanner was not installed,or no obvious secret was noticed. Report missing tooling or incomplete coverageas an unresolved blocker.## Required responseReport the files and commit range checked, the scanner or searches used, theresult, any finding and rotation status without revealing secret values, andwhether the push is safe, blocked, or not yet checked.