secondsky/claude-skills / plugins/dependency-upgrade/skills/dependency-upgrade
dependency-upgrade
UnverifiedSecure dependency upgrades with supply chain protection, cooldowns, and staged rollout. Use when upgrading deps, configuring security policies, or preventing supply chain attacks.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 18.5 KB |
| references/compatibility-matrix.md | markdown | 3.6 KB |
| references/cooldown-config-guide.md | markdown | 5.2 KB |
| references/package-manager-security.md | markdown | 5.2 KB |
| references/secrets-and-containers.md | markdown | 3.3 KB |
| references/socket-cli-guide.md | markdown | 12.0 KB |
| references/staged-upgrades.md | markdown | 4.5 KB |
| references/supply-chain-security.md | markdown | 10.4 KB |
| references/testing-strategy.md | markdown | 4.1 KB |
| scripts/generate-dependency-upgrades.shexecutable | script | 14 B |
| templates/bunfig-security.tmpl | other | 727 B |
| templates/dependabot-security.tmpl | other | 1.0 KB |
| templates/devcontainer-security.tmpl | other | 639 B |
| templates/npmrc-security.tmpl | other | 851 B |
| templates/pnpm-workspace-security.tmpl | other | 1.6 KB |
| templates/renovate-security.tmpl | other | 1.1 KB |
| templates/socket-fix-ci.tmpl | other | 1.3 KB |
| templates/socket-scan-ci.tmpl | other | 900 B |
| templates/yarnrc-security.tmpl | other | 762 B |
references/secrets-and-containers.md
View on GitHub# Dev Environment Hardening: Secrets & Containers
Isolate dependency execution and protect sensitive data from supply chain attacks.
## Dev Containers
Running `npm install` on a host machine exposes the entire system to malicious packages. Dev containers limit blast radius.
### Basic Setup
Create `.devcontainer/devcontainer.json`:
```json
{
"name": "Node.js Dev Container",
"image": "mcr.microsoft.com/devcontainers/javascript-node:20",
"features": {
"ghcr.io/devcontainers/features/1password:1": {}
},
"postCreateCommand": "npm ci",
"customizations": {
"vscode": {
"extensions": ["dbaeumer.vscode-eslint"]
}
}
}
```
### Hardened Setup
```jsonc
{
"name": "Node.js Hardened Dev Container",
"image": "mcr.microsoft.com/devcontainers/javascript-node:20",
"runArgs": [
"--security-opt=no-new-privileges:true",
"--cap-drop=ALL",
"--cap-add=CHOWN",
"--cap-add=SETUID",
"--cap-add=SETGID"
],
"containerEnv": {
"NODE_OPTIONS": "--disable-proto=delete"
},
"postCreateCommand": "npm ci"
}
```
Security controls:
- `no-new-privileges:true` — prevents privilege escalation
- `--cap-drop=ALL` — drops all Linux capabilities
- Minimal capabilities added back: `CHOWN`, `SETUID`, `SETGID` (needed for npm)
- `--disable-proto=delete` — hardens JavaScript prototype chain
### What This Prevents
When a malicious package executes during `npm install`:
- **Without container**: Access to all files, SSH keys, env vars, other projects
- **With container**: Confined to container filesystem, no host access
## Secrets Management
### The Problem with .env Files
Plaintext secrets in `.env` files are accessible to any code running in the process:
```bash
# DANGEROUS — plaintext secrets
DATABASE_PASSWORD=my-secret-password
API_KEY=sk-1234567890abcdef
```
Supply chain attacks can read `process.env` or scan for `.env` files on the filesystem.
### 1Password CLI Integration
```bash
# Install 1Password CLI
brew install 1password-cli
# Use secret references in .env
DATABASE_PASSWORD=op://vault/database/password
API_KEY=op://vault/project/api-key
# Run with secret injection
op run -- npm start
# With explicit env file
op run --env-file="./.env" -- node --env-file="./.env" server.js
```
Secret references are resolved at runtime with additional authentication (Touch ID on macOS). The actual secret values never exist in files.
### Infisical Integration
```bash
# Install Infisical CLI
brew install infisical
# Use secret references
DATABASE_PASSWORD=infisical://project/env/api-key
# Run with secret injection
infisical run -- npm start
```
### Bun-Specific Notes
```bash
# Bun supports .env files natively
# Use with secret manager:
op run -- bun run dev
# Bun also supports --env-file flag
op run -- bun --env-file=./.env run dev
```
## Resources
- [Do Not Use Secrets in Environment Variables](https://www.nodejs-security.com/blog/do-not-use-secrets-in-environment-variables-and-here-is-how-to-do-it-better)
- [1Password Secrets Automation](https://developer.1password.com/docs/cli/get-started/)
- [Infisical Getting Started](https://infisical.com/blog/stop-using-env-files)
- [Dev Containers with 1Password for Node.js](https://www.nodejs-security.com/blog/mitigate-supply-chain-security-with-devcontainers-and-1password-for-nodejs-local-development)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |