Skip to content
cccskills
FreePublished on GitHub

secret-management-patterns

HashiCorp Vault, cloud secret managers, rotation strategies, and zero-trust secret access

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md2.3 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Secret Management Patterns

Environment Variables (Baseline)

// envalid ile startup validation
import { cleanEnv, str, url } from 'envalid'

const env = cleanEnv(process.env, {
  DATABASE_URL: url(),
  JWT_SECRET: str({ desc: 'Min 32 chars' }),
  STRIPE_SECRET_KEY: str(),
  REDIS_URL: url({ default: 'redis://localhost:6379' })
})
// App başlarken validation fail ederse crash (fail-fast)

Cloud Secret Managers

// AWS Secrets Manager
import { SecretsManagerClient, GetSecretValueCommand } from '@aws-sdk/client-secrets-manager'
const client = new SecretsManagerClient({ region: 'eu-west-1' })
const secret = await client.send(new GetSecretValueCommand({ SecretId: 'prod/db-credentials' }))

// GCP Secret Manager
import { SecretManagerServiceClient } from '@google-cloud/secret-manager'
const client = new SecretManagerServiceClient()
const [version] = await client.accessSecretVersion({ name: 'projects/123/secrets/db-pass/versions/latest' })

Secret Rotation

1. Yeni secret oluştur
2. Dual-accept: eski + yeni kabul et
3. Tüm consumer'ları yeniye geçir
4. Eski secret'ı deaktif et
5. Grace period sonrası sil

CI/CD Secret Handling

# GitHub Actions - OIDC (secret'sız cloud erişimi)
- uses: aws-actions/configure-aws-credentials@v4
  with:
    role-to-assume: arn:aws:iam::123:role/deploy
    aws-region: eu-west-1

# ASLA: secret'ı env'e yazdırma
- run: echo ${{ secrets.API_KEY }}  # YANLIS!

Secret Detection

# Pre-commit hook
pip install detect-secrets
detect-secrets scan --baseline .secrets.baseline

# CI'da
trufflehog git file://. --since-commit HEAD~1 --only-verified
gitleaks detect --source . --verbose

Checklist

  • Secret hardcoded DEĞİL
  • .env .gitignore'da
  • .env.example placeholder ile committed
  • Secret rotation planı var
  • CI'da secret scanning aktif
  • Secret'lar least-privilege erişim
  • Audit log: kim ne zaman erişti
  • Pre-commit hook: detect-secrets

Anti-Patterns

  • Secret'ı log'a yazdırma
  • Secret'ı URL query param'da gönderme
  • Tek secret tüm environment'larda
  • Rotation planı olmadan production secret
  • Secret'ı client-side code'a gömme

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

WCAG 2.2 AA compliance, ARIA patterns, keyboard navigation, screen reader optimization

The English summary is being prepared. Showing the original description.

vibeeval/vibecosystem538Updated Aug 9, 2026

axe-core integration, WCAG 2.2 AA checklist, keyboard navigation testing, screen reader testing, and ARIA pattern validation.

The English summary is being prepared. Showing the original description.

vibeeval/vibecosystem538Updated Aug 9, 2026

Steam-style achievement system with XP, levels, streaks, and skill trees. Gamifies the development workflow. 25 achievements across 5 categories.

The English summary is being prepared. Showing the original description.

vibeeval/vibecosystem538Updated Aug 9, 2026

Framework for measuring and tracking agent response quality over time. Detects regressions before they reach production. Use when evaluating agent changes, auditing quality, or establishing performance baselines.

The English summary is being prepared. Showing the original description.

vibeeval/vibecosystem538Updated Aug 9, 2026

Agent Context Isolation

The English summary is being prepared. Showing the original description.

vibeeval/vibecosystem538Updated Aug 9, 2026

Agent ve skill dosyalarinin yapisal dogrulamasi. Frontmatter kontrol, naming convention, zorunlu bolum kontrolu, tutarlilik denetimi. Yeni agent/skill eklendiginde veya mevcut dosyalar duzenlediginde otomatik calistirilir.

The English summary is being prepared. Showing the original description.

vibeeval/vibecosystem538Updated Aug 9, 2026

See all skills by vibeeval

Report a problem with this skill