yaml
10 lines · 1 tab
Kai Nakamura
Apr 2026
1 tab
repos:
- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.4
hooks:
- id: gitleaks
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
args: ["--baseline", ".secrets.baseline"]
1 file · yaml
Explain with highlit
I want secret leakage blocked before it reaches a remote repository. Local pre-commit hooks are not enough by themselves, but they cut down accidental exposure and teach the team what not to commit. The server-side or CI scan then becomes the final gate instead of the only gate.
Related snips
javascript
const { z } = require('zod');
const envSchema = z
.object({
NODE_ENV: z
.enum(['development', 'test', 'production'])
Validate Environment Variables at Startup with a Zod Schema in Node.js
nodejs
zod
configuration
by codesnips
3 tabs
rust
#[derive(Debug, Clone, PartialEq)]
pub enum Line {
Context(String),
Remove(String),
Add(String),
}
Parsing Unified Diff Hunks and Applying Them to a Text Buffer in Rust
diff
unified-diff
patch
by codesnips
3 tabs
yaml
# ConfigMap from literal values
apiVersion: v1
kind: ConfigMap
metadata:
name: web-app-config
namespace: production
Kubernetes ConfigMaps and Secrets management
kubernetes
k8s
configmaps
by Ryan Nakamura
2 tabs
json
{
"printWidth": 100,
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"quoteProps": "as-needed",
Prettier config for consistent formatting
tooling
prettier
formatting
by codesnips
3 tabs
yaml
# Pre-commit hooks configuration
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
Git workflows and branching strategies for teams
git
workflows
branching
by Ryan Nakamura
2 tabs
javascript
// Configuration management with validation
const Joi = require('joi');
// Define schema for all environment variables
const envSchema = Joi.object({
NODE_ENV: Joi.string()
Environment variable management and secret rotation
environment-variables
secrets
configuration
by Ryan Nakamura
2 tabs
Share this code
Here's the card — post it anywhere.