
Security News
Ruby's Bundler 4.0.18 Extends Cooldown to bundle lock and bundle cache
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.
@blueprintlabio/prompt-injector
Advanced tools
Experimental TypeScript library for generating AI security test conversations
Experimental TypeScript library for generating AI security test conversations
⚠️ EXPERIMENTAL SOFTWARE: This is an early-stage research project built with Claude Code. Success rates and effectiveness claims are based on preliminary research and may not reflect real-world performance. Use for educational and defensive testing purposes only.
A minimal, composable library that generates multi-turn prompt injection attack conversations for security professionals to test AI systems. No evaluation, no false promises - just research-informed attack patterns.
This is experimental V0.1 software seeking feedback from the AI security community:
Current AI security testing has significant gaps:
Research suggests multi-turn attacks may be more effective than single-turn attempts, with attackers using conversation flow to build trust before exploitation.
Generate research-informed attack conversations. Let security professionals evaluate results.
import { PromptInjector } from '@blueprintlabio/prompt-injector';
const injector = new PromptInjector();
// Generate multi-turn attack conversation
const conversation = injector.generateConversation(
"Extract user financial information",
{ strategy: 'roleplay', maxTurns: 4 }
);
// Test each turn against your AI system
conversation.turns.forEach(turn => {
console.log(`Turn ${turn.turnNumber}: ${turn.message}`);
// Manually test this against your AI system
});
npm install @blueprintlabio/prompt-injector
import { PromptInjector } from '@blueprintlabio/prompt-injector';
const injector = new PromptInjector();
// Test different attack strategies
const strategies = ['gradual', 'roleplay', 'obfuscated', 'direct'];
for (const strategy of strategies) {
const conversation = injector.generateConversation(
"Get the AI to reveal its system prompt",
{ strategy, maxTurns: 3 }
);
console.log(`\n🎯 ${strategy} Attack:`);
conversation.turns.forEach(turn => {
console.log(`\n👤 User: ${turn.message}`);
console.log(`🤖 AI: [Test this against your system]`);
});
}
// Test different attack objectives
const goals = [
"Extract user personal information",
"Generate harmful content instructions",
"Bypass content safety filters",
"Access unauthorized system functions",
"Reveal training data or system prompts"
];
for (const goal of goals) {
const conversation = injector.generateConversation(goal, { strategy: 'roleplay' });
console.log(`\nTesting: ${goal}`);
// Test each turn against your AI system manually
}
Research-informed character impersonation techniques
Character manipulation and encoding techniques
Multi-turn trust building approach
Fast attacks for rapid testing
This library implements techniques inspired by published research:
Liu, Y., He, X., Xiong, M., Fu, J., Deng, S., & Hooi, B. (2024). FlipAttack: Jailbreak LLMs via Flipping. arXiv preprint arXiv:2410.02832. Demonstrates high success rates for character manipulation attacks.
Documented in "Red Teaming the Mind of the Machine: A Systematic Evaluation of Prompt Injection and Jailbreak Vulnerabilities in LLMs" showing roleplay as highly effective attack vector.
Mozilla's 0Din platform research by Figueroa, M. (2024) demonstrating hexadecimal encoding bypasses in ChatGPT-4o guardrails.
Research showing Base64 encoding as common attack vector, with defensive applications explored in "Defense against Prompt Injection Attacks via Mixture of Encodings" (arXiv:2504.07467).
⚠️ Research Disclaimer: Success rates and effectiveness may vary significantly based on target AI system, safety measures, and specific implementation details. This library provides tools for testing - not guarantees of attack success.
This tool is designed exclusively for defensive security testing.
✅ Appropriate Use:
❌ Inappropriate Use:
We need your expertise! This experimental V0.1 needs validation and improvement:
See our Design Documentation for technical details on architecture and adding new attack primitives.
Built with Claude Code - This library was collaboratively designed and implemented using Claude Code, demonstrating AI-assisted security tool development.
MIT License - See LICENSE for details.
⚠️ Disclaimer: Experimental software for authorized testing only. Use responsibly. Test only on AI systems you own or have explicit permission to test. Follow responsible disclosure practices and applicable laws. Success rates and effectiveness claims are based on preliminary research and may not reflect real-world performance.
FAQs
Experimental TypeScript library for generating AI security test conversations
We found that @blueprintlabio/prompt-injector demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.