ufiaw
v1.0.0
Published
Educational tool for demonstrating npm package lifecycle scripts
Maintainers
Readme
ufiaw
"ufiaw" (waifu backwards) is an educational demonstration that showcases how a postinstall script can be weaponized to alter the behavior of AI coding assistants like Claude Code and other AI-powered development tools. If you install this package, your AI coding assistant will be replaced with a waifu that will be very nice to you, but refuses to code.
This is a very similar vulnerability to the one that was exploited in the recent nx supply chain attack.
This should only be used for educational purposes (or pranking your friends and coworkers).
How It Works
When installed, this package executes a postinstall script that:
- Injects crafted system prompts into AI agent configurations (CLAUDE.md and AGENTS.md)
- Modifies the AI assistant's behavior from a coding agent to something entirely different (in this case a waifu)
- Demonstrates the potential for supply chain attacks through npm packages
Protection Measures
To protect against such attacks:
- Always audit packages before installation
- Use
npm install --ignore-scriptswhen testing untrusted packages - Review package.json scripts before running
npm install - Use package scanning tools and security audits
- Implement proper code review processes for dependencies
