agentleFS
awarexoneawarexone/AXguard/secrets-detection/SKILL.md

secrets-detection

Skill18 starsChanged 3 months agoMITView on GitHub

Find and triage hard-coded secrets, tokens, and credentials in source and build artifacts before ship (CWE-798 / A07:2021 adjacent).

  • Reads credentials

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    After axguard secrets.* hits

    line 39
  2. Very specific:

    Run axguard scan / audit; collect secrets.*.

    line 49
  3. Distinctive:

    If real: treat as incident — rotate first, then remove from git history if needed.

    line 52
  4. Distinctive:

    Check build artifacts and client bundles, not only server source.

    line 53
  5. Distinctive:

    Remove secret; rotate at provider

    line 69
  6. Distinctive:

    Add pre-commit secret scanning

    line 71
  7. Distinctive:

    Ensure CI does not echo secrets

    line 72

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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 Detection

Purpose

Detect credentials committed to repositories or artifacts and drive safe rotation + removal workflows.

When to Use

  • Pre-ship / PR review
  • After axguard secrets.* hits
  • Incident suspicion of leaked keys

When Not to Use

  • Scanning systems without authorization
  • Printing full live secrets into chat/logs (always redact)

Analysis Workflow

  1. Run axguard scan / audit; collect secrets.*.
  2. Classify: cloud keys, GitHub/Slack tokens, PEM private keys, generic API keys.
  3. Decide if value is a real secret vs fixture/example (EXAMPLE, changeme, obviously fake).
  4. If real: treat as incident — rotate first, then remove from git history if needed.
  5. Check build artifacts and client bundles, not only server source.

Evidence Requirements

  • File:line
  • Secret class (not full value)
  • Whether it appears active (best-effort; do not exercise stolen creds against third parties)

False Positive Controls

  • Documented placeholders in fixtures
  • Public test keys clearly marked
  • .env.example with empty values

Remediation

  • Remove secret; rotate at provider
  • Load via env / secret manager
  • Add pre-commit secret scanning
  • Ensure CI does not echo secrets

Verification

Confirm file gone, rotation done, axguard no longer flags the live material, history cleaned if it was committed.

Framework Mapping

  • CWE-798
  • OWASP A07:2021 (auth failures — credential exposure contributes)

References

Research Provenance

Primary: CWE-798; OWASP Top 10:2021 A07 (2026-09-15).
Internal: AXGuard rules/secrets.json.

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.