Apply draft advisories too, so a maintainer can try an advisory on real
servers before publishing it. Draft findings are marked "(draft)";
withdrawn advisories never apply.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Store the deployed version on TYPE (or the legacy RECIPE key when TYPE is
absent) instead of duplicating it across both. For git-URL recipes RECIPE
now stays a bare source pointer, so the two can never drift apart. Drops
the dead dirtyVersion branch and the fragile substring skip in
WriteRecipeVersion.
Also stamp the coop-cloud.<stack>.version label ourselves on upgrade and
rollback rather than trusting the value baked into the recipe's
compose.yml: git-URL/WIP recipes carry a stale or missing label, which
otherwise left the live deployment reporting the wrong version. Stop
getReleaseNotes and the [version] arg validation from fataling when the
deployed version is "unknown".
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
(cherry picked from commit 73801daae8)
Allow `abra app new <git-url>` to use a recipe from outside the
catalogue. On clone, a `.abra-source` sidecar records the canonical
host/path name (the on-disk directory escapes "/" and "." lossily), and
IsClean ignores it. When templating the app's .env, a `RECIPE=<canonical
name>` line is injected so a later `abra app deploy`, possibly on another
machine, re-fetches the recipe from the same git source. `recipe ls` now
shows a source column listing these external recipes alongside catalogue
ones.
(cherry picked from commit 5e8162bc66)
Add NormalizeRecipeName to unify the various ways a recipe can be
referenced - https/http/ssh URLs, SCP-style git@host:path, already-
canonical host/path, and short catalogue names - to a single stable
"host/path" form, preserving any ":version" suffix. Wire it into
recipe.Get and ValidateRecipe so every entry point accepts git URLs, and
add Recipe.ShortName to recover the bare recipe name from a prefixed one.
(cherry picked from commit 6d9896fc46)
- When a recipe upgrade is needed, search the recipe's newer releases for
the oldest one whose images are fixed, and complain if there is none.
Images are read from compose*.yml at each release tag; only tags are
fetched, the local checkout is never changed.
- For recipe version ranges, check that the advisory's fixed version is
a released tag.
- Show recipes relative to git.coopcloud.tech/coop-cloud/ (nextcloud,
c4dt/nextcloud, or the full path). Advisories match recipes the same
way, so forks are not matched by the canonical recipe's ranges.
- Replace the wide table by a narrow numbered table plus a numbered list
of fixes wrapped to the terminal width; shorten SSH errors of
unreachable servers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LoadAppFiles("") fails on an empty servers directory; report "no apps
found" and exit 0 instead.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A redeploy only fixes an image if its tag now points to a fixed image.
Patch-pinned tags such as nextcloud:35.0.2-fpm are not rebuilt once the
next patch is out, so suggesting a redeploy was wrong for them.
For findings with strategy refresh, read the tag's current image for
the server's platform and apply the advisory again. If it is still not
fixed, suggest a recipe upgrade instead; if the registry cannot be
reached, mark the suggestion as unchecked.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LoadAppFiles only scans all servers when it gets a single empty string;
called without arguments it scanned none, so audit always reported
"no apps found".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SmallSHA, ShortenID and the version string sliced fixed lengths, so a
binary built without ldflags (commit = 7 spaces) panicked on every
command. Add formatter.Truncate and use it in all three places.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
For the nextcloud update we need to be able to indicate the
digest of the docker image, as the docker tag is the same
for the vulnerable and the fixed docker image.
This avoids 'abra update' to re-install with a warning an
old image if the connection to docker hub fails.
I had a lot of failures for pulling the docker images lately,
so I was looking for a way to connect using docker login.
This PR sends the docker login credentials from the host to
the swarm server.