secrets-configuration
Skill11 starsChanged 11 days agoMITView on GitHub
Use when managing API keys, credentials, signing keys, environment configuration, secret rotation, CI/CD variables, or preventing sensitive data exposure.
- Reads credentials
In this repository46 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- accessibility-automationSkill
- accessibility-reviewSkill
- accessible-componentsSkill
- accessible-motionSkill
- animation-performanceSkill
- anti-slop-uiSkill
- api-securitySkill
- authentication-sessionsSkill
- authorization-access-controlSkill
- component-engineeringSkill
- core-web-vitalsSkill
- design-directionSkill
- design-system-architectureSkill
- document-head-seoSkill
- font-performanceSkill
- forms-and-validationSkill
- frontend-architectureSkill
- gsap-fundamentalsSkill
- icon-engineeringSkill
- image-asset-optimizationSkill
- independent-reviewSkill
- interactive-storytellingSkill
- javascript-performanceSkill
- keyboard-focusSkill
- modern-cssSkill
- motion-design-systemsSkill
- network-cachingSkill
- performance-auditingSkill
- performance-testingSkill
- premium-landing-pagesSkill
- quickstart-onboardingSkill
- rendering-performanceSkill
- responsive-engineeringSkill
- screen-reader-testingSkill
- scrolltrigger-experiencesSkill
- secure-application-designSkill
- secure-input-outputSkill
- security-reviewSkill
- security-testingSkill
- semantic-accessibilitySkill
- visual-design-reviewSkill
- visual-reference-analysisSkill
- wcag-auditingSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 10 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 10
Keep credentials out of source, client bundles, logs and build artifacts.
- Distinctive: line 15
Use a managed secret store or platform-provided encrypted secret facility appropriate to the deployment.
- Distinctive: line 18
Never commit secrets, paste them into issue comments, expose them in frontend variables or include them in screenshots and logs.
- Distinctive: line 19
Use short-lived credentials and workload identity federation where supported instead of long-lived static keys.
- Very specific: line 27
Use GITHUB_TOKEN with explicit job-level permissions for repository operations where possible.
- Distinctive: line 30
Avoid printing secrets or enabling shell tracing around sensitive steps.
- Distinctive: line 32
Treat pull-request code from forks as untrusted.
- Distinctive: line 33
Prefer OIDC federation for cloud deployments when supported.
- Distinctive: line 37
If a secret is exposed:
- Distinctive: line 41
Remove the secret from active code and configuration, then assess repository history and artifacts.
- Distinctive: line 42
Document the incident, remediation and follow-up controls.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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 Secure Configuration
Objective
Keep credentials out of source, client bundles, logs and build artifacts. Make secret access narrow, auditable and revocable.
Workflow
- Inventory secrets, owners, consumers, environments, scopes, expiry and rotation procedures.
- Use a managed secret store or platform-provided encrypted secret facility appropriate to the deployment.
- Give each service and workflow only the credentials it requires.
- Separate development, test, staging and production credentials.
- Never commit secrets, paste them into issue comments, expose them in frontend variables or include them in screenshots and logs.
- Use short-lived credentials and workload identity federation where supported instead of long-lived static keys.
- Rotate credentials after suspected exposure, personnel changes or scope changes; verify old credentials are revoked.
- Redact credentials and sensitive values from application logs, traces, analytics and error reports.
- Review configuration defaults for debug mode, permissive CORS, verbose errors, default passwords and exposed administrative endpoints.
GitHub Actions guidance
- Set workflow permissions to the minimum required, preferably read-only by default.
- Use GITHUB_TOKEN with explicit job-level permissions for repository operations where possible.
- Store required credentials in GitHub Actions secrets or environments; never hardcode them in workflow YAML.
- Pin third-party actions to reviewed full commit SHAs.
- Avoid printing secrets or enabling shell tracing around sensitive steps.
- Restrict deployment secrets with environment protection rules when available.
- Treat pull-request code from forks as untrusted; do not expose write-capable secrets to untrusted workflows.
- Prefer OIDC federation for cloud deployments when supported.
Incident response
If a secret is exposed:
- Revoke or rotate it immediately; deleting the visible text is not sufficient.
- Identify scope, permissions, usage and potential access during the exposure window.
- Review provider audit logs and affected systems.
- Remove the secret from active code and configuration, then assess repository history and artifacts.
- Document the incident, remediation and follow-up controls.
Completion criteria
Secrets have named owners and least-privilege scopes, production values are not present in client or repository content, rotation is tested, and CI workflows do not expose credentials to untrusted code.
Common AI failure mode
Failure: An agent moves a credential from source code into an environment variable and calls the system secret-safe without checking how the value is injected, exposed to build steps, logged, bundled, or made available to untrusted CI jobs.
Why it matters: Environment variables are a delivery mechanism, not a security boundary. A secret can still leak through frontend build-time substitution, debug output, process dumps, artifacts, overly broad workflow permissions, fork pull requests, or long-lived credentials. Once exposed, deleting the visible line does not revoke the credential or remove copies from history and artifacts.
Prevention: Classify each value as public configuration or secret; never inject secrets into browser bundles or client-visible build variables. Do not place bearer, access or refresh tokens in script-accessible browser storage such as localStorage or sessionStorage. For browser sessions, use Secure, HttpOnly, appropriately SameSite cookies when supported. Never expose tokens through URLs, logs, analytics, error reports or telemetry. Use a managed secret store or protected CI secret with least-privilege scope, short lifetime where supported, and environment/job restrictions. Do not expose secrets to untrusted fork code or print them in logs; review artifact and cache contents. On suspected exposure, revoke/rotate first, then inspect repository history, workflow logs, artifacts, deployments, and provider audit logs. Verify the deployed output contains no secret and test rotation and access boundaries.
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.

