Security-first visual testing combining URL validation, PII detection, and visual regression with parallel viewport support...
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}"
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:
user@example.com+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 |