macalbert/envilder/common-security
Claude Code and agent skill by macalbert/envilder
- community
Checking that the SKILL.md file is still in the repository.
Security guardrails for Envilder (CLI, GitHub Action, SDKs, CDK, website). Covers secret handling, credential hygiene, supply chain safety, input validation, and CI/CD security. Use when reviewing code for security, handling secrets, validating CLI input, or reviewing GitHub Actions workflows.
Install
npx vskill@latest install macalbert/envilder/common-securitySKILL.md
Security Skill
Security guardrails adapted to the Envilder project: a CLI + GitHub Action + multi-runtime SDK platform that manages secrets from AWS SSM and Azure Key Vault.
When to Use
- Reviewing code that handles secrets or cloud credentials
- Adding new CLI options or GHA inputs that accept external data
- Reviewing GitHub Actions workflows for credential safety
- Adding new infrastructure (CDK stacks)
- Reviewing SDK code that interacts with cloud provider APIs
- Modifying the website (Astro) with user-visible content
1. Secret Handling
Never Expose Secrets in Output
- CLI/GHA: Use
EnvironmentVariable.maskedValue(shows last 3 chars) for logging - SDKs: Never log resolved secret values: log only the key name
- Tests: Use
envilder.jsonto resolve test tokens; never hardcode tokens - Website: No secrets: it's a static site
Storage Rules
| Context | Where secrets live | Never | |
|---|---|---|---|
| Production | AWS SSM Parameter Store (encrypted) | In code, env vars, or config files | |
| Production (Azure) | Azure Key Vault | In code or checked-in files | |
| CI | GitHub Secrets → OIDC → SSM | As plaintext in workflow YAML | |
| Local dev | AWS profile → SSM (via envilder.json) | In .env files committed to Git | |
| Tests | TestContainers (LocalStack for AWS and Azure) | Real credentials in test code |
Secretlint Enforcement
Secretlint runs on every pnpm lint invocation and scans all files for credential patterns (AWS keys, tokens, private keys). If Secretlint fails, the commit is blocked.
2. Credential Hygiene in CI/CD
GitHub Actions OIDC
- Always use
aws-actions/configure-aws-credentialswithrole-to-assume - Never store
AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEYas GitHub Secrets - OIDC tokens are short-lived and scoped: no rotation needed
GitHub Action Inputs
- GHA reads inputs from
process.env.INPUT_*: validate before use - The
mapinput (file path) must be validated to prevent path traversal - Never interpolate GHA inputs directly into shell commands
Workflow Permissions
- Use minimal
permissions:block in every workflow contents: readfor checkout,id-token: writefor OIDC- Never use
permissions: write-all
3. Input Validation
CLI
- Commander validates option types: but validate semantic constraints:
--mappath must exist and be a.jsonfile--providermust be one ofaws|azure(case-insensitive)--vault-urlmust be a valid HTTPS URL matching*.vault.azure.net- Never pass CLI arguments to shell commands unsanitized
- Use custom domain errors (
InvalidArgumentError): not generic exceptions
SDKs
- Map file paths: validate existence before parsing
- JSON parsing: handle malformed JSON gracefully (domain error, not stack trace)
- Provider names: strict enum matching, reject unknown values
- Cross-provider validation: profile + Azure →
InvalidArgumentError
Website
- Static site (Astro): no user input at runtime
- Build-time i18n: translation keys are developer-controlled, not user-supplied
4. Supply Chain Security
Dependency Pinning
| Stack | Mechanism | File | |
|---|---|---|---|
| TypeScript | pnpm-lock.yaml + catalog: versions | pnpm-workspace.yaml | |
| .NET | Central Package Management | Directory.Packages.props | |
| Python | uv.lock (deterministic) | uv.lock |
Rules
- Lock files must be committed: never
.gitignorethem - Dependabot (or Renovate) configured for automatic dependency updates
- Review advisories on every dependency update PR
- esbuild bundles GHA: verify the bundle is up to date (
pnpm verify:gha) - Pin GitHub Actions to full commit SHA (not
@v4tags) in production workflows
CDK
- Keep
aws-cdk-libup to date: security patches affect deployed infra - CDK synth output (
cdk.out/) is.gitignored: never commit CloudFormation templates
5. SDK-Specific Security
AWS SSM Provider
- Always use
WithDecryption: truefor SecureString parameters - Never log the decrypted parameter value
- Credential chain: SDK default chain (env vars → profile → instance role)
- If
profileis specified, only useCredentialProfileStoreChain: don't mix
Azure Key Vault Provider
- Use
DefaultAzureCredential: never hardcodeclientId/clientSecret - Vault URL validation: must match
https://*.vault.azure.net - TLS certificate validation: always enabled, including tests against the
LocalStack for Azure emulator (it serves a publicly trusted certificate)
Cross-Provider
EnvilderOptionsoverrides$config: validate that overrides don't
introduce insecure combinations (e.g., disabling encryption)
- Missing secrets →
null/None(silent). Validation is opt-in via
validateSecrets(): document this to users clearly
6. Website Security
- Astro generates static HTML: no server-side injection possible
- External links: use
rel="noopener noreferrer"ontarget="_blank"links - No inline scripts or
dangerouslySetInnerHTMLequivalents - CSP headers configured at CDN/CloudFront level (via CDK)
7. Testing Security
- Acceptance tests use emulators (LocalStack for AWS and Azure): never real
cloud endpoints
LOCALSTACK_AUTH_TOKENresolved via Envilder itself (dogfooding): stored
in SSM, never in code
- Test cleanup: containers destroyed after test run (TestContainers lifecycle)
- Emulator Azure credentials (all-zero tenant,
any-app/dummyservice
principal) are placeholders the emulator accepts; they are not secrets
Quick Security Checklist
Before merging any PR, verify:
- [ ] No secrets hardcoded in code, config, or test files
- [ ] Secretlint passes (
pnpm lint) - [ ] CLI/SDK input validated with domain errors (not generic exceptions)
- [ ] Cloud credentials use OIDC (CI) or SDK default chain (runtime)
- [ ] Secrets logged only via
maskedValue(last 3 chars visible) - [ ] Lock files updated if dependencies changed
- [ ] GHA workflows use minimal
permissions: - [ ] No
shell=Trueor unsanitized argument interpolation in scripts
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.github/skills/common-security/SKILL.md
Popularity
- Repository stars
- 135
- Repository forks
- 4
- 7-day trend score
- 25
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/macalbert/envilder/common-security)