lgpd-audit-logging
Pass
Audited by Gen Agent Trust Hub on Nov 11, 2026
Risk Level: SAFEINDIRECT_PROMPT_INJECTIONCOMMAND_EXECUTION
Full Analysis
- [INDIRECT_PROMPT_INJECTION]: The skill implements a logging mechanism that ingests untrusted data from request headers and metadata objects to be stored in a database.
- Ingestion points: The
logAudit()function inassets/audit-log.tsprocessesinput.redactedMetadataandreqheaders (specificallyuser-agentandx-forwarded-for). - Boundary markers: The implementation does not use prompt delimiters, but it isolates untrusted data by mapping it to specific database columns or including it in a cryptographic SHA-256 hash chain.
- Capability inventory: The skill is capable of performing database write operations via the Prisma ORM.
- Sanitization: The
extractAuditClientIpfunction usesisIPfromnode:netto validate that the extracted IP address is a valid network address before processing or storage. - [COMMAND_EXECUTION]: The TypeScript implementation uses a raw database execution method to manage concurrency.
- Evidence: In
assets/audit-log.ts,db.$executeRawUnsafeis called to executeSELECT pg_advisory_xact_lock(hashtext('lgpd_audit_log_chain')). - Context: The query is a hardcoded static string used for acquiring a PostgreSQL advisory lock, which is a recommended practice for maintaining a serialized hash chain in high-concurrency environments. No user-controlled input is passed to the raw query.
Audit Metadata