secrets-and-logging-hygiene
Skill42 starsChanged 10 months agoApache-2.0View on GitHub
Workflow for preventing secret leaks and sensitive logging (PII/credentials) and adding redaction defaults.
In this repository10 other files it gives its agents.
- copilot-instructions.mdCopilot instructions
- .github/copilot-instructions.mdCopilot instructions
- markdown-customizationsSkill
- access-control-reviewSkill
- dependency-cve-triageSkill
- genai-acceptance-reviewSkill
- input-validation-hardeningSkill
- secure-code-reviewSkill
- secure-fix-validationSkill
- threat-modelSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Use this skill when asked to scan for secrets, harden logging, or reduce sensitive data exposure.
- Distinctive: line 28
Default to structured logs
- Distinctive: line 30
Avoid logging full request/response bodies by default
- Distinctive: line 33
Add guardrails: git hooks, CI secret scanning, unit tests for redaction
- Distinctive: line 35
Add tests ensuring redaction occurs
- Distinctive: line 36
Run a lightweight grep for common secret patterns and known keys
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Secrets and Logging Hygiene
When to use
Use this skill when asked to scan for secrets, harden logging, or reduce sensitive data exposure.
Inputs to collect (if available)
- Data classification (PII, auth/session, payments)
- Logging/telemetry stack (logger, APM, sinks)
- Secret management approach (vault, env injection, KMS)
- Incident/audit requirements (retention, access controls)
Step-by-step process
- Identify sensitive data
- Credentials, tokens, API keys, connection strings
- PII (emails, phone, addresses), financial identifiers
- Locate sources and sinks
- Sources: env, config, secrets managers, request payloads
- Sinks: logs, telemetry, error pages, analytics, support dumps
- Harden logging
- Default to structured logs
- Redact known patterns (Authorization headers, cookies, tokens)
- Avoid logging full request/response bodies by default
- Prevent secret introduction
- Replace hardcoded strings with env/secret manager references
- Add guardrails: git hooks, CI secret scanning, unit tests for redaction
- Verify
- Add tests ensuring redaction occurs
- Run a lightweight grep for common secret patterns and known keys
Output
- List of leak points found (if any)
- Recommended redaction policy + implementation location
- Tests and verification steps
Repo integration (optional)
Related prompts:
check-for-secrets.prompt.mdassess-logging.prompt.md
Output format
- Leak points found (table): Type | Where | Evidence | Risk
- Redaction policy: defaults + allow-listed fields
- Guardrails: CI secret scanning, pre-commit, tests
- Verification: how to confirm redaction and rotation
Examples
- “Authorization header logged” → redact
Authorizationand cookies by default; verify logs no longer contain bearer tokens.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

