Skip to content
Back to skills

Config Correctness

ASecurity

L1 trigger - audits configuration constants, documented bounds, feature-gated values, and unused protocol limits for semantic drift.

  • 281 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added May 27, 2026
blockchainrustgoapisecurity

Works with

  • api

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add PlamenTSV/plamen --skill config-correctness --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Config Correctness?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Config Correctness
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/plamentsv-config-correctness/badge)](https://www.skillsdirectory.com/skills/plamentsv-config-correctness)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: "config-correctness"
description: "L1 trigger - audits configuration constants, documented bounds, feature-gated values, and unused protocol limits for semantic drift."
---

# Injectable Skill: Config Correctness

> **L1 trigger**: `L1_PATTERN=true` AND (`config/` OR `settings` OR `constants` OR `DEFAULT_` OR `MAX_` OR `MIN_` OR protocol docs/comments detected)
> **Inject Into**: `depth-edge-case`, `depth-state-trace`
> **Language**: Go and Rust
> **Finding prefix**: `[CFG-N]`

## Purpose

Configuration bugs are often single-line semantic drift: a limit exists but is not used, a default is testnet-only but ships in production, a doc comment says one bound while code enforces another, or a feature flag changes protocol-visible enum values. This skill is a bounded enumeration pass, not a new agent.

## 1. Configuration Inventory

Build a table of security-relevant constants and runtime config fields:

| Config/Constant | Declared Value | Documented Value / Comment | Runtime Use Sites | Verdict |
|-----------------|----------------|-----------------------------|-------------------|---------|

Include:
- `DEFAULT_*`, `MAX_*`, `MIN_*`, `*_LIMIT`, `*_TIMEOUT`, `*_INTERVAL`, `*_FACTOR`;
- chain parameters, genesis/testnet/mainnet defaults, peer/network limits, RPC limits, difficulty/EMA/oracle knobs;
- feature-flag or platform-conditional values that affect serialization, consensus, object layout, or API output.

## 2. Required Checks

For each row:
- **Doc/code drift**: compare the declared value with nearby comments, docs, config examples, and protocol constants.
- **Unused limit**: if a max/min/factor exists, find the enforcement site. If no enforcement path exists, flag it.
- **Network-mode drift**: verify testnet/devnet defaults cannot silently apply to production mode.
- **Unit drift**: verify seconds vs milliseconds, bytes vs chunks, slots vs blocks, and percentage vs basis-point units.
- **Feature/platform drift**: verify feature flags or OS-specific types do not change externally visible enum values, byte layout, consensus fields, or API semantics.
- **Boundary effect**: substitute the configured min/max/equality point into the function that consumes it.

Tag evidence as `[CFG-DOC-DRIFT:{file}:{line}]`, `[CFG-UNUSED-LIMIT:{file}:{line}]`, `[CFG-UNIT:{file}:{line}]`, or `[CFG-FEATURE-DRIFT:{file}:{line}]`.

## 3. Non-Finding Rules

Do not report harmless style differences. A config finding needs at least one concrete consequence: consensus divergence, DoS, stale security bound, unexpected production exposure, cross-platform incompatibility, or user/API misbehavior.

## 4. Output

Use normal finding format. If no finding exists, still emit the inventory table with `SAFE` rows and concrete file:line evidence for the checked constants.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.