hardcoded-secrets
Skill20 starsChanged 4 months agoMITView on GitHub
Detects API keys, passwords, tokens, and credentials embedded directly in
1 other project uses a version of this.
Adopted by
Most recently taken up by
- KaanBicaklar/mona-sast-skillstheir own version, first seen Jul 9, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- KaanBicaklar/mona-sast-skills★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository52 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- authentication-failuresSkill
- broken-access-controlSkill
- concurrency-correctnessSkill
- contract-reviewSkill
- cryptographic-failuresSkill
- crypto-library-misuseSkill
- csrfSkill
- exceptional-conditionsSkill
- excessive-agencySkill
- file-uploadSkill
- graphql-securitySkill
- header-injectionSkill
- hotspotsSkill
- injectionSkill
- insecure-designSkill
- insecure-local-storageSkill
- insecure-output-handlingSkill
- insecure-plugin-designSkill
- integrity-failuresSkill
- ipc-securitySkill
- llm-supply-chainSkill
- logging-failuresSkill
- mass-assignmentSkill
- mcp-securitySkill
- memory-api-misuseSkill
- model-dosSkill
- model-theftSkill
- multi-agent-trustSkill
- nosql-injectionSkill
- numeric-trust-boundarySkill
- oauth-implementationSkill
- open-redirectSkill
- overrelianceSkill
- path-traversalSkill
- privilege-handlingSkill
- prompt-injectionSkill
- prototype-pollutionSkill
- pr-reviewSkill
- race-conditionSkill
- rag-securitySkill
- redosSkill
- security-cleanupSkill
- security-misconfigurationSkill
- security-reviewSkill
- sensitive-disclosureSkill
- ssrfSkill
- supply-chainSkill
- threat-modelSkill
- token-smugglingSkill
- training-data-poisoningSkill
- unsafe-api-consumptionSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
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 46
Rotation does not require a code change: If rotating the credential means editing source and redeploying, the secret is effectively …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Hardcoded Secrets Security Check (CWE-798)
What this checks
Protects against credentials, API keys, and secrets embedded directly in source code. Hardcoded secrets end up in version control history, build artifacts, and container images. Once committed, secrets are effectively public — even if the commit is reverted, the secret remains in git history.
Vulnerable patterns
- String literal that resembles a production API key, access token, or session secret assigned to a constant
- Hardcoded password or shared-secret literal used as the only credential check
- Connection string with embedded username and password committed to source
- Private key material (PEM, PKCS#8, SSH) pasted inline as a string literal
- Cloud-provider access keys, OAuth client secrets, or webhook signing keys in source or config files
Fix immediately
Flag the hardcoded secret and explain the risk. Translate the principles below to the audited file's language and deployment environment — use that stack's documented secret loader, env-var helper, or secrets-manager client.
For each finding, establish these properties:
- Secrets are loaded from outside the source tree. Environment variable, secrets manager (AWS Secrets Manager, HashiCorp Vault, 1Password), KMS, or OS keystore. No string literal that resembles a real credential appears in source — not in code, not in config files, not in test fixtures.
- Missing secrets fail loudly at load time, not silently at first use. A required-env lookup with no fallback, a required-field check, or an early fatal log guarantees a misconfigured deploy crashes immediately rather than running with an empty string that mysteriously fails later.
- Test fixtures use obviously fake values — placeholder strings that read as "do not use" — that cannot be mistaken for production credentials and will never unlock a real service if leaked.
- Rotation does not require a code change. If rotating the credential means editing source and redeploying, the secret is effectively hardcoded even if it's technically loaded through a constant. Rotation happens by updating the external store and restarting.
Verification
- No string literal in the code resembles a production API key, password, token, private key, or connection string with embedded credentials
- All credentials are loaded from environment variables, secrets managers, or encrypted configuration — never from source code
- Test fixtures use obviously fake values that cannot be mistaken for real credentials
References
- CWE-798 (Use of Hard-coded Credentials)
- CWE-259 (Use of Hard-coded Password)
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.

