Audit Log Hook

Security checks across static analysis, malware telemetry, and agentic risk

Overview

The skill is purpose-aligned for audit logging, but it broadly records all tool parameters, results, and session identifiers while its redaction and retention controls are incomplete.

Install or implement this only if you intentionally want broad audit logging of agent tool activity. Before use, make sure raw parameters and results are redacted, logs are access-controlled, and there is a clear retention and cleanup policy.

Static analysis

No static analysis findings were reported for this release.

VirusTotal

VirusTotal findings are pending for this skill version.

View on VirusTotal

Risk analysis

Artifact-based informational review of SKILL.md, metadata, install specs, static scan signals, and capability signals. ClawScan does not execute the skill or run runtime probes.

What this means

Once enabled, the hook can observe every tool invocation rather than only a single user-requested action.

Why it was flagged

The skill is explicitly designed to hook every tool call. That is expected for an audit logger, but users should understand that logging happens automatically after the hook is registered.

Skill content
Record all tool calls via `before_tool_call` and `after_tool_call` hooks
Recommendation

Use it only in environments where global audit logging is intended, and add allowlists, denylists, or per-tool controls if only some activity should be logged.

What this means

Sensitive information handled by tools could be copied into audit logs or console output and later viewed, retained, or reused unintentionally.

Why it was flagged

The hook records tool parameters, tool results, session keys, and user identifiers. Those fields can contain secrets, private file contents, account data, or other sensitive context.

Skill content
params: JSON.stringify(event.tool.params).slice(0, 500), ... result: String(event.result).slice(0, 200), ... session: ctx.sessionKey, user: ctx.session?.senderId
Recommendation

Redact before logging, avoid logging raw results by default, omit or hash session/user identifiers where possible, restrict log access, and document retention and deletion behavior.

What this means

Users may believe secrets are protected when the provided implementation would still log many sensitive values.

Why it was flagged

The skill claims automatic redaction, but the earlier hook code logs `event.tool.params` and `event.result` directly and does not call `redactSensitive`; results and errors are not covered by the shown redaction function.

Skill content
## Sensitive Data Handling

Auto-redact sensitive fields: ... function redactSensitive(obj) { ... }
Recommendation

Integrate redaction into the actual before/after hook paths, cover nested objects and result/error text, and avoid claiming automatic redaction unless it is enforced.

What this means

Private tool activity could remain on disk longer than expected or be available across sessions.

Why it was flagged

The artifact implies persistent audit-log storage and later analysis, but it does not define file permissions, retention limits, rotation, cleanup, or whether logs are session-scoped.

Skill content
const AUDIT_LOG = path.join(process.env.OPENCLAW_STATE_DIR || '~/.openclaw', 'audit.log'); ... Periodically analyze audit.log:
Recommendation

Document the exact log location, retention period, permissions, rotation policy, and cleanup process before enabling persistent logging.