agentleFS
ViviBeriViviBeri/webcraft-pro/skills/secrets-configuration/SKILL.md

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

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
  1. Distinctive:

    Keep credentials out of source, client bundles, logs and build artifacts.

    line 10
  2. Distinctive:

    Use a managed secret store or platform-provided encrypted secret facility appropriate to the deployment.

    line 15
  3. Distinctive:

    Never commit secrets, paste them into issue comments, expose them in frontend variables or include them in screenshots and logs.

    line 18
  4. Distinctive:

    Use short-lived credentials and workload identity federation where supported instead of long-lived static keys.

    line 19
  5. Very specific:

    Use GITHUB_TOKEN with explicit job-level permissions for repository operations where possible.

    line 27
  6. Distinctive:

    Avoid printing secrets or enabling shell tracing around sensitive steps.

    line 30
  7. Distinctive:

    Treat pull-request code from forks as untrusted.

    line 32
  8. Distinctive:

    Prefer OIDC federation for cloud deployments when supported.

    line 33
  9. Distinctive:

    If a secret is exposed:

    line 37
  10. Distinctive:

    Remove the secret from active code and configuration, then assess repository history and artifacts.

    line 41
  11. Distinctive:

    Document the incident, remediation and follow-up controls.

    line 42

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Secrets and Secure Configuration

Objective

Keep credentials out of source, client bundles, logs and build artifacts. Make secret access narrow, auditable and revocable.

Workflow

  1. Inventory secrets, owners, consumers, environments, scopes, expiry and rotation procedures.
  2. Use a managed secret store or platform-provided encrypted secret facility appropriate to the deployment.
  3. Give each service and workflow only the credentials it requires.
  4. Separate development, test, staging and production credentials.
  5. Never commit secrets, paste them into issue comments, expose them in frontend variables or include them in screenshots and logs.
  6. Use short-lived credentials and workload identity federation where supported instead of long-lived static keys.
  7. Rotate credentials after suspected exposure, personnel changes or scope changes; verify old credentials are revoked.
  8. Redact credentials and sensitive values from application logs, traces, analytics and error reports.
  9. 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:

  1. Revoke or rotate it immediately; deleting the visible text is not sufficient.
  2. Identify scope, permissions, usage and potential access during the exposure window.
  3. Review provider audit logs and affected systems.
  4. Remove the secret from active code and configuration, then assess repository history and artifacts.
  5. 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.