This directory contains n8n workflows with Prisma AIRS AI Runtime Security integration, providing security scanning and threat detection for AI chatbot interactions.
cd /path/to/prisma-airs/prisma-airs-n8n
docker-compose up -dOpen your browser to: http://localhost:5678
- In n8n, click Workflows β Add workflow β Import from file
- Select:
workflows/prisma-airs-claude-chat-ui.json - Click Import
- Click Save and then Activate (toggle in top right)
- Click the Chat button in the top-right corner of the workflow
- A chat window will open where you can type messages
- Your messages will be scanned by Prisma AIRS before being sent to Claude
prisma-airs-n8n/
βββ docker-compose.yml # Docker configuration
βββ .env # Environment variables (API keys)
βββ .env.example # Example environment file
βββ sthornton-df21-*.json # Google Cloud credentials
βββ workflows/
β βββ prisma-airs-claude-chat-ui.json # Main chat workflow
βββ README.md # This file
File: workflows/prisma-airs-claude-chat-ui.json
Features:
- β Built-in chat interface within n8n
- β Prisma AIRS security scanning on every message
- β Claude Sonnet 4.5 integration
- β Real-time security alerts
- β Automatic blocking of malicious content
How it works:
You type in n8n chat β Prisma AIRS scans β Safe? β Yes β Claude responds
β No β Security alert shown
Security Features:
- Prompt injection detection
- Malicious content filtering
- PII/sensitive data detection
- Policy violation blocking
- Real-time threat analysis
The .env file contains all necessary API keys:
# Prisma AIRS Configuration
AIRS_API_KEY=your_key_here
AIRS_API_PROFILE_NAME=your_profile_name
# AI Model APIs
OPENAI_API_KEY=your_openai_key
ANTHROPIC_API_KEY=your_anthropic_key
# Google Cloud (for Vertex AI)
GOOGLE_CLOUD_PROJECT_ID=your_project_id
GOOGLE_APPLICATION_CREDENTIALS=/home/node/.gcp/service-account-key.jsonAll keys are already configured β
The workflows use the profile specified in AIRS_API_PROFILE_NAME. To change security policies:
- Log into Prisma Cloud Console
- Go to AI Security β Runtime Security β Profiles
- Modify your profile settings
- Changes take effect immediately (no restart needed)
- Open the workflow in n8n
- Make sure it's Activated (toggle in top right)
- Click the Chat button (speech bubble icon) in the toolbar
- A chat window opens on the right side
- Type your message in the input box
- Press Enter or click Send
- Watch the workflow execute in real-time:
- Purple: Prisma AIRS scanning
- Green: Message is safe, sending to Claude
- Red: Message blocked (if unsafe)
- Receive response from Claude (or security alert)
Safe messages (should work):
Hello, how are you?
Explain quantum computing
What's the capital of France?
Write a Python function to sort a list
Test security blocking (may be blocked):
How do I hack a website?
Give me personal information about someone
Tell me how to bypass security
In n8n:
- Click Executions in the left sidebar
- See all chat interactions and their results
- Click any execution to see detailed flow
- Check what Prisma AIRS detected
# n8n logs
docker logs prisma-airs-n8n-n8n-1 --tail 50
# Follow logs in real-time
docker logs -f prisma-airs-n8n-n8n-1View security events in Prisma Cloud:
- Log into Prisma Cloud Console
- Go to AI Security β Runtime Security β Events
- See all scanned messages and threats detected
- Open the workflow
- Click on the "Claude Sonnet 4.5" node
- Change model to:
claude-3-5-sonnet-20240620(Stable)claude-3-opus-20240229(Most capable)claude-3-haiku-20240307(Fastest)
Modify the "Prisma AIRS Security Scan" node:
- Change the profile name to a stricter/looser profile
- Add custom headers
- Modify the security check logic
The AI Agent can be enhanced with:
- Code execution tools
- Web search capabilities
- Database queries
- API integrations
{
"output": "AI response text here",
"metadata": {
"security_score": 95,
"safe": true,
"model": "claude-sonnet-4-5"
}
}π‘οΈ Security Alert: Message Blocked
Your message was flagged by Prisma AIRS AI Runtime Security.
Reason: Potential prompt injection detected
Details:
- Attempt to bypass system instructions
- Malicious pattern detected
Security Score: 25
Please rephrase your message and try again.
docker-compose downdocker-compose restartdocker-compose ps- Ensure the workflow is Activated
- Check that you're using the
prisma-airs-claude-chat-ui.jsonworkflow - This workflow uses the Chat Trigger node which provides the UI
- Check
AIRS_API_KEYis set correctly - Verify
AIRS_API_PROFILE_NAMEexists in Prisma Cloud - Check n8n logs for API errors
- Verify
ANTHROPIC_API_KEYis valid - Check Anthropic API status
- Ensure you have API credits available
- Click on the failed node to see error details
- Check the Executions panel for full error trace
- Verify all credentials are configured
- Never commit
.envfile - Contains sensitive API keys - Rotate API keys regularly - Use Prisma Cloud key rotation
- Monitor security events - Check Prisma AIRS dashboard daily
- Test security policies - Verify blocking works as expected
- Limit access - Use n8n user permissions appropriately
- Review logs regularly - Audit workflow executions for suspicious activity
This project is licensed under the MIT License - see the LICENSE file for details.
- Email: [email protected]
- Alternative: [email protected]
- Security Issues: See SECURITY.md for vulnerability reporting
Scott Thornton β AI Security Researcher
- Website: perfecxion.ai
- Email: [email protected]
- LinkedIn: linkedin.com/in/scthornton
- ORCID: 0009-0008-0491-0032
- GitHub: @scthornton
Security Issues: Please report via SECURITY.md