// TL;DR

Every time you download a NuGet package, a tool, a CLI, or install something — log it in E:\DOCUMENTATION\External-download.md with project, date, what, why, and a risk assessment. If the risk is even slightly elevated — send a Telegram message to the owner before you continue.

// Why this is IMPORTANT (in caps)

Supply chain attacks have hit npm, PyPI, and NuGet. event-stream in 2018, colors.js in 2022, xz-utils in 2024. Each time it landed because a package was installed without review. A log lets us react when one of those packages turns up on a CVE list.

Trigger

The rule applies every time something is pulled into a project:

Log entry format

Append an entry to E:\DOCUMENTATION\External-download.md:

## 2026-05-10 — Pomelo.EntityFrameworkCore.MySql 8.0.2

- **Project:** restparti.dk
- **What:** Pomelo.EntityFrameworkCore.MySql v8.0.2 (NuGet)
- **Why:** Switching from v7.x — 8.x has better support for MariaDB 11.
- **Where:** RestPartiDK.Infrastructure.csproj
- **Risk:** LOW — established package, >15M downloads, actively maintained.
  Larger version bump may cause EF migration conflicts — verified.
- **Telegram sent:** no (low risk)

Risk assessment

Three levels. The level decides whether a Telegram alarm is sent.

LOW
Established package, high download counts, actively maintained, known author, not a major version change. No Telegram.
MEDIUM
Lesser-known package, or a major version bump of a known package, or a new binary from an unknown source, or a package that runs code at install time (postinstall scripts). Send Telegram.
HIGH
Package from an unknown author, large attack surface (low-level system access, network, file I/O), a "convenience" wrapper around a well-known package (typosquatting risk), or flagged in a CVE database. Stop. Ask the owner before installing.

Telegram alarm

When risk is medium or higher, send via the internal CLI:

"E:\DRIFT\Custom_CLI\codewire-telegram.exe" send \
    --chat-id <chat-id> \
    --body "[restparti] MEDIUM-risk download: SomePackage v2.0 — major bump"

Include:

How do you assess risk?

Quick check before installation:

  1. How many downloads? NuGet/npm shows the number. < 10K = suspicious for core packages.
  2. When last updated? > 2 years without an update = the package may be abandoned.
  3. Who is the author? Known name or company? Or an account just registered?
  4. Is the repo open and accessible? If not — stop.
  5. Does the package have postinstall scripts? Does it run code during npm install / dotnet restore?
  6. Is it on OSV / GitHub Advisory Database? Check before installing.

Example: good assessment

## 2026-05-08 — flutter_secure_storage 9.0.0

- **Project:** codewire_chat (Flutter app)
- **What:** flutter_secure_storage v9.0.0 (pub.dev)
- **Why:** Required to store JWT access/refresh tokens in the platform keystore
  (Android Keystore / iOS Keychain) instead of SharedPreferences.
- **Risk:** LOW — official package from mogol-stemmer, >3.5M downloads,
  actively maintained, no known CVEs.
- **Telegram sent:** no

Example: MEDIUM risk

## 2026-05-09 — some-image-converter 1.0.0

- **Project:** sker.dk
- **What:** some-image-converter v1.0.0 (npm)
- **Why:** Need to convert SVG → PNG for Stripe ticket printing.
- **Risk:** MEDIUM — new package (3 months old), 200 downloads/week, single
  author, postinstall script for native binary. Alternative: sharp,
  which is established. Recommending sharp.
- **Telegram sent:** yes, 2026-05-09 14:23
- **Decision:** Switched to sharp after owner OK.

What you never do


Related rules