logging-security

logging-security is a skill for Claude Code, Codex from ShieldNet-360/secure-vibe. It costs 72 tokens per session (1,693 once invoked), scanned A, original, MIT.

Guidance for creating application logs that do not expose secrets or personal information and that remain useful for auditing.

In plain words
What is it for?
Use it when adding logger calls, defining structured JSON or logfmt fields, configuring redaction and log shippers, setting retention, and recording audit events.
Why use it?
It helps prevent sensitive data from being written into logs, avoids log injection, and makes log access easier to control and review.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/shieldnet-360/secure-vibe/logging-security
Any agent
npx skills add ShieldNet-360/secure-vibe --skill logging-security
Clone the repo
git clone --depth 1 https://github.com/ShieldNet-360/secure-vibe

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for logging-security

README.md
[![agentmods](https://agentmods.dev/badge/skills/shieldnet-360/secure-vibe/logging-security.svg)](https://agentmods.dev/skills/shieldnet-360/secure-vibe/logging-security)
Your own site
<a href="https://agentmods.dev/skills/shieldnet-360/secure-vibe/logging-security"><img src="https://agentmods.dev/badge/skills/shieldnet-360/secure-vibe/logging-security.svg" alt="Measured on agentmods" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,693 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00072 $0.01693
Opus 5 $0.00036 $0.00847
Sonnet 5 $0.00014 $0.00339
Haiku 4.5 $0.00007 $0.00169

Measured 4d ago against content hash 816368c2aca3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

logging-security scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/logging-security/SKILL.md · 125 lines

How it starts

The opening of the file, as written. The whole thing — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Logging Security

Rules (for AI agents)

ALWAYS

  • Decide what is safe to log at the call site, and log a reference rather than a value: an id, a hash, a type, a count. A redactor is the last net, not the design — it matches field names and known patterns, so it cannot see personal data sitting inside an assembled string. A formatted notification body, a templated message, an exception with interpolated arguments: the name and the address are in the prose, in no named field, matching no pattern. Nothing downstream will catch that.
  • Run a redactor at the sink anyway, for the cases the call site missed: credential-shaped values, Authorization and Cookie headers, query strings carrying tokens, and the personal-data patterns in rules/redaction_patterns.json. secret-detection owns which literals count as a credential; this rule is that the redactor exists and runs before anything leaves the process.
  • Log in a structured format (JSON or logfmt) with stable field names — timestamp, service, version, level, trace_id, span_id, request_id, event, and user_id when there is an authenticated one. Structure is what makes redaction, retention, and access control expressible per field instead of per line.
  • Neutralize user-controlled strings before they enter a log record. Line injection (CWE-117) is the classic case — a \n or \r lets an attacker forge a whole record — but structured logging moves the problem: a value that parses as JSON can inject fields into the ingested document, and ANSI escape sequences (\x1b[) are interpreted by the terminal of whoever reads the log. Encode the value; do not concatenate it into the line.
  • Record security-relevant events as immutable audit records: authentication success and failure, MFA challenges, password and role changes, permission grants and revocations, data export, administrative action. These carry longer retention and stricter access than operational logs, and they are the reason failed logins must keep being written even when someone calls them noise.
  • Treat read access to the log store as access to the data inside it. A centralized store aggregates every tenant's records, so grant it like production data access — named principals, reviewed, audited — not like an observability convenience handed to everyone who might want to debug something.
  • Set retention per data category — short for debug, long for audit — and make it executed, not declared. A retention or deletion policy that no job enforces looks identical to one that works, right up to the point someone asks for evidence.
  • Alert on the log pipeline itself: a service that stops logging, and volume that departs sharply from its own baseline in either direction. Calibrate the threshold against that service's normal traffic rather than a fixed multiple — a job that runs hourly and a request path have nothing in common.

Read the full file on GitHub · 125 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 125 lines · 72 tokens per session scan A 816368c2aca3

Subscribe to this mod's changes

logging-security is a skill published in the GitHub repository ShieldNet-360/secure-vibe (22 stars, last pushed 20d ago), licensed MIT. It adds 72 tokens to every session and 1,693 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

deno-sandbox

Use when building features that execute untrusted user code, AI-generated code, or need isolated code execution environments. Covers the @deno/sandbox SDK.

denoland/skills · 36 tokens

deno-frontend

Use when building a web frontend with Deno — running React, Vite, Astro, SvelteKit, Next.js, Nuxt or other npm frameworks under Deno, or working with Fresh, Deno's own island-architecture framework. Covers which path to pick, Fresh 2.x routes, handlers, islands, Preact signals, Tailwind, and Fresh 1.x to 2.x migration.

denoland/skills · 88 tokens

web-performance-reviewer

Review web frontends for performance issues by driving the rendered site through Chrome DevTools MCP — throttled performance traces, Core Web Vitals judged against thresholds, network waterfall analysis, and heap-snapshot leak checks for SPAs. Composes on top of web-static, web-sprinkles, or web-components. Strictly…

AdamBien/airails · 193 tokens

web-static

Build modern static websites using semantic HTML and CSS without external dependencies or build systems. Also owns the verification loop for such sites — drives the rendered pages through Chrome DevTools MCP (console, accessibility snapshot, viewport resize, dark/reduced-motion emulation, Lighthouse), executes the…

AdamBien/airails · 183 tokens

zcfg

Integrate zcfg (Zero Dependency Configuration Utility) into Java applications. Use when adding configuration loading, reading properties files, setting up application configuration, or integrating zcfg into a Java project. Triggers on "zcfg", "add configuration", "load properties", "application configuration with…

AdamBien/airails · 75 tokens

zcl

Add colored terminal output to Java applications using zcl (Zero-dependency Colour Logger). Use when adding colored console output, terminal logging with colors, ANSI color support, or integrating zcl into a Java project. Triggers on "zcl", "colored output", "colored logging", "terminal colors", "ANSI colors"…

AdamBien/airails · 85 tokens