1143 Commits
Author SHA1 Message Date
Linus GasserandClaude Opus 5.5 59240028d9 audit: add --include-drafts
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>
2026-11-20 17:17:56 +01:00
Linus Gasser 47d9f73267 fix(app): keep recipe version on a single env field and label
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)
2026-11-20 17:04:49 +01:00
Linus Gasser 0c91585eae feat(app): support git-URL recipes in 'abra app new'
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)
2026-11-20 17:04:49 +01:00
Linus Gasser 0a1578966a feat(recipe): normalize git URLs to canonical host/path names
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)
2026-11-20 17:04:49 +01:00
Linus GasserandClaude Opus 5.5 6fc26afad6 audit: check that fixes exist, short recipe names, list layout
- 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>
2026-11-20 16:54:57 +01:00
Linus GasserandClaude Opus 5.5 d691241414 Treat an empty servers directory as nothing to audit
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>
2026-11-20 16:33:30 +01:00
Linus GasserandClaude Opus 5.5 491ea47f50 Check the registry before suggesting a redeploy
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>
2026-11-20 16:32:47 +01:00
Linus GasserandClaude Opus 5.5 165a81de91 Fix abra audit not finding any apps
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>
2026-11-20 16:30:49 +01:00
Linus GasserandClaude Opus 5.5 907a7eaa08 Fix panic on short commit hashes
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>
2026-11-20 16:09:53 +01:00
Linus Gasser d699e51cda First audit version 2026-11-20 16:05:57 +01:00
Linus Gasser e5804d224d Allow digests in docker images
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.
2026-11-20 14:16:01 +01:00
Linus Gasser 1111b69f12 Use docker login credentials from host
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.
2026-06-16 17:40:58 +00:00
moritz a44fde2df2 fix(new): checkout given recipeVersion before generating env closes #862 2026-06-09 16:09:58 +02:00
iexos 1013f669bb fix: i18n & clarify no release notes msg 2026-04-10 23:22:40 +02:00
iexos 0633f24d1b feat: recipe release reverts completely on failure 2026-03-03 00:02:15 +00:00
decentral1se 24288c81d3 fix: missing i18n 2026-02-20 14:49:02 +01:00
decentral1se b2e691265a fix: consistent i18n usage on rootCmd 2026-02-20 10:49:04 +01:00
decentral1se bff23f0ae6 fix: translated help
Follows toolshed/abra#785
2026-02-20 10:46:52 +01:00
decentral1se 78899f173c fix: remove double help flag 2026-02-19 00:42:56 +01:00
iexos 521f5c1647 feat: optionally commit changes with recipe upgrade 2026-02-16 09:18:41 +00:00
iexos 5eb41bc803 feat!: require clean working copy for recipe release cmd 2026-02-16 09:18:41 +00:00
iexos fc39721501 feat!: merge recipe sync into recipe release 2026-02-16 09:18:41 +00:00
iexos 44bacc582b feat!: always publish on recipe release 2026-02-16 09:18:41 +00:00
decentral1se 4e0eb739b4 feat: ls requires --chaos due to Ensure logic
Follows toolshed/abra#771
2026-02-15 17:57:31 +00:00
decentral1se 0ccf3d2b12 fix: ensure and fail for updated recipes 2026-02-15 17:07:46 +01:00
decentral1se f87ce74027 fix: ensure borked tag handled for deploy/ls 2026-02-15 17:07:45 +01:00
ammaratef45 59c0d1f4c5 ensure recipe is up to date before creating new app 2026-02-15 13:40:34 +00:00
Apfelwurm 4b863f1e15 change usage of tags to recipe versions in deploy.go 2026-02-13 21:51:46 +00:00
Apfelwurm 064c9f5d65 fix: breaking GetRecipeVersions when an invalid recipe version exists 2026-02-13 21:51:46 +00:00
decentral1se dba21d6a29 chore: lowercase, i18n 2026-01-17 00:44:55 +01:00
ammaratef45 304ac87cec ensure repo is up to date before printing status 2026-01-14 16:58:21 -08:00
decentral1se b721adbf9c chore: i18n 2025-12-21 16:39:02 +01:00
ammaratef45 42f9e6d458 return error instead of handling it inside getLatestVersion 2025-12-19 06:50:35 -08:00
ammaratef45 9e7bc31d4d avoiding #732 by checking for empty versions list for recipe sync 2025-12-18 14:41:58 -08:00
jade cc87d5b3da chore: remove reference to wizard mode from recipe upgrade cli docs 2025-12-13 15:26:12 +11:00
decentral1se bb93e4266a fix: show domain with https (clickable)
See toolshed/abra#643
2025-11-09 10:56:21 +01:00
Apfelwurm 1bdc11ba62 fix no-input app deployment when no tty is present 2025-11-04 13:52:28 +00:00
decentral1se efdac610bd fix: skip local server on it's own 2025-11-02 10:44:34 +00:00
decentral1se cd6021f116 fix: expose new version
See toolshed/abra#713
2025-11-02 10:44:34 +00:00
decentral1se 2cca04de90 fix(move): does not error when secret already exists on new server
See toolshed/abra#709
2025-10-31 21:37:55 +01:00
decentral1se dc2cd85d91 feat!: abra app env pull
`abra app env` -> `abra app env list`.

See toolshed/abra#497
2025-10-31 21:31:43 +01:00
decentral1se 964ed834ee refactor!: remove autoupdate (kadabra) 2025-10-19 15:46:18 +02:00
decentral1se 3845b40aa3 refactor!: archive kadabra 2025-10-19 15:32:38 +02:00
decentral1se 5b504a1550 Revert "feat: cctuip lands in main"
See toolshed/abra#691 (comment)
2025-10-17 19:27:23 +02:00
decentral1se 2460dd9438 fix: pagination with multiline(true)
See toolshed/abra#689
2025-10-03 20:13:35 +02:00
decentral1se b737ce2107 feat: cctuip lands in main
See toolshed/organising#657
2025-10-02 10:53:44 +02:00
decentral1se a3d0ece7cb refactor: single missing value 2025-10-02 10:53:31 +02:00
decentral1se 4b4c56d406 fix: skip borked tags on app list
See toolshed/abra#656
2025-10-01 21:13:18 +02:00
decentral1se a430b1e4fd fix: dont show unchanged images/tags
See toolshed/abra#677
2025-10-01 12:11:29 +02:00
decentral1se 581e6ef538 chore: lowercase 2025-10-01 11:18:42 +02:00