# Secrets Bundled in Published Packages

> Detects API keys, private keys, and credentials accidentally included in npm/pip packages via missing .npmignore or .pypiignore.

- Skill: `zakirkun/secrets-bundled-in-published-packages` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add zakirkun/secrets-bundled-in-published-packages`
- Raw SKILL.md: https://api.skillmd.com/api/skills/zakirkun/secrets-bundled-in-published-packages/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Integrations & APIs
- Author: zakirkun (https://skillmd.com/u/zakirkun)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/zakirkun/secrets-bundled-in-published-packages

---


# Secrets Bundled in Published Packages

## Overview
When publishing packages without a proper `.npmignore` or explicit `files` field in `package.json`, sensitive files like `.env`, `*.pem`, and test credentials get included in the published artifact and become visible to anyone who installs the package.

## Remediation
- Add `.npmignore` with patterns for `.env`, `*.key`, `*.pem`, `test/`, `secrets/`
- OR use the `files` field in `package.json` to explicitly list only publishable files
- Run `npm publish --dry-run` to see what will be included

