Every composer command in a scaffolded app fails with "packages are not trusted"

   ERROR  [3] packages are not trusted. Run [./vendor/bin/vet] in a terminal to pick the ones
          that you trust.
When

Any sail composer install / update / require in an application scaffolded with vet among its quality tools — most often right after adding a package.

Why it happens

This is Vet working, not a failure. laravel/vet runs as a composer plugin and gates every install on vet.json: a version the file does not record is shown as a diff and refused, so a package nobody has read cannot reach vendor/ unnoticed. Composer writes the new composer.lock before the plugin stops it, so lock and vendor/ can disagree afterwards — and Vet then refuses to record anything until they agree again.

Fix

Run sail composer vet in a terminal. The plugin never asks — it can only report — so a script, a CI job or an agent driving the app non-interactively will always exit 1 here. The interactive run lists the packages, will hand each diff to a coding agent if you ask it to, and records the ones you accept. If it refuses with "composer would write N packages that vendor/ does not hold", run sail composer install first so the two agree, then vet again.

Do not delete vet.json to get past this: that discards every recorded version, and the next vet --init re-trusts whatever is on disk unread — the one thing the file exists to prevent.

Still stuck? Open an issue with your --log transcript.

All troubleshooting entries