Security Audit errors
Common error signatures
Failures in SecurityAuditWorkflow typically fall into three categories:
- Input and path errors —
_validate_file_pathraises when the target path is missing, outside the working directory, or not readable. You'll see this before any subagent (vuln-scanner,secret-detector,auth-reviewer,remediation-planner) starts work. - Secret and PII detection errors —
SecretsDetectorandPIIScrubberraiseSecurityViolationwhen a file cannot be read or a pattern match produces an unexpected result.detect_secretscan also surface these if the file path fails_validate_file_path. - Notification and webhook errors —
_validate_webhook_urlraises when anAlertConfig.webhook_urlis malformed.deliver_webhookanddeliver_emailcan fail silently (returningFalse) or raise if the downstream channel is unreachable.
How to diagnose
-
Check whether the failure is pre-scan or mid-scan. An error before any subagent output points to path validation (
_validate_file_path) or workflow initialization (SecurityAuditWorkflow.__init__). An error after partial output points to a subagent — check which of the four names (vuln-scanner,secret-detector,auth-reviewer,remediation-planner) last appeared in the report. -
Inspect the
SecurityViolationandSeverityfields. Thesecuritymodule exportsSecurityViolationandSeveritydirectly. If you catch aSecurityViolation, its severity level tells you whether the audit halted on a policy violation or logged and continued. -
Verify the alert engine database.
AlertEnginedefaults to.attune/alerts.db. If that path is not writable,get_alert_engine()fails on first call. Runattune alerts metricsto confirm the engine can read telemetry; a failure here means the SQLite file is missing or locked. -
Check for failed notification backends. After
check_and_trigger()fires, callMultiBackend.get_failed_backends()to see which backends did not accept theAlertEvent. A non-empty list means at least onedeliver_webhookordeliver_emailcall returnedFalse. -
Validate webhook URLs before adding alerts.
_validate_webhook_urlis called insideAlertEngine.add_alert. Ifinitfails with a validation error, re-run with explicit flags (--webhook-url,--email,--channel) to isolate which field is rejected.
Source files
src/attune/workflows/security_audit.pysrc/attune/security/**src/attune/monitoring/**
Tags: security, audit, owasp, scanning, cve