build: classify cmd/* as MEDIUM in PR severity bot
What changed, and why it matters
This commit only changes the internal GitHub workflow that automatically labels pull requests by severity. It adjusts the bot so that command-line client files under cmd/* are classified as MEDIUM instead of HIGH, because filenames like cmd_walletunlocker.go were being incorrectly matched to security-sensitive server-side package names. There is no change to LND's actual code, no user-facing behavior change, and no security fix or vulnerability patch.
No security action required. This is a workflow/labeling configuration change only.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies .github/workflows/pr-severity.yml. It adds cmd/* to the MEDIUM severity tier and adds a classification rule instructing the bot to classify files by package path rather than filename keywords. This prevents false positives where CLI client files (e.g., cmd/commands/cmd_walletunlocker.go) were being treated as HIGH severity because their filenames contain walletunlocker. No application code is changed.
Changed components
.github/workflows/pr-severity.ymlInspect captured patch +8 / −3
diff --git a/.github/workflows/pr-severity.yml b/.github/workflows/pr-severity.yml
index 10c672d..352df0b 100644
--- a/.github/workflows/pr-severity.yml
+++ b/.github/workflows/pr-severity.yml
@@ -95,6 +95,7 @@ jobs:
- chainntnfs/*, chanacceptor/*, protofsm/*, sqldb/*
**MEDIUM** (severity-medium) - Focused review:
+ - cmd/* - CLI client commands (do NOT inherit severity from server-side packages with similar names)
- payments/*, autopilot/*, lncfg/*, chanfitness/*
- netann/*, kvdb/*, chanbackup/*, aezeed/*, tor/*
- zpay32/*, tlv/*, fn/*, record/*, amp/*
@@ -110,12 +111,16 @@ jobs:
## Classification Rules
1. The HIGHEST severity file determines the PR severity
- 2. Bump severity UP one level if:
+ 2. Classify files by their actual package path, NOT by filename keywords.
+ Files under cmd/* are CLI client code and should always be MEDIUM,
+ even if the filename contains a server-side package name (e.g.
+ cmd/commands/cmd_walletunlocker.go is MEDIUM, not HIGH).
+ 3. Bump severity UP one level if:
- PR touches >20 files (excluding tests and auto-generated files)
- PR has >500 lines changed (excluding tests and auto-generated files)
- PR touches multiple distinct critical packages
- 3. Check for override labels first (severity-override-*). If present, respect the override.
- 4. Database migrations (channeldb/migration*, sqldb/*, wtdb/*) are always CRITICAL
+ 4. Check for override labels first (severity-override-*). If present, respect the override.
+ 5. Database migrations (channeldb/migration*, sqldb/*, wtdb/*) are always CRITICAL
## Files to Exclude from Line/File Counting
When calculating file count and lines changed for severity bumps, exclude:
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.