// 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:
- NuGet packages (
dotnet add package,PackageReference) - npm/pnpm/yarn packages
- pub packages (Flutter)
- CLIs, tools, executables
- Browser extensions, VS Code extensions
- Docker images
- Git submodules / forks
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.
postinstall scripts). Send Telegram.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:
- Project name in square brackets.
- Risk level (MEDIUM or HIGH).
- Package name and version.
- One sentence explaining why the risk isn't low.
How do you assess risk?
Quick check before installation:
- How many downloads? NuGet/npm shows the number. < 10K = suspicious for core packages.
- When last updated? > 2 years without an update = the package may be abandoned.
- Who is the author? Known name or company? Or an account just registered?
- Is the repo open and accessible? If not — stop.
- Does the package have postinstall scripts? Does it run code during
npm install/dotnet restore? - 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
- Never install a HIGH-risk package without explicit OK from the owner. Stop, send Telegram, wait.
- Never skip the log because the package "works fine on my machine". The log exists for the future.
- Don't add packages you don't actively use. Every dependency is attack surface.
- Always pin versions.
"^1.0.0"can become 1.99.0 tomorrow — pin to"1.0.0"or use a lock file.