Skip to main content

Command menu

Jump to a page or search the catalog

AI Tools & Scripts

PII in Logs Check

Check logging calls and settings before they ship: passwords, tokens, connection strings, Authorization headers and card numbers in logs, login bodies, emails and ID numbers, whole user objects, DEBUG in production, Sentry PII.

$5.00

What you get: 1 file · 65.54 KB · ZIP

See purchase options

Product description

console.log("login", req.body) in a login route writes every user's password to your log service, and log.info("user={}", user) prints every field of the user object, password hash included. Logs are copied to more places, and read by more people, than the database the data came from. This skill finds those and eleven other logging mistakes before they ship, and tells you how to fix each one.

Your agent runs a scanner on Python, JavaScript and TypeScript, Java, Kotlin, Go, Ruby, PHP and C# code, and on Spring Boot application.properties and application.yml, ASP.NET Core appsettings.json, logback and log4j files, sentry.properties and .env.production. It finds each logging or print call (Python logging, structlog, print; console, pino, winston, NestJS; SLF4J, Log4j, Android Log, kotlin-logging; Go log, slog, zap, logrus; Rails logger; Laravel Log, error_log; ILogger, Serilog) and reads what it writes: arguments, object keys, f-strings and template strings, and the value after a label such as "password=%s" or a {Password} template hole. It knows when a value is only tested, measured, cut or masked (token is None, len(token), token[:6], mask(card)) and that an exception is not a secret (logger.error("Failed to refresh token: %s", e)). It honours pino redact paths for object keys in pino calls, Go LogValuer types, and types declared in the same file with their secret fields kept out of logs (SecretStr, field(repr=False), @ToString.Exclude, [NotLogged]). It skips only dev, development, local, test, ci and staging profiles, and treats print output of command-line tools as output, not logs, while Lambda handlers, Celery tasks and web apps still count as logs. It never runs your code. It returns BLOCK, REVIEW, or NOT FLAGGED, with the file, line, reason, and a safer approach. Secrets are never printed.

What it checks

BLOCK (fix before shipping)

  • P01: passwords, tokens, API keys, client and AWS secret access keys, private keys, one-time codes, database connection strings and URLs, or the whole environment written to a log or printed
  • P02: Authorization, Cookie or API-key header values (also through HttpHeaders.AUTHORIZATION and HeaderNames.Authorization), a request's session id or cookies, morgan :req[authorization], or Authorization added to ASP.NET Core HTTP logging
  • P03: card numbers and CVV/CVC security codes
  • P04: the whole body or form of a login, sign-up or password request

REVIEW (check before release)

  • P11: email addresses, phone numbers, postal addresses and dates of birth
  • P12: social security, national id, passport, tax and driver's license numbers, IBANs, bank account, routing and medical record numbers
  • P13: whole user, customer, account or request objects, login or sign-up request objects, header sets and request sessions
  • P14: whole request bodies, forms, query strings and parameter collections
  • P15: DEBUG or TRACE as the root or default level in production configuration (Spring Boot, appsettings.json, logback, log4j, Rails production.rb, .env.production, a Django production root logger)
  • P16: HTTP body or header logging switched on outside a development check (ASP.NET Core HttpLoggingFields, Spring log-request-details and request logging filters, OkHttp HttpLoggingInterceptor without redactHeader, Python http.client debuglevel, Go httputil.DumpRequest)
  • P17: SQL parameter values in logs (EF Core EnableSensitiveDataLogging outside a development check, Hibernate bind logger at TRACE)
  • P18: Sentry send-default-PII switched on, or a dataCollection / data_collection setting that leaves user info, cookies, headers or bodies on
  • P19: a neutrally named value logged right after a message label that names a secret ("password: %s", value)

What's included

  • The scanner (Python 3.9+, standard library only)
  • A rules guide with the reason, safer approach and source (OWASP, CWE, PCI SSC, Microsoft, Sentry) for each rule
  • A risky and a safe example project in five languages, and the real report the scanner produces on the risky one

Limits

It decides by names: a value in a variable called x or result is reported only when a label, a key or an assignment in the same file says what it holds, and values passed through other files are not followed. Redaction done in custom log filters or masking patterns is not seen. IP addresses and user names are not reported, because the OWASP Logging Cheat Sheet recommends recording them for security events. A JavaScript SDK 11 Sentry.init without dataCollection is not reported, because the SDK version is not read. NOT FLAGGED is not a guarantee.

Contents

One ZIP file with 25 files: SKILL.md, the scanner in scripts/ (8 Python files), references/rules.md (every rule with its reason and safer approach), and examples/ (14 example files plus report.md, the real scanner output on the risky example).

How to use: This is an agent skill: a folder with a SKILL.md file and Python scripts that an AI coding agent such as Claude Code, Cursor, or Codex CLI can run. Unzip it into your agent's skills folder (for Claude Code: ~/.claude/skills/), then ask your agent to check your project. The scripts also run on their own with Python 3.9 or newer, with nothing to install. They read your files only: no network access, and nothing is sent anywhere.

What you get

1 file · 65.54 KB

  • pii-in-logs-check-1.0.0.zipZIP · 65.54 KB
LicenseCommercial use allowed
Package checkPassed

Getly opened the uploaded files and found nothing that would stop them opening. It is not a virus scan or a quality rating.

PublishedNov 12, 2026
File size65.54 KB
File formatZIP
Versionv1.0

Tags

loggingprivacypiisecuritygdprai agent skill
R
RR HH

Frequently asked questions

Do I get access instantly?

Yes. This is a digital product - you can download it right after checkout, straight from your library.

Can I use it for commercial projects?

Yes. Commercial use is allowed: use it in your own business and in things you sell. You may not resell or redistribute the file itself.

What's your refund policy?

You can request a refund within 30 days. If something isn't right, request it from your order and the Getly team reviews it.

What file formats and sizes will I get?

You'll download 1 file - ZIP - 65.54 KB in total.

Do I get free updates?

Yes - when the seller ships a new version, you can re-download the latest files from your library at no extra cost. Check the changelog for recent updates.

Price

$5.00