Secure api key handling
Skill EficodeDemoOrg/AccessHub_Claude/.claude/skills/secure-api-key-handling
Rules for generating, hashing, masking, storing, and displaying API keys in AccessHub. Use when touching key generation, validation, storage, serialization, or any code near API keys.From its SKILL.md
npx -y skills add EficodeDemoOrg/AccessHub_Claude --skill secure-api-key-handlingAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.2 KB, as published. Nobody here has run it
Secure API Key Handling
How AccessHub must treat API keys.
Rules
- Generate keys with
generateApiKey()(apps/api/src/utils/crypto.ts). It returns{ raw, prefix, hash }. - Store only
keyPrefixandkeyHash(SHA-256). Never persist the raw key. - Show the raw key to the user exactly once, at creation (the approve response).
- Mask keys for display via
maskKey(prefix)/ the API-key serializer. Never returnkeyHash. - Never log the raw key — not in
console.log, audit logs, or error messages. - Validate keys by hashing the input and comparing to the stored hash; reject keys
that are
revoked(and, once the feature exists, tied to expired access).
Review checklist
- No
console.*includes a raw key/token/secret. - No response includes
keyHash. - Raw key is returned only at creation.
- Revoked keys do not validate.
-
scripts/security-check.shpasses.