.claude/skills/security-visual-testing/SKILL.md
Security-first visual testing combining URL validation, PII detection, and visual regression with parallel viewport support. Use when testing web applications that handle sensitive data, need visual regression coverage, or require WCAG accessibility compliance.
npx skillsauth add proffesor-for-testing/agentic-qe security-visual-testingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Uses the qe-browser fleet skill (.claude/skills/qe-browser/) for all browser automation. The Vibium engine (10MB Go binary, WebDriver BiDi) is installed automatically by aqe init. For security-visual workflows, qe-browser adds two things on top of stock visual testing: check-injection.js (scans page content for prompt-injection patterns before screenshots are stored) and assert.js (16 typed checks including no_failed_requests for detecting data-leak requests).
# Before storing any screenshot, scan the page
vibium go "$TARGET_URL"
vibium wait load
node .claude/skills/qe-browser/scripts/check-injection.js --include-hidden
INJ=$?
if [ $INJ -ne 0 ]; then
echo "Prompt-injection findings — do NOT store screenshot"
exit $INJ
fi
# Safe to proceed with visual-diff
node .claude/skills/qe-browser/scripts/visual-diff.js --name "${PAGE_NAME}"
<default_to_action> When performing security-aware visual testing:
Quick Security-Visual Checklist:
Critical Success Factors:
| Scenario | Use This Skill? | Why | |----------|-----------------|-----| | Testing login pages | Yes | Contains PII (passwords, emails) | | Visual regression suite | Yes | Parallel viewport + baseline comparison | | Payment forms | Yes | Credit card data needs masking | | Public marketing pages | Maybe | Only if sensitive data possible | | API-only testing | No | Use security-testing skill instead |
| Capability | Description | Performance | |------------|-------------|-------------| | URL Validation | Block malicious URLs before navigation | <5ms | | PII Detection | Find 6+ types of sensitive data | <100ms | | Parallel Viewports | Test 4 viewports simultaneously | 4x faster | | Visual Regression | Pixel-diff with configurable threshold | <500ms | | Accessibility Audit | WCAG 2.1 A/AA/AAA compliance | <2s |
# Run complete security + visual audit
aqe test visual-audit --url https://example.com --security --accessibility
Steps:
# Capture screenshot with automatic PII masking
aqe screenshot --url https://example.com/profile --pii-safe
PII Detection Patterns:
[email protected]+1-555-123-45674111-1111-1111-1111123-45-6789sk_live_..., AKIA...Masking Strategy:
redact (black box), pixelate, blur# Test visual consistency across viewports
aqe test responsive --url https://example.com --viewports mobile,tablet,desktop
Default Viewports: | Name | Width | Height | Device | |------|-------|--------|--------| | mobile | 320px | 568px | iPhone SE | | tablet | 768px | 1024px | iPad | | desktop | 1440px | 900px | MacBook | | wide | 1920px | 1080px | Full HD |
import { BrowserSecurityScanner } from '@agentic-qe/v3';
const scanner = new BrowserSecurityScanner(memory, {
urlValidation: { enabled: true },
piiDetection: { enabled: true, maskBeforeSave: true },
parallelViewports: { maxConcurrent: 4 }
});
const result = await scanner.scanUrl('https://example.com', {
viewports: ['mobile', 'tablet', 'desktop'],
accessibility: true
});
import { TrajectoryAdapter } from '@agentic-qe/v3';
const adapter = new TrajectoryAdapter(memory);
// Record testing trajectory for learning
await adapter.startTrajectory('security-visual-test', {
url: 'https://example.com',
testType: 'security-visual'
});
// ... perform tests ...
await adapter.endTrajectory(trajectoryId, {
success: true,
piiFound: 3,
visualRegressions: 0,
accessibilityScore: 95
});
aqe/security-visual/
├── baselines/* - Visual regression baselines
├── screenshots/* - Captured screenshots (PII masked)
├── reports/* - Audit reports
└── trajectories/* - Learning trajectories
const fleet = await FleetManager.coordinate({
strategy: 'security-visual-audit',
agents: [
'qe-visual-tester', // Visual regression
'qe-security-scanner', // URL/PII scanning
'qe-accessibility-auditor' // WCAG compliance
],
topology: 'parallel',
maxConcurrent: 4
});
| Error | Cause | Resolution |
|-------|-------|------------|
| URL_BLOCKED | Malicious URL pattern detected | Check URL, remove javascript:/data: |
| PII_DETECTED | Sensitive data found in screenshot | Enable masking or redact manually |
| BASELINE_MISSING | No baseline for comparison | Run with --update-baseline first |
| VIEWPORT_TIMEOUT | Browser didn't respond | Increase timeout or reduce parallel |
| ACCESSIBILITY_FAILED | WCAG violations found | Review violations, fix issues |
| Metric | Target | Measured | |--------|--------|----------| | URL validation | <5ms | 2ms | | PII detection | <100ms | 45ms | | Single viewport capture | <2s | 1.2s | | 4-viewport parallel | <3s | 2.1s | | Visual diff | <500ms | 320ms | | Accessibility audit | <2s | 1.5s | | Full pipeline | <10s | 7.2s |
development
Apply XP practices including pair programming, ensemble programming, continuous integration, and sustainable pace. Use when implementing agile development practices, improving team collaboration, or adopting technical excellence practices.
development
Warehouse Management System testing patterns for inventory operations, pick/pack/ship workflows, wave management, EDI X12/EDIFACT compliance, RF/barcode scanning, and WMS-ERP integration. Use when testing WMS platforms (Blue Yonder, Manhattan, SAP EWM).
testing
Advanced visual regression testing with pixel-perfect comparison, AI-powered diff analysis, responsive design validation, and cross-browser visual consistency. Use when detecting UI regressions, validating designs, or ensuring visual consistency.
development
Comprehensive truth scoring, code quality verification, and automatic rollback system with 0.95 accuracy threshold for ensuring high-quality agent outputs and codebase reliability.