openrouter-audit-logging
Pass
Audited by Gen Agent Trust Hub on Sep 9, 2026
Risk Level: SAFE
Full Analysis
- [SAFE]: The skill implements a robust audit logging system for OpenRouter API interactions with several security-positive features:
- PII Redaction: The
redact_piifunction uses regular expressions to scrub sensitive information like emails, phone numbers, SSNs, and API keys from text before it is logged. - Data Minimization: The core logging logic (
audited_completion) computes a SHA-256 hash of prompt content instead of storing raw prompts, which satisfies data residency and privacy requirements. - Integrity Protection: The
TamperProofLoggerreference implementation uses HMAC-SHA256 signatures and a hash chain to ensure the integrity of log entries, preventing unauthorized tampering. - Secure Secret Management: The skill correctly identifies that API keys should be handled as environment variables (
OPENROUTER_API_KEY) and references a dedicated installation skill for setup, rather than hardcoding credentials. - Standard Infrastructure: The skill uses well-known, legitimate services (OpenRouter.ai) and standard libraries (Python's
sqlite3,hashlib,hmac,re) for its functionality. - [INDIRECT_PROMPT_INJECTION]: The skill processes external data (API responses from OpenRouter).
- Ingestion points: Data enters through the
audited_completionfunction inSKILL.mdand theAuditedOpenRouterClientinreferences/comprehensive-audit-logger.md. - Boundary markers: No specific boundary markers are used for the log storage itself.
- Capability inventory: The skill has the capability to write to local SQLite databases and JSONL files.
- Sanitization: The skill mitigates risks by applying PII redaction and only storing prompt hashes, which prevents the logs from acting as a vector for secondary instruction injection. Given these controls, the risk is negligible.
Audit Metadata