check-logs
Skill18 starsChanged 4 months agoApache-2.0View on GitHub
Scan Go code for logging violations — credential leaks, missing LogValuer, raw structs, stdout usage, unsafe patterns
3 other projects use a version of this.
Adopted by
Most recently taken up by
- pilotmain/AethOStheir own version, first seen Nov 15, 2026
- NVIDIA/kumo-enginetheir own version, first seen Oct 20, 2026
- Conzel/personal-claude-code-skillstheir own version, first seen Apr 24, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- NVIDIA/kumo-engine★ 78same name
- Conzel/personal-claude-code-skills★ 2same name
- pilotmain/AethOS★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository6 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- add-logsSkill
- changelogSkill
- cut-releaseSkill
- refresh-third-party-inventorySkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 4 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
After adding logging to a file
- Distinctive: line 16
When reviewing someone else's changes
- Very specific: line 28
Read the secure logging rules at docs/_internal/secure-logging-rules.md in the project root.
- Very specific: line 33
No args: scan all .go files under cmd/ and internal/
- Distinctive: line 106
All clear: "No violations found.
- Distinctive: line 114
If you're unsure whether something is a violation, flag it as MEDIUM with a note explaining the uncertainty
- Very specific: line 115
Never modify code during a check — only report.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Check Logs
Scan Go code for logging security violations and compliance issues. Invoked with /check-logs.
When to use
- Before committing code
- After adding logging to a file
- As a periodic audit of the codebase
- When reviewing someone else's changes
Usage
/check-logs— scan the entire codebase/check-logs <file_path>— scan a specific file/check-logs staged— scan only git-staged files
Steps
Step 1: Read the rules
Read the secure logging rules at docs/_internal/secure-logging-rules.md in the project root. These are the rules you're checking against.
Step 2: Identify files to scan
Based on the invocation:
- No args: scan all
.gofiles undercmd/andinternal/ - File path: scan that file
staged: rungit diff --cached --name-only -- '*.go'and scan those files
Step 3: Run violation checks
For each file, check for the following violations in order of severity:
CRITICAL — Credential exposure
- C-01: Credentials in log calls — Any log call that includes
Password,Username,Token,Secret, orAuthorizationfield values - C-02: Raw struct logging —
slog.Any("key", someStruct)orlog.Printf("%+v", someStruct)where the struct is or contains a credential-carrying type (BrokerConfig,AuthConfig,ServerConfig,HTTPClient) - C-03: Config map logging — Logging
map[string]*BrokerConfigor the fullServerConfig.Brokersmap - C-04: Raw Authorization header — Logging the value of an
AuthorizationHTTP header - C-05: URL with credentials — Logging a URL that matches
://.*:.*@pattern
HIGH — Missing protections
- H-01: Missing LogValuer — Credential-carrying types (
AuthConfig,BrokerConfig, and any struct with password/token/secret fields) that don't implementslog.LogValuer - H-02: Missing ReplaceAttr — slog handler created without
ReplaceAttrsafety net - H-03: Stdout logging — Any log output directed to
os.Stdoutinstead ofos.Stderr - H-04: Old log package — Usage of
log.Printf,log.Println,log.Fatalf,log.Fatalinstead ofslog
MEDIUM — Unsafe patterns
- M-01: fmt.Sprintf in message —
slog.Info(fmt.Sprintf(...))or similar — variable data should be in structured fields, not the message - M-02: Raw external errors —
slog.String("error", err.Error())where the error comes from SEMP, HTTP, or external systems that might include credentials in error messages - M-03: String concatenation in message —
slog.Info("action: " + userInput)— use structured fields instead
LOW — Best practice
- L-01: Missing required fields — Tool invocation logs without all required fields (tool, broker, outcome, duration)
- L-02: Unstructured fmt.Print — Any
fmt.Printf,fmt.Printlnused for logging purposes
Step 4: Report findings
Present findings grouped by severity with file path, line number, the offending code, and a fix suggestion.
Output format
Log Security Check Results
==========================
Files scanned: 14
Violations found: 3
CRITICAL:
- internal/config/config.go:94 — H-04: Uses log.Printf (old log package)
Code: log.Printf("WARNING: env_prefix naming convention...")
Fix: Replace with slog.Warn("env_prefix naming convention is provisional")
HIGH:
- internal/config/config.go — H-01: AuthConfig does not implement slog.LogValuer
Fix: Add LogValue() method that exposes only Method field
MEDIUM:
- (none)
LOW:
- cmd/server/main.go:35 — L-01: Startup log missing auth_mode field
Code: log.Printf("Loaded config with %d broker(s)", len(cfg.Brokers))
Fix: slog.Info("config loaded", slog.Int("broker_count", len(cfg.Brokers)), slog.String("auth_mode", "basic"))
Clean:
- internal/composite/ — no violations
- internal/registry/ — no violations
- internal/semp/sempv2/ — no violationsStep 5: Summary
End with a one-line summary:
- All clear: "No violations found. Logging is compliant."
- Issues found: "Found N violations (X critical, Y high, Z medium). Fix critical and high before committing."
Rules
- CRITICAL violations must be fixed before any commit — no exceptions
- HIGH violations should be fixed before commit
- MEDIUM and LOW are recommendations — flag them but don't block
- If you're unsure whether something is a violation, flag it as MEDIUM with a note explaining the uncertainty
- Never modify code during a check — only report. Use
/add-logsto fix.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

